Rename all proposal plugins to -proposal- from -transform- (#6570)

This commit is contained in:
Henry Zhu
2017-10-27 15:26:38 -04:00
committed by GitHub
parent a94aa54230
commit c41abd79a1
599 changed files with 372 additions and 372 deletions

View File

@@ -243,7 +243,7 @@ This option is useful if there is a bug in a native implementation, or a combina
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.
> 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 `transform-do-expressions` or excluding `transform-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.
> 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.
### `exclude`
@@ -253,7 +253,7 @@ An array of plugins to always exclude/remove.
The possible options are the same as the `include` option.
This option is useful for "blacklisting" a transform like `transform-regenerator` if you don't use generators and don't want to include `regeneratorRuntime` (when using `useBuiltIns`) or for using another plugin like [fast-async](https://github.com/MatAtBread/fast-async) instead of [Babel's async-to-gen](http://babeljs.io/docs/plugins/transform-async-generator-functions/).
This option is useful for "blacklisting" a transform like `transform-regenerator` if you don't use generators and don't want to include `regeneratorRuntime` (when using `useBuiltIns`) or for using another plugin like [fast-async](https://github.com/MatAtBread/fast-async) instead of [Babel's async-to-gen](http://babeljs.io/docs/plugins/proposal-async-generator-functions/).
### `useBuiltIns`
@@ -569,4 +569,4 @@ Using polyfills:
## Issues
If you get a `SyntaxError: Unexpected token ...` error when using the [object-rest-spread](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-object-rest-spread) transform then make sure the plugin has been updated to, at least, `v6.19.0`.
If you get a `SyntaxError: Unexpected token ...` error when using the [object-rest-spread](https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-object-rest-spread) transform then make sure the plugin has been updated to, at least, `v6.19.0`.

View File

@@ -228,17 +228,17 @@
"opera": "42",
"electron": "1.6"
},
"transform-async-generator-functions": {
"proposal-async-generator-functions": {
"chrome": "63",
"firefox": "57",
"opera": "50"
},
"transform-object-rest-spread": {
"proposal-object-rest-spread": {
"chrome": "60",
"firefox": "55",
"node": "8.3",
"opera": "47"
},
"transform-optional-catch-binding": {},
"transform-unicode-property-regex": {}
"proposal-optional-catch-binding": {},
"proposal-unicode-property-regex": {}
}

View File

@@ -6,17 +6,17 @@ const builtIns = {
};
const features = {
"transform-async-generator-functions": "Asynchronous Iterators",
"transform-object-rest-spread": "object rest/spread properties",
"transform-optional-catch-binding": "optional catch binding",
"transform-unicode-property-regex": "RegExp Unicode Property Escapes",
"proposal-async-generator-functions": "Asynchronous Iterators",
"proposal-object-rest-spread": "object rest/spread properties",
"proposal-optional-catch-binding": "optional catch binding",
"proposal-unicode-property-regex": "RegExp Unicode Property Escapes",
};
const pluginSyntaxMap = new Map([
["transform-async-generator-functions", "syntax-async-generators"],
["transform-object-rest-spread", "syntax-object-rest-spread"],
["transform-optional-catch-binding", "syntax-optional-catch-binding"],
["transform-unicode-property-regex", null],
["proposal-async-generator-functions", "syntax-async-generators"],
["proposal-object-rest-spread", "syntax-object-rest-spread"],
["proposal-optional-catch-binding", "syntax-optional-catch-binding"],
["proposal-unicode-property-regex", null],
]);
module.exports = { builtIns, features, pluginSyntaxMap };

View File

@@ -15,7 +15,7 @@
"@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-transform-async-generator-functions": "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",
@@ -41,10 +41,10 @@
"@babel/plugin-transform-es2015-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-transform-object-rest-spread": "7.0.0-beta.3",
"@babel/plugin-transform-optional-catch-binding": "7.0.0-beta.3",
"@babel/plugin-proposal-object-rest-spread": "7.0.0-beta.3",
"@babel/plugin-proposal-optional-catch-binding": "7.0.0-beta.3",
"@babel/plugin-transform-regenerator": "7.0.0-beta.3",
"@babel/plugin-transform-unicode-property-regex": "7.0.0-beta.3",
"@babel/plugin-proposal-unicode-property-regex": "7.0.0-beta.3",
"browserslist": "^2.4.0",
"invariant": "^2.2.2",
"semver": "^5.3.0"

View File

@@ -4,7 +4,7 @@ export default {
"syntax-object-rest-spread": require("@babel/plugin-syntax-object-rest-spread"),
"syntax-optional-catch-binding": require("@babel/plugin-syntax-optional-catch-binding"),
"transform-async-to-generator": require("@babel/plugin-transform-async-to-generator"),
"transform-async-generator-functions": require("@babel/plugin-transform-async-generator-functions"),
"proposal-async-generator-functions": require("@babel/plugin-proposal-async-generator-functions"),
"transform-es2015-arrow-functions": require("@babel/plugin-transform-es2015-arrow-functions"),
"transform-es2015-block-scoped-functions": require("@babel/plugin-transform-es2015-block-scoped-functions"),
"transform-es2015-block-scoping": require("@babel/plugin-transform-es2015-block-scoping"),
@@ -29,8 +29,8 @@ export default {
"transform-es2015-unicode-regex": require("@babel/plugin-transform-es2015-unicode-regex"),
"transform-exponentiation-operator": require("@babel/plugin-transform-exponentiation-operator"),
"transform-new-target": require("@babel/plugin-transform-new-target"),
"transform-object-rest-spread": require("@babel/plugin-transform-object-rest-spread"),
"transform-optional-catch-binding": require("@babel/plugin-transform-optional-catch-binding"),
"proposal-object-rest-spread": require("@babel/plugin-proposal-object-rest-spread"),
"proposal-optional-catch-binding": require("@babel/plugin-proposal-optional-catch-binding"),
"transform-regenerator": require("@babel/plugin-transform-regenerator"),
"transform-unicode-property-regex": require("@babel/plugin-transform-unicode-property-regex"),
"proposal-unicode-property-regex": require("@babel/plugin-proposal-unicode-property-regex"),
};

View File

@@ -8,10 +8,10 @@ Using targets:
Using modules transform: commonjs
Using plugins:
transform-async-generator-functions { "chrome":"60" }
proposal-async-generator-functions { "chrome":"60" }
syntax-object-rest-spread { "chrome":"60" }
transform-optional-catch-binding { "chrome":"60" }
transform-unicode-property-regex { "chrome":"60" }
proposal-optional-catch-binding { "chrome":"60" }
proposal-unicode-property-regex { "chrome":"60" }
Using polyfills with `entry` option:

View File

@@ -29,10 +29,10 @@ Using plugins:
transform-regenerator {}
transform-exponentiation-operator {}
transform-async-to-generator {}
transform-async-generator-functions {}
transform-object-rest-spread {}
transform-optional-catch-binding {}
transform-unicode-property-regex {}
proposal-async-generator-functions {}
proposal-object-rest-spread {}
proposal-optional-catch-binding {}
proposal-unicode-property-regex {}
Using polyfills with `entry` option: