mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-30 10:25:00 +00:00
Switch from babel-preset-env to @babel/preset-env
Replace: - babel-preset-env@1.6.0 with @babel/preset-env@7.2.0 - babel-register@6.24.1 with @babel/register@7.0.0 - babel-loader@7.1.4 with babel-loader@8.0.4 Add: - @babel/core@7.2.0 --- - babel-preset-env, @babel/preset-env babel-preset-env moved to @babel/preset-env in the Babel monorepo. This appears to have incremented the version from v1.6.0[0] to 7.x to match the rest of the Babel packages but appears to otherwise be undocumented.[1,3] [0] https://github.com/babel/babel-preset-env/blob/24b99ec/README.md [1] https://github.com/babel/babel/blob/efa571a/CHANGELOG.md - @babel/preset-env, @babel/register *Many* changes as identified by package [2] and summarized [3]. Node.js v6 or above now required. New dependency on @babel/core. Support for ES2018 and browserslist v4. `modules: false` is now the default for preset-env + babel-loader. The .babelrc has been updated. New babel-upgrade tool. babel.config.js can replace .babelrc. Popups doesn't seem to need it. TypeScript and JSX fragment support. [2] https://github.com/babel/babel/blob/efa571a/CHANGELOG.md [3] https://babeljs.io/blog/2018/08/27/7.0.0 - babel-loader Support for Babel 7.x. The following warning is printed when building but perhaps this is due to another dependency: (node:14559) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56 parseQuery() will be replaced with getOptions() in the next major version of loader-utils. https://github.com/webpack/loader-utils/issues/56#issuecomment-286117000 https://github.com/babel/babel-loader/releases/tag/v7.1.5 https://github.com/babel/babel-loader/releases/tag/v8.0.0-beta.0 https://github.com/babel/babel-loader/releases/tag/v8.0.0-beta.1 https://github.com/babel/babel-loader/releases/tag/v8.0.0-beta.2 https://github.com/babel/babel-loader/releases/tag/v8.0.0-beta.3 https://github.com/babel/babel-loader/releases/tag/v8.0.0-beta.4 (v8.0.0-beta.5 was erroneous.) https://github.com/babel/babel-loader/releases/tag/v8.0.0-beta.6 https://github.com/babel/babel-loader/releases/tag/v8.0.0 https://github.com/babel/babel-loader/releases/tag/v8.0.1 https://github.com/babel/babel-loader/releases/tag/v8.0.2 https://github.com/babel/babel-loader/releases/tag/v8.0.3 https://github.com/babel/babel-loader/releases/tag/v8.0.4 Bug: T197883 Change-Id: Ie3a5404630fde87ea7fe618a842950ed8c0c6494
This commit is contained in:
parent
301df2cdea
commit
22226f3367
4
.babelrc
4
.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
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
"//": "Set the coverage percentage by category thresholds.",
|
||||
"statements": 90,
|
||||
"branches": 85,
|
||||
"branches": 80,
|
||||
"functions": 85,
|
||||
"lines": 90,
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.json
vendored
BIN
resources/dist/index.js.json
vendored
Binary file not shown.
|
@ -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
|
||||
}
|
||||
|
|
|
@ -50,7 +50,9 @@ const conf = {
|
|||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: { cacheDirectory: true }
|
||||
options: {
|
||||
cacheDirectory: true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue