Add support for transform-named-capturing-groups-regex in preset-env (#9345)

This commit is contained in:
Brian Ng 2019-01-17 19:51:38 -06:00 committed by GitHub
parent e9588061d7
commit b92ad318f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 34 additions and 6 deletions

View File

@ -10,6 +10,7 @@
],
"devDependencies": {
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.2.5",
"@babel/plugin-transform-new-target": "^7.0.0",
"@babel/preset-env": "^7.2.3",
"@babel/standalone": "^7.2.5"

View File

@ -1,6 +1,7 @@
import { availablePlugins, registerPlugin } from "@babel/standalone";
const notIncludedPlugins = {
"transform-named-capturing-groups-regex": require("@babel/plugin-transform-named-capturing-groups-regex"),
"transform-new-target": require("@babel/plugin-transform-new-target"),
"proposal-json-strings": require("@babel/plugin-proposal-json-strings"),
};

View File

@ -98,6 +98,7 @@ const es = {
"proposal-json-strings": "JSON superset",
"proposal-optional-catch-binding": "optional catch binding",
"transform-named-capturing-groups-regex": "RegExp named capture groups",
};
const proposals = require("./shipped-proposals").features;

View File

@ -270,5 +270,13 @@
"ios": "11.3",
"opera": "53",
"electron": "3"
},
"transform-named-capturing-groups-regex": {
"chrome": "64",
"safari": "11.1",
"node": "10.13",
"ios": "11.3",
"opera": "51",
"electron": "3"
}
}

View File

@ -42,6 +42,7 @@
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
"@babel/plugin-transform-modules-systemjs": "^7.2.0",
"@babel/plugin-transform-modules-umd": "^7.2.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.2.5",
"@babel/plugin-transform-new-target": "^7.0.0",
"@babel/plugin-transform-object-super": "^7.2.0",
"@babel/plugin-transform-parameters": "^7.2.0",

View File

@ -21,6 +21,7 @@ export default {
"transform-modules-commonjs": require("@babel/plugin-transform-modules-commonjs"),
"transform-modules-systemjs": require("@babel/plugin-transform-modules-systemjs"),
"transform-modules-umd": require("@babel/plugin-transform-modules-umd"),
"transform-named-capturing-groups-regex": require("@babel/plugin-transform-named-capturing-groups-regex"),
"transform-object-super": require("@babel/plugin-transform-object-super"),
"transform-parameters": require("@babel/plugin-transform-parameters"),
"transform-shorthand-properties": require("@babel/plugin-transform-shorthand-properties"),

View File

@ -36,6 +36,7 @@ Using plugins:
proposal-unicode-property-regex { "android":"4" }
proposal-json-strings { "android":"4" }
proposal-optional-catch-binding { "android":"4" }
transform-named-capturing-groups-regex { "android":"4" }
Using polyfills with `entry` option:

View File

@ -19,8 +19,9 @@ Using plugins:
proposal-unicode-property-regex { "node":"6" }
proposal-json-strings { "node":"6" }
proposal-optional-catch-binding { "node":"6" }
transform-named-capturing-groups-regex { "node":"6" }
Using polyfills with `entry` option:
[<CWD>/src/in.js] `import '@babel/polyfill'` was not found.
Successfully compiled 1 file with Babel.
Successfully compiled 1 file with Babel.

View File

@ -39,6 +39,7 @@ Using plugins:
proposal-unicode-property-regex { "chrome":"55" }
proposal-json-strings { "chrome":"55" }
proposal-optional-catch-binding { "chrome":"55" }
transform-named-capturing-groups-regex { "chrome":"55" }
Using polyfills with `entry` option:

View File

@ -38,6 +38,7 @@ Using plugins:
proposal-unicode-property-regex { "chrome":"54", "ie":"10", "node":"6" }
proposal-json-strings { "chrome":"54", "ie":"10", "node":"6" }
proposal-optional-catch-binding { "chrome":"54", "ie":"10", "node":"6" }
transform-named-capturing-groups-regex { "chrome":"54", "ie":"10", "node":"6" }
Using polyfills with `entry` option:

View File

@ -31,6 +31,7 @@ Using plugins:
proposal-unicode-property-regex { "electron":"0.36" }
proposal-json-strings { "electron":"0.36" }
proposal-optional-catch-binding { "electron":"0.36" }
transform-named-capturing-groups-regex { "electron":"0.36" }
Using polyfills with `entry` option:

View File

@ -36,6 +36,7 @@ Using plugins:
proposal-unicode-property-regex { "chrome":"55" }
proposal-json-strings { "chrome":"55" }
proposal-optional-catch-binding { "chrome":"55" }
transform-named-capturing-groups-regex { "chrome":"55" }
Using polyfills with `entry` option:

View File

@ -26,6 +26,7 @@ Using plugins:
proposal-unicode-property-regex { "firefox":"52", "node":"7.4" }
proposal-json-strings { "firefox":"52", "node":"7.4" }
proposal-optional-catch-binding { "firefox":"52", "node":"7.4" }
transform-named-capturing-groups-regex { "firefox":"52", "node":"7.4" }
Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set.
Successfully compiled 1 file with Babel.
Successfully compiled 1 file with Babel.

View File

@ -14,6 +14,7 @@ Using plugins:
proposal-unicode-property-regex { "chrome":"60" }
proposal-json-strings { "chrome":"60" }
proposal-optional-catch-binding { "chrome":"60" }
transform-named-capturing-groups-regex { "chrome":"60" }
Using polyfills with `entry` option:
@ -29,4 +30,4 @@ Using polyfills with `entry` option:
web.timers { "chrome":"60" }
web.immediate { "chrome":"60" }
web.dom.iterable { "chrome":"60" }
Successfully compiled 1 file with Babel.
Successfully compiled 1 file with Babel.

View File

@ -34,6 +34,7 @@ Using plugins:
proposal-unicode-property-regex {}
proposal-json-strings {}
proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {}
Using polyfills with `entry` option:
@ -183,4 +184,4 @@ Using polyfills with `entry` option:
web.timers {}
web.immediate {}
web.dom.iterable {}
Successfully compiled 1 file with Babel.
Successfully compiled 1 file with Babel.

View File

@ -41,6 +41,7 @@ Using plugins:
proposal-unicode-property-regex { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
proposal-json-strings { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
proposal-optional-catch-binding { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
transform-named-capturing-groups-regex { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
Using polyfills with `entry` option:

View File

@ -37,10 +37,11 @@ Using plugins:
proposal-unicode-property-regex { "chrome":"52", "firefox":"50", "ie":"11" }
proposal-json-strings { "chrome":"52", "firefox":"50", "ie":"11" }
proposal-optional-catch-binding { "chrome":"52", "firefox":"50", "ie":"11" }
transform-named-capturing-groups-regex { "chrome":"52", "firefox":"50", "ie":"11" }
Using polyfills with `usage` option:
[<CWD>/src/in.js] Based on your code and targets, none were added.
[<CWD>/src/in2.js] Based on your code and targets, none were added.
Successfully compiled 2 files with Babel.
Successfully compiled 2 files with Babel.

View File

@ -14,8 +14,9 @@ Using plugins:
proposal-unicode-property-regex { "chrome":"55" }
proposal-json-strings { "chrome":"55" }
proposal-optional-catch-binding { "chrome":"55" }
transform-named-capturing-groups-regex { "chrome":"55" }
Using polyfills with `usage` option:
[<CWD>/src/in.js] Based on your code and targets, none were added.
Successfully compiled 1 file with Babel.
Successfully compiled 1 file with Babel.

View File

@ -37,6 +37,7 @@ Using plugins:
proposal-unicode-property-regex { "chrome":"52", "firefox":"50", "ie":"11" }
proposal-json-strings { "chrome":"52", "firefox":"50", "ie":"11" }
proposal-optional-catch-binding { "chrome":"52", "firefox":"50", "ie":"11" }
transform-named-capturing-groups-regex { "chrome":"52", "firefox":"50", "ie":"11" }
Using polyfills with `usage` option:

View File

@ -47,6 +47,7 @@ Using plugins:
proposal-unicode-property-regex { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
proposal-json-strings { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
proposal-optional-catch-binding { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
transform-named-capturing-groups-regex { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
Using polyfills with `entry` option:

View File

@ -38,6 +38,7 @@ Using plugins:
proposal-unicode-property-regex { "chrome":"54", "ie":"10", "node":"6.10" }
proposal-json-strings { "chrome":"54", "ie":"10", "node":"6.10" }
proposal-optional-catch-binding { "chrome":"54", "ie":"10", "node":"6.10" }
transform-named-capturing-groups-regex { "chrome":"54", "ie":"10", "node":"6.10" }
Using polyfills with `entry` option: