Skip to content

Commit

Permalink
remove es20xx prefixes from plugins and rename folders (#6575)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo committed Oct 29, 2017
1 parent 92a3cae commit 9ac326b
Show file tree
Hide file tree
Showing 1,672 changed files with 1,200 additions and 1,203 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -115,7 +115,7 @@ $ TEST_ONLY=babel-cli make test
`TEST_ONLY` will also match substrings of the package name:

```sh
# Run tests for the babel-plugin-transform-es2015-classes package.
# Run tests for the babel-plugin-transform-classes package.
$ TEST_ONLY=es2015-class make test
```

Expand Down
6 changes: 3 additions & 3 deletions experimental/babel-preset-env/README.md
Expand Up @@ -235,13 +235,13 @@ An array of plugins to always include.

Valid options include any:

- [Babel plugins](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js) - both with (`@babel/plugin-transform-es2015-spread`) and without prefix (`transform-es2015-spread`) are supported.
- [Babel plugins](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js) - both with (`@babel/plugin-transform-spread`) and without prefix (`transform-spread`) are supported.

- [Built-ins](https://github.com/babel/babel-preset-env/blob/master/data/built-in-features.js), such as `map`, `set`, or `object.assign`.

This option is useful if there is a bug in a native implementation, or a combination of a non-supported feature + a supported one doesn't work.

For example, Node 4 supports native classes but not spread. If `super` is used with a spread argument, then the `transform-es2015-classes` transform needs to be `include`d, as it is not possible to transpile a spread with `super` otherwise.
For example, Node 4 supports native classes but not spread. If `super` is used with a spread argument, then the `transform-classes` transform needs to be `include`d, as it is not possible to transpile a spread with `super` otherwise.

> NOTE: The `include` and `exclude` options _only_ work with the [plugins included with this preset](https://github.com/babel/babel-preset-env/blob/master/data/plugin-features.js); so, for example, including `proposal-do-expressions` or excluding `proposal-function-bind` will throw errors. To use a plugin _not_ included with this preset, add them to your [config](https://babeljs.io/docs/usage/babelrc/) directly.
Expand Down Expand Up @@ -560,7 +560,7 @@ Using polyfills:
"targets": {
"browsers": ["last 2 versions", "safari >= 7"]
},
"include": ["@babel/transform-es2015-arrow-functions", "es6.map"],
"include": ["@babel/transform-arrow-functions", "es6.map"],
"exclude": ["@babel/transform-regenerator", "es6.set"]

This comment has been minimized.

Copy link
@jdalton

jdalton Nov 9, 2017

Member

Is the name @babel/plugin-transform-block-scoping ? or without the plugin bit.

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Nov 9, 2017

Member

Either one works. Just like in Babel 6 where we'd automatically add babel-plugin-, we'll add plugin- automatically for these. See the table in #5547

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Nov 9, 2017

Member

If you're talking about installing it, you need the full @babel/plugin-transform-regenerator to install the plugin.

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Nov 9, 2017

Member

Oh haha responded too quickly. For the case of preset-env I'm actually not 100% sure. Seems like we'd want to just skip the @babel part, hmmm.

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Nov 9, 2017

Member

Yeah this looks like it probably just got caught in our broad find-replace. These should just be whatever the keys are in https://github.com/babel/babel/blob/master/experimental/babel-preset-env/src/available-plugins.js#L2 so there's no @babel/ or plugin- for the include and exclude lists.

This comment has been minimized.

Copy link
@jdalton

jdalton Nov 9, 2017

Member

Thank you!

This comment has been minimized.

Copy link
@loganfsmyth

loganfsmyth Nov 9, 2017

Member

Filed: #6775

}]
]
Expand Down
38 changes: 19 additions & 19 deletions experimental/babel-preset-env/data/plugin-features.js
@@ -1,101 +1,101 @@
const es2015 = {
"check-es2015-constants": {
"check-constants": {
features: [
"const",
],
},
"transform-es2015-arrow-functions": {
"transform-arrow-functions": {
features: [
"arrow functions",
],
},
"transform-es2015-block-scoped-functions": {
"transform-block-scoped-functions": {
features: [
"block-level function declaration"
],
},
"transform-es2015-block-scoping": {
"transform-block-scoping": {
features: [
"const",
"let",
],
},
"transform-es2015-classes": {
"transform-classes": {
features: [
"class",
"super",
],
},
"transform-es2015-computed-properties": {
"transform-computed-properties": {
features: [
"object literal extensions / computed properties",
],
},
"transform-es2015-destructuring": {
"transform-destructuring": {
features: [
"destructuring, assignment",
"destructuring, declarations",
"destructuring, parameters",
],
},
"transform-es2015-duplicate-keys": {
"transform-duplicate-keys": {
features: [
"miscellaneous / duplicate property names in strict mode",
],
},
"transform-es2015-for-of": {
"transform-for-of": {
features: [
"for..of loops",
],
},
"transform-es2015-function-name": {
"transform-function-name": {
features: [
"function \"name\" property",
]
},
"transform-es2015-literals": {
"transform-literals": {
features: [
"Unicode code point escapes",
],
},
"transform-es2015-object-super": {
"transform-object-super": {
features: [
"super",
],
},
"transform-es2015-parameters": {
"transform-parameters": {
features: [
"default function parameters",
"rest parameters",
],
},
"transform-es2015-shorthand-properties": {
"transform-shorthand-properties": {
features: [
"object literal extensions / shorthand properties",
],
},
"transform-es2015-spread": {
"transform-spread": {
features: [
"spread (...) operator",
],
},
"transform-es2015-sticky-regex": {
"transform-sticky-regex": {
features: [
"RegExp \"y\" and \"u\" flags / \"y\" flag, lastIndex",
"RegExp \"y\" and \"u\" flags / \"y\" flag",
],
},
"transform-es2015-template-literals": {
"transform-template-literals": {
features: [
"template literals",
],
},
"transform-es2015-typeof-symbol": {
"transform-typeof-symbol": {
features: [
"Symbol / typeof support"
],
},
"transform-es2015-unicode-regex": {
"transform-unicode-regex": {
features: [
"RegExp \"y\" and \"u\" flags / \"u\" flag, case folding",
"RegExp \"y\" and \"u\" flags / \"u\" flag, Unicode code point escapes",
Expand Down
38 changes: 19 additions & 19 deletions experimental/babel-preset-env/data/plugins.json
@@ -1,5 +1,5 @@
{
"check-es2015-constants": {
"check-constants": {
"chrome": "49",
"edge": "14",
"firefox": "51",
Expand All @@ -9,7 +9,7 @@
"opera": "36",
"electron": "1"
},
"transform-es2015-arrow-functions": {
"transform-arrow-functions": {
"chrome": "47",
"edge": "13",
"firefox": "45",
Expand All @@ -19,7 +19,7 @@
"opera": "34",
"electron": "0.36"
},
"transform-es2015-block-scoped-functions": {
"transform-block-scoped-functions": {
"chrome": "41",
"edge": "12",
"firefox": "46",
Expand All @@ -30,7 +30,7 @@
"opera": "28",
"electron": "0.24"
},
"transform-es2015-block-scoping": {
"transform-block-scoping": {
"chrome": "49",
"edge": "14",
"firefox": "51",
Expand All @@ -40,7 +40,7 @@
"opera": "36",
"electron": "1"
},
"transform-es2015-classes": {
"transform-classes": {
"chrome": "46",
"edge": "13",
"firefox": "45",
Expand All @@ -50,7 +50,7 @@
"opera": "33",
"electron": "0.36"
},
"transform-es2015-computed-properties": {
"transform-computed-properties": {
"chrome": "44",
"edge": "12",
"firefox": "34",
Expand All @@ -60,7 +60,7 @@
"opera": "31",
"electron": "0.31"
},
"transform-es2015-destructuring": {
"transform-destructuring": {
"chrome": "51",
"firefox": "53",
"safari": "10",
Expand All @@ -69,7 +69,7 @@
"opera": "38",
"electron": "1.2"
},
"transform-es2015-duplicate-keys": {
"transform-duplicate-keys": {
"chrome": "42",
"edge": "12",
"firefox": "34",
Expand All @@ -79,7 +79,7 @@
"opera": "29",
"electron": "0.27"
},
"transform-es2015-for-of": {
"transform-for-of": {
"chrome": "51",
"edge": "15",
"firefox": "53",
Expand All @@ -89,7 +89,7 @@
"opera": "38",
"electron": "1.2"
},
"transform-es2015-function-name": {
"transform-function-name": {
"chrome": "51",
"firefox": "53",
"safari": "10",
Expand All @@ -98,7 +98,7 @@
"opera": "38",
"electron": "1.2"
},
"transform-es2015-literals": {
"transform-literals": {
"chrome": "44",
"edge": "12",
"firefox": "53",
Expand All @@ -108,7 +108,7 @@
"opera": "31",
"electron": "0.31"
},
"transform-es2015-object-super": {
"transform-object-super": {
"chrome": "46",
"edge": "13",
"firefox": "45",
Expand All @@ -118,7 +118,7 @@
"opera": "33",
"electron": "0.36"
},
"transform-es2015-parameters": {
"transform-parameters": {
"chrome": "49",
"edge": "14",
"firefox": "53",
Expand All @@ -128,7 +128,7 @@
"opera": "36",
"electron": "1"
},
"transform-es2015-shorthand-properties": {
"transform-shorthand-properties": {
"chrome": "43",
"edge": "12",
"firefox": "33",
Expand All @@ -138,7 +138,7 @@
"opera": "30",
"electron": "0.29"
},
"transform-es2015-spread": {
"transform-spread": {
"chrome": "46",
"edge": "13",
"firefox": "36",
Expand All @@ -148,7 +148,7 @@
"opera": "33",
"electron": "0.36"
},
"transform-es2015-sticky-regex": {
"transform-sticky-regex": {
"chrome": "49",
"edge": "13",
"firefox": "3",
Expand All @@ -158,7 +158,7 @@
"opera": "36",
"electron": "1"
},
"transform-es2015-template-literals": {
"transform-template-literals": {
"chrome": "41",
"edge": "13",
"firefox": "34",
Expand All @@ -168,7 +168,7 @@
"opera": "28",
"electron": "0.24"
},
"transform-es2015-typeof-symbol": {
"transform-typeof-symbol": {
"chrome": "38",
"edge": "12",
"firefox": "36",
Expand All @@ -178,7 +178,7 @@
"opera": "25",
"electron": "0.2"
},
"transform-es2015-unicode-regex": {
"transform-unicode-regex": {
"chrome": "50",
"edge": "13",
"firefox": "46",
Expand Down
46 changes: 23 additions & 23 deletions experimental/babel-preset-env/package.json
Expand Up @@ -11,34 +11,34 @@
"build-data": "node ./scripts/build-data.js"
},
"dependencies": {
"@babel/plugin-check-es2015-constants": "7.0.0-beta.3",
"@babel/plugin-check-constants": "7.0.0-beta.3",
"@babel/plugin-syntax-async-generators": "7.0.0-beta.3",
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.3",
"@babel/plugin-syntax-optional-catch-binding": "7.0.0-beta.3",
"@babel/plugin-proposal-async-generator-functions": "7.0.0-beta.3",
"@babel/plugin-transform-async-to-generator": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-arrow-functions": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-block-scoped-functions": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-block-scoping": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-classes": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-computed-properties": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-destructuring": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-duplicate-keys": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-for-of": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-function-name": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-literals": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-modules-amd": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-modules-commonjs": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-modules-systemjs": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-modules-umd": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-object-super": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-parameters": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-shorthand-properties": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-spread": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-sticky-regex": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-template-literals": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-typeof-symbol": "7.0.0-beta.3",
"@babel/plugin-transform-es2015-unicode-regex": "7.0.0-beta.3",
"@babel/plugin-transform-arrow-functions": "7.0.0-beta.3",
"@babel/plugin-transform-block-scoped-functions": "7.0.0-beta.3",
"@babel/plugin-transform-block-scoping": "7.0.0-beta.3",
"@babel/plugin-transform-classes": "7.0.0-beta.3",
"@babel/plugin-transform-computed-properties": "7.0.0-beta.3",
"@babel/plugin-transform-destructuring": "7.0.0-beta.3",
"@babel/plugin-transform-duplicate-keys": "7.0.0-beta.3",
"@babel/plugin-transform-for-of": "7.0.0-beta.3",
"@babel/plugin-transform-function-name": "7.0.0-beta.3",
"@babel/plugin-transform-literals": "7.0.0-beta.3",
"@babel/plugin-transform-modules-amd": "7.0.0-beta.3",
"@babel/plugin-transform-modules-commonjs": "7.0.0-beta.3",
"@babel/plugin-transform-modules-systemjs": "7.0.0-beta.3",
"@babel/plugin-transform-modules-umd": "7.0.0-beta.3",
"@babel/plugin-transform-object-super": "7.0.0-beta.3",
"@babel/plugin-transform-parameters": "7.0.0-beta.3",
"@babel/plugin-transform-shorthand-properties": "7.0.0-beta.3",
"@babel/plugin-transform-spread": "7.0.0-beta.3",
"@babel/plugin-transform-sticky-regex": "7.0.0-beta.3",
"@babel/plugin-transform-template-literals": "7.0.0-beta.3",
"@babel/plugin-transform-typeof-symbol": "7.0.0-beta.3",
"@babel/plugin-transform-unicode-regex": "7.0.0-beta.3",
"@babel/plugin-transform-exponentiation-operator": "7.0.0-beta.3",
"@babel/plugin-transform-new-target": "7.0.0-beta.3",
"@babel/plugin-proposal-object-rest-spread": "7.0.0-beta.3",
Expand Down

0 comments on commit 9ac326b

Please sign in to comment.