Skip to content

Commit

Permalink
Rename all proposal plugins to -proposal- from -transform-
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo committed Oct 27, 2017
1 parent a94aa54 commit 0450a73
Show file tree
Hide file tree
Showing 599 changed files with 372 additions and 372 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ If you need to check for an error that is thrown you can add to the `options.jso
```js
// options.json example
{
"plugins": [["@babel/transform-object-rest-spread", { "useBuiltIns": "invalidOption" }]],
"throws": "@babel/transform-object-rest-spread currently only accepts a boolean option for useBuiltIns (defaults to false)"
"plugins": [["@babel/proposal-object-rest-spread", { "useBuiltIns": "invalidOption" }]],
"throws": "@babel/proposal-object-rest-spread currently only accepts a boolean option for useBuiltIns (defaults to false)"
}
```

Expand Down
6 changes: 3 additions & 3 deletions experimental/babel-preset-env/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand All @@ -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`

Expand Down Expand Up @@ -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`.
8 changes: 4 additions & 4 deletions experimental/babel-preset-env/data/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {}
}
16 changes: 8 additions & 8 deletions experimental/babel-preset-env/data/shipped-proposals.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
8 changes: 4 additions & 4 deletions experimental/babel-preset-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions experimental/babel-preset-env/src/available-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
};
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @babel/plugin-transform-async-generator-functions
# @babel/plugin-proposal-async-generator-functions

> Turn async generator functions and for-await statements to ES2015 generators
Expand Down Expand Up @@ -73,7 +73,7 @@ forEach(genAnswers(), function(val) { output += val.value })
## Installation

```sh
npm install --save-dev @babel/plugin-transform-async-generator-functions
npm install --save-dev @babel/plugin-proposal-async-generator-functions
```

## Usage
Expand All @@ -84,21 +84,21 @@ npm install --save-dev @babel/plugin-transform-async-generator-functions

```json
{
"plugins": ["@babel/transform-async-generator-functions"]
"plugins": ["@babel/proposal-async-generator-functions"]
}
```

### Via CLI

```sh
babel --plugins @babel/transform-async-generator-functions script.js
babel --plugins @babel/proposal-async-generator-functions script.js
```

### Via Node API

```javascript
require("@babel/core").transform("code", {
plugins: ["@babel/transform-async-generator-functions"]
plugins: ["@babel/proposal-async-generator-functions"]
});
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@babel/plugin-transform-async-generator-functions",
"name": "@babel/plugin-proposal-async-generator-functions",
"version": "7.0.0-beta.3",
"description": "Turn async generator functions into ES2015 generators",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-async-generator-functions",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-async-generator-functions",
"license": "MIT",
"main": "lib/index.js",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"plugins": [
"transform-async-to-generator",
"transform-async-generator-functions"
"proposal-async-generator-functions"
],
"presets": ["es2015"],
"parserOpts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "proposal-async-generator-functions"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"plugins": [
"external-helpers",
"transform-async-to-generator",
"transform-async-generator-functions"
"proposal-async-generator-functions"
],
"presets": ["es2015"],
"parserOpts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"plugins": [
"external-helpers",
"transform-async-to-generator",
"transform-async-generator-functions"
"proposal-async-generator-functions"
],
"presets": ["es2015"],
"parserOpts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"plugins": [
"external-helpers",
"transform-async-to-generator",
"transform-async-generator-functions"
"proposal-async-generator-functions"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"plugins": [
"external-helpers",
"transform-async-to-generator",
["transform-class-properties", {"loose": true}]
"proposal-async-generator-functions"
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @babel/plugin-transform-class-properties
# @babel/plugin-proposal-class-properties

> This plugin transforms class properties
Expand Down Expand Up @@ -37,7 +37,7 @@ Below is a class with four class properties which will be transformed.
## Installation

```sh
npm install --save-dev @babel/plugin-transform-class-properties
npm install --save-dev @babel/plugin-proposal-class-properties
```

## Usage
Expand All @@ -50,7 +50,7 @@ Without options:

```json
{
"plugins": ["@babel/transform-class-properties"]
"plugins": ["@babel/proposal-class-properties"]
}
```

Expand All @@ -59,22 +59,22 @@ With options:
```json
{
"plugins": [
["@babel/transform-class-properties", { "loose": true }]
["@babel/proposal-class-properties", { "loose": true }]
]
}
```

### Via CLI

```sh
babel --plugins @babel/transform-class-properties script.js
babel --plugins @babel/proposal-class-properties script.js
```

### Via Node API

```javascript
require("@babel/core").transform("code", {
plugins: ["@babel/transform-class-properties"]
plugins: ["@babel/proposal-class-properties"]
});
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@babel/plugin-transform-class-properties",
"name": "@babel/plugin-proposal-class-properties",
"version": "7.0.0-beta.3",
"description": "This plugin transforms static class properties as well as properties declared with the property initializer syntax",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-class-properties",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-class-properties",
"license": "MIT",
"main": "lib/index.js",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["transform-typescript", ["proposal-class-properties", {"loose": true }]]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["transform-typescript", "proposal-class-properties"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"plugins": ["external-helpers", "proposal-class-properties"],
"presets": ["stage-0", "es2015"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "proposal-class-properties", "transform-es2015-classes", "transform-es2015-block-scoping", "syntax-class-properties"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"plugins": [
"external-helpers",
"transform-async-to-generator",
["transform-class-properties"]
["proposal-class-properties"]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"plugins": ["external-helpers", ["proposal-class-properties", {"loose": true}]],
"presets": ["es2015"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", ["proposal-class-properties", {"loose": true}], "transform-es2015-classes", "transform-es2015-block-scoping", "syntax-class-properties"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "proposal-class-properties", "transform-es2015-arrow-functions"]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"plugins": ["external-helpers", ["transform-class-properties", {"loose": true}], "transform-es2015-classes", "transform-es2015-block-scoping", "syntax-class-properties"]
"plugins": ["external-helpers", ["proposal-class-properties", {"loose": true}], "transform-es2015-classes", "transform-es2015-block-scoping", "syntax-class-properties"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", ["proposal-class-properties", {"loose": true}], "transform-es2015-classes", "transform-es2015-block-scoping", "syntax-class-properties"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": [
"external-helpers",
"transform-async-to-generator",
["proposal-class-properties", {"loose": true}]
]
}
Loading

0 comments on commit 0450a73

Please sign in to comment.