Skip to content

Upgrade babel and associated plugins to v7 #1350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 2, 2018
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
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

16 changes: 8 additions & 8 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
"presets": [["env", {
"presets": [["@babel/preset-env", {
"modules": process.env.BABEL_MODULES ? false : 'commonjs',
"targets": {
"node": 6,
Expand All @@ -15,12 +15,12 @@ module.exports = {
"plugins": [
"./resources/inline-invariant",
"syntax-async-functions",
"syntax-async-generators",
"transform-class-properties",
"transform-flow-strip-types",
"transform-object-rest-spread",
["transform-es2015-classes", {"loose": true}],
["transform-es2015-destructuring", {"loose": true}],
["transform-es2015-spread", {"loose": true}]
"@babel/plugin-syntax-async-generators",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-proposal-object-rest-spread",
["@babel/plugin-transform-classes", {"loose": true}],
["@babel/plugin-transform-destructuring", {"loose": true}],
["@babel/plugin-transform-spread", {"loose": true}]
]
};
30 changes: 18 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"watch": "babel-node ./resources/watch.js",
"test": "npm run lint && npm run check && npm run testonly",
"test:ci": "npm run lint && npm run check && npm run testonly:coveralls",
"t": "mocha --require babel-register --require babel-polyfill",
"testonly": "mocha --require babel-register --require babel-polyfill --check-leaks --full-trace --timeout 15000 src/**/__tests__/**/*-test.js",
"t": "mocha --require @babel/register --require @babel/polyfill",
"testonly": "mocha --require @babel/register --require @babel/polyfill --check-leaks --full-trace --timeout 15000 src/**/__tests__/**/*-test.js",
"testonly:cover": "nyc --reporter html --reporter text-summary -- npm run testonly",
"testonly:coveralls": "nyc --silent -- npm run testonly && nyc report --reporter text-lcov | coveralls",
"lint": "eslint --rulesdir ./resources/lint src || (printf '\\033[33mTry: \\033[7m npm run lint -- --fix \\033[0m\\n' && exit 1)",
Expand All @@ -37,8 +37,8 @@
"build:clean": "rm -rf ./dist && mkdir ./dist",
"build:cp": "cp README.md LICENSE ./dist",
"build:package-json": "node ./resources/copy-package-json.js",
"build:cjs": "babel src --optional runtime --ignore __tests__ --out-dir dist/",
"build:mjs": "BABEL_MODULES=1 babel src --optional runtime --ignore __tests__ --out-dir dist/module/ && for file in $(find dist/module -name '*.js'); do mv \"$file\" `echo \"$file\" | sed 's/dist\\/module/dist/g; s/.js$/.mjs/g'`; done && rm -rf dist/module",
"build:cjs": "babel src --optional runtime --ignore '**/__tests__' --out-dir dist/",
"build:mjs": "BABEL_MODULES=1 babel src --optional runtime --ignore '**/__tests__' --out-dir dist/module/ && for file in $(find dist/module -name '*.js'); do mv \"$file\" `echo \"$file\" | sed 's/dist\\/module/dist/g; s/.js$/.mjs/g'`; done && rm -rf dist/module",
"build:flow": "for file in $(find ./src -name '*.js' -not -path '*/__tests__*'); do cp \"$file\" `echo \"$file\" | sed 's/\\/src\\//\\/dist\\//g'`.flow; done",
"preversion": ". ./resources/checkgit.sh && npm test",
"prepublishOnly": ". ./resources/prepublish.sh",
Expand All @@ -48,16 +48,22 @@
"iterall": "^1.2.2"
},
"devDependencies": {
"babel-cli": "6.26.0",
"@babel/cli": "^7.0.0-beta.46",
"@babel/core": "^7.0.0-beta.46",
"@babel/node": "^7.0.0-beta.46",
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.46",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.46",
"@babel/plugin-syntax-async-generators": "^7.0.0-beta.46",
"@babel/plugin-transform-classes": "^7.0.0-beta.46",
"@babel/plugin-transform-destructuring": "^7.0.0-beta.46",
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.46",
"@babel/plugin-transform-modules-commonjs": "^7.0.0-beta.46",
"@babel/plugin-transform-spread": "^7.0.0-beta.46",
"@babel/polyfill": "^7.0.0-beta.46",
"@babel/preset-env": "^7.0.0-beta.46",
"@babel/register": "^7.0.0-beta.46",
"babel-eslint": "8.2.3",
"babel-plugin-syntax-async-functions": "6.13.0",
"babel-plugin-syntax-async-generators": "6.13.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-flow-strip-types": "6.22.0",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-register": "^6.26.0",
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"chai": "4.1.2",
Expand Down
Loading