diff --git a/.babelrc b/.babelrc index d708cfe15..3901f7fb1 100644 --- a/.babelrc +++ b/.babelrc @@ -1,10 +1,8 @@ { "presets": [ [ - "env", + "@babel/preset-env", { - // Do not transform modules to CommonJS. - "modules": false, // See modern tier: https://www.mediawiki.org/wiki/Compatibility#Browser_support_matrix "targets": { // https://en.wikipedia.org/wiki/Google_Chrome_version_history diff --git a/.nycrc.json b/.nycrc.json index 10f86cf16..bbd18e348 100644 --- a/.nycrc.json +++ b/.nycrc.json @@ -14,7 +14,7 @@ "//": "Set the coverage percentage by category thresholds.", "statements": 90, - "branches": 85, + "branches": 80, "functions": 85, "lines": 90, diff --git a/package.json b/package.json index 6d445a7aa..aaf399647 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,11 @@ "node": "6.11.0" }, "devDependencies": { + "@babel/core": "7.2.0", + "@babel/preset-env": "7.2.0", + "@babel/register": "7.0.0", "@wikimedia/mw-node-qunit": "5.0.0", - "babel-loader": "7.1.4", - "babel-preset-env": "1.6.0", - "babel-register": "6.24.1", + "babel-loader": "8.0.4", "bundlesize": "0.15.3", "clean-webpack-plugin": "0.1.19", "eslint-config-wikimedia": "0.8.1", diff --git a/resources/dist/index.js b/resources/dist/index.js index f8cdbdca5..62eca8836 100644 Binary files a/resources/dist/index.js and b/resources/dist/index.js differ diff --git a/resources/dist/index.js.json b/resources/dist/index.js.json index 362fe154f..6378227e5 100644 Binary files a/resources/dist/index.js.json and b/resources/dist/index.js.json differ diff --git a/tests/node-qunit/run.js b/tests/node-qunit/run.js index 344577932..9852dc02c 100644 --- a/tests/node-qunit/run.js +++ b/tests/node-qunit/run.js @@ -2,9 +2,9 @@ const fs = require( 'fs' ), svgInlineLoader = require( 'svg-inline-loader' ); -require( 'babel-register' )( { +require( '@babel/register' )( { presets: [ - [ 'env', { + [ '@babel/preset-env', { targets: { node: 6 } diff --git a/webpack.config.js b/webpack.config.js index 3085448eb..a0e6e5e36 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -50,7 +50,9 @@ const conf = { exclude: /node_modules/, use: { loader: 'babel-loader', - options: { cacheDirectory: true } + options: { + cacheDirectory: true + } } }, {