Skip to content

Upgrade to babel@7 and remove copying .babelrc to dist package #35

Merged
merged 1 commit into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
{
"presets": [
[
"env",
"@babel/preset-env",
{
"loose": true,
"exclude": [
"transform-es2015-typeof-symbol"
],
"targets": {
"browsers": {
"chrome": 28,
"safari": 6,
"firefox": 28,
"opera": 32,
"ie": 11
}
"chrome": 28,
"safari": 6,
"firefox": 28,
"opera": 32,
"ie": 11
}
}
],
"react"
"@babel/preset-react"
],
"plugins": [
"transform-object-rest-spread"
"@babel/plugin-proposal-object-rest-spread"
]
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
+ add typings
+ move docs to branch gh-pages
+ add memoize functions
+ upgrade to babel@7
+ fix bug with `omit` string conversion
+ remove utils/is/not
+ remove sanitize
Expand Down
18 changes: 9 additions & 9 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ module.exports = {
timers: 'fake',
testURL: 'http://localhost/',
transform: {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.jsx?$": "babel-jest",
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.jsx?$': 'babel-jest'
},
globals: {
"ts-jest": {
'ts-jest': {
useBabelrc: true,
tsConfigFile: "tsconfig.json"
tsConfigFile: 'tsconfig.json'
}
},
testMatch: [
"**/__tests__/*.+(ts|tsx|js|jsx)"
'**/__tests__/*.+(ts|tsx|js|jsx)'
],
"moduleFileExtensions": [
"ts",
"tsx",
"js"
moduleFileExtensions: [
'ts',
'tsx',
'js'
]
};
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
],
"license": "Apache-2.0",
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@types/jest": "^23.3.1",
"babel-cli": "^6.26.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.4.2",
"benchmark": "^2.1.4",
"chalk": "^2.4.1",
"coveralls": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion releaseUtils/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const execa = require('execa');

const build = (buildDir, tsTemp) =>
execa.shell(
`tsc -p tsconfig.json`
'tsc -p tsconfig.json'
).then(() => (
execa.shell(
`npx babel ./${tsTemp} -d ${buildDir}`
Expand Down
4 changes: 2 additions & 2 deletions releaseUtils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const updateVersionInPkg = version => {
};
const copyRelationalFiles = (pathRootDir, buildPath) =>
Promise.all(
['package.json', '.npmignore', 'README.MD', 'LICENSE', 'CHANGELOG.md', '.babelrc'].map(fileName =>
['package.json', '.npmignore', 'README.MD', 'LICENSE', 'CHANGELOG.md'].map(fileName =>
fsExtra.copy(
path.join(pathRootDir, fileName),
path.join(buildPath, fileName)
Expand All @@ -50,7 +50,7 @@ const copyRelationalFilesWithSpinner = () =>
const copyDeclarationFiles = (pathRootDir, buildPath) =>
Promise.all(
recursiveReadSync(path.join(pkgRoot, tsTemp))
.filter(fileName => fileName.endsWith(".d.ts"))
.filter(fileName => fileName.endsWith('.d.ts'))
.map(fileName =>
fsExtra.copy(
fileName,
Expand Down