From 3ac6ab895f4badb968fe698d1674b56e18a1e64f Mon Sep 17 00:00:00 2001 From: Georgy Berdyshev Date: Mon, 3 Dec 2018 05:28:00 +0100 Subject: [PATCH] Update to Babel 7. --- .babelrc | 3 --- babel.config.js | 17 +++++++++++++++++ package.json | 9 +++++---- test/mocha.opts | 4 ++-- 4 files changed, 24 insertions(+), 9 deletions(-) delete mode 100644 .babelrc create mode 100644 babel.config.js diff --git a/.babelrc b/.babelrc deleted file mode 100644 index c13c5f62..00000000 --- a/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015"] -} diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 00000000..9da88cfe --- /dev/null +++ b/babel.config.js @@ -0,0 +1,17 @@ +const presets = [ + [ + "@babel/env", + { + targets: { + edge: "17", + firefox: "60", + chrome: "67", + safari: "11.1", + }, + useBuiltIns: "usage", + }, + ], +]; + +module.exports = { presets }; + diff --git a/package.json b/package.json index 63a65585..ae378e45 100644 --- a/package.json +++ b/package.json @@ -22,15 +22,16 @@ "rfc 6578" ], "dependencies": { + "@babel/polyfill": "^7.0.0", "co": "^4.6.0", "xmldom": "^0.1.27", "xmlhttprequest": "^1.8.0" }, "devDependencies": { - "babel-cli": "^6.26.0", - "babel-core": "^6.26.3", - "babel-polyfill": "^6.26.0", - "babel-preset-es2015": "^6.24.1", + "@babel/cli": "^7.1.5", + "@babel/core": "^7.1.6", + "@babel/preset-env": "^7.1.6", + "@babel/register": "^7.0.0", "browserify": "^11.0.1", "chai": "^4.2.0", "doctoc": "^0.15.0", diff --git a/test/mocha.opts b/test/mocha.opts index d741293e..cd61e086 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1,5 +1,5 @@ ---require babel-core/register ---require babel-polyfill +--require @babel/register +--require @babel/polyfill --recursive --reporter spec --timeout 20s