Skip to content

Commit 3ffc640

Browse files
committed
Upgrade babel and associated plugins to v7
1 parent 2592e12 commit 3ffc640

File tree

4 files changed

+752
-554
lines changed

4 files changed

+752
-554
lines changed

.babelrc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"presets": [["env", {
2+
"presets": [["@babel/preset-env", {
33
"modules": false,
44
"targets": {
55
"node": 4,
@@ -16,12 +16,12 @@
1616
"./resources/common-js-modules",
1717
"./resources/inline-invariant",
1818
"syntax-async-functions",
19-
"syntax-async-generators",
20-
"transform-class-properties",
21-
"transform-flow-strip-types",
22-
"transform-object-rest-spread",
23-
["transform-es2015-classes", {"loose": true}],
24-
["transform-es2015-destructuring", {"loose": true}],
25-
["transform-es2015-spread", {"loose": true}]
19+
"@babel/plugin-syntax-async-generators",
20+
"@babel/plugin-proposal-class-properties",
21+
"@babel/plugin-transform-flow-strip-types",
22+
"@babel/plugin-proposal-object-rest-spread",
23+
["@babel/plugin-transform-classes", {"loose": true}],
24+
["@babel/plugin-transform-destructuring", {"loose": true}],
25+
["@babel/plugin-transform-spread", {"loose": true}]
2626
]
2727
}

package.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"watch": "babel-node ./resources/watch.js",
1919
"test": "npm run lint && npm run check && npm run testonly",
2020
"test:ci": "npm run lint && npm run check && npm run testonly:coveralls",
21-
"t": "mocha --require babel-register --require babel-polyfill",
22-
"testonly": "mocha --require babel-register --require babel-polyfill --check-leaks --full-trace --timeout 15000 src/**/__tests__/**/*-test.js",
21+
"t": "mocha --require @babel/register --require @babel/polyfill",
22+
"testonly": "mocha --require @babel/register --require @babel/polyfill --check-leaks --full-trace --timeout 15000 src/**/__tests__/**/*-test.js",
2323
"testonly:cover": "nyc --reporter html --reporter text-summary -- npm run testonly",
2424
"testonly:coveralls": "nyc --reporter text-lcov npm run testonly | coveralls",
2525
"lint": "eslint --rulesdir ./resources/lint src || (printf '\\033[33mTry: \\033[7m npm run lint -- --fix \\033[0m\\n' && exit 1)",
@@ -42,17 +42,22 @@
4242
"iterall": "^1.2.2"
4343
},
4444
"devDependencies": {
45-
"babel-cli": "6.26.0",
45+
"@babel/cli": "^7.0.0-beta.46",
46+
"@babel/core": "^7.0.0-beta.46",
47+
"@babel/node": "^7.0.0-beta.46",
48+
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.46",
49+
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.46",
50+
"@babel/plugin-syntax-async-generators": "^7.0.0-beta.46",
51+
"@babel/plugin-transform-classes": "^7.0.0-beta.46",
52+
"@babel/plugin-transform-destructuring": "^7.0.0-beta.46",
53+
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.46",
54+
"@babel/plugin-transform-modules-commonjs": "^7.0.0-beta.46",
55+
"@babel/plugin-transform-spread": "^7.0.0-beta.46",
56+
"@babel/polyfill": "^7.0.0-beta.46",
57+
"@babel/preset-env": "^7.0.0-beta.46",
58+
"@babel/register": "^7.0.0-beta.46",
4659
"babel-eslint": "8.2.3",
4760
"babel-plugin-syntax-async-functions": "6.13.0",
48-
"babel-plugin-syntax-async-generators": "6.13.0",
49-
"babel-plugin-transform-class-properties": "6.24.1",
50-
"babel-plugin-transform-es2015-modules-commonjs": "6.26.0",
51-
"babel-plugin-transform-flow-strip-types": "6.22.0",
52-
"babel-plugin-transform-object-rest-spread": "6.26.0",
53-
"babel-polyfill": "^6.26.0",
54-
"babel-preset-env": "^1.5.2",
55-
"babel-register": "^6.26.0",
5661
"beautify-benchmark": "0.2.4",
5762
"benchmark": "2.1.4",
5863
"chai": "4.1.2",

resources/common-js-modules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
*/
1515
module.exports = process.env.BABEL_MODULES ?
1616
() => ({}) :
17-
require('babel-plugin-transform-es2015-modules-commonjs');
17+
require('@babel/plugin-transform-modules-commonjs');

0 commit comments

Comments
 (0)