From 7a0c3801c28f8e1cadcfa4ee545ef367f5b919ea Mon Sep 17 00:00:00 2001 From: Luca Greco Date: Tue, 26 Nov 2019 16:16:17 +0100 Subject: [PATCH] fix: Update babel deps to babel 7 --- Gruntfile.js | 4 ++-- package.json | 11 ++++++----- test/mocha-babel.js | 8 ++++++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index c21e55d1..b764ffd2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -60,7 +60,7 @@ module.exports = function(grunt) { options: { babelrc: false, comments: false, - presets: ["babili"], + presets: ["minify"], sourceMap: true, }, files: { @@ -72,7 +72,7 @@ module.exports = function(grunt) { babelrc: false, comments: true, plugins: [ - ["transform-es2015-modules-umd", { + ["@babel/transform-modules-umd", { globals: { "webextension-polyfill": "browser", }, diff --git a/package.json b/package.json index 5d81d595..1802165d 100644 --- a/package.json +++ b/package.json @@ -17,12 +17,13 @@ }, "homepage": "https://github.com/mozilla/webextension-polyfill", "devDependencies": { + "@babel/core": "^7.0.0", + "@babel/plugin-transform-modules-umd": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/register": "^7.0.0", "async-wait-until": "^1.1.5", - "babel-core": "^6.26.3", "babel-eslint": "^8.0.1", - "babel-plugin-transform-es2015-modules-umd": "^6.24.1", - "babel-preset-babili": "^0.0.10", - "babel-preset-es2017": "^6.24.1", + "babel-preset-minify": "^0.5.1", "browserify": "^16.2.2", "chai": "^3.5.0", "chromedriver": "^78.0.1", @@ -32,7 +33,7 @@ "geckodriver": "^1.11.2", "global-replaceify": "^1.0.0", "grunt": "^1.0.1", - "grunt-babel": "^6.0.0", + "grunt-babel": "^8.0.0", "grunt-contrib-concat": "^1.0.1", "grunt-coveralls": "^1.0.1", "grunt-replace": "^1.0.1", diff --git a/test/mocha-babel.js b/test/mocha-babel.js index a8c29691..d5a70123 100644 --- a/test/mocha-babel.js +++ b/test/mocha-babel.js @@ -1,3 +1,7 @@ -require("babel-core/register")({ - presets: ["es2017"], +require("@babel/register")({ + presets: [["@babel/env", { + targets: { + node: "current", + }, + }]], });