Remove Babylon plugins for features already merged to the ECMAScript spec (#8448)
These are now enabled by default: - objectRestSpread (2018) - asyncGenerators (2018) - optionalCatchBInding (2019) - jsonStrings (2019) TODO (after this commit): - [ ] Deprecate the `@babel/plugin-syntax-*` packages. - [ ] Deprecate the `@babel/plugin-proposal-*` packages. - [ ] Create the `@babel/plugin-transform-*` packages.
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
// @flow
|
||||
|
||||
const pluginNameMap = {
|
||||
asyncGenerators: {
|
||||
syntax: {
|
||||
name: "@babel/plugin-syntax-async-generators",
|
||||
url: "https://git.io/vb4SY",
|
||||
},
|
||||
transform: {
|
||||
name: "@babel/plugin-proposal-async-generator-functions",
|
||||
url: "https://git.io/vb4yp",
|
||||
},
|
||||
},
|
||||
classProperties: {
|
||||
syntax: {
|
||||
name: "@babel/plugin-syntax-class-properties",
|
||||
@@ -143,26 +133,6 @@ const pluginNameMap = {
|
||||
url: "https://git.io/vb4yS",
|
||||
},
|
||||
},
|
||||
objectRestSpread: {
|
||||
syntax: {
|
||||
name: "@babel/plugin-syntax-object-rest-spread",
|
||||
url: "https://git.io/vb4y5",
|
||||
},
|
||||
transform: {
|
||||
name: "@babel/plugin-proposal-object-rest-spread",
|
||||
url: "https://git.io/vb4Ss",
|
||||
},
|
||||
},
|
||||
optionalCatchBinding: {
|
||||
syntax: {
|
||||
name: "@babel/plugin-syntax-optional-catch-binding",
|
||||
url: "https://git.io/vb4Sn",
|
||||
},
|
||||
transform: {
|
||||
name: "@babel/plugin-proposal-optional-catch-binding",
|
||||
url: "https://git.io/vb4SI",
|
||||
},
|
||||
},
|
||||
optionalChaining: {
|
||||
syntax: {
|
||||
name: "@babel/plugin-syntax-optional-chaining",
|
||||
@@ -203,6 +173,41 @@ const pluginNameMap = {
|
||||
url: "https://git.io/vb4Sm",
|
||||
},
|
||||
},
|
||||
|
||||
// TODO: This plugins are now supported by default by @babel/parser: they can
|
||||
// be removed from this list. Although removing them isn't a breaking change,
|
||||
// it's better to keep a nice error message for users using older versions of
|
||||
// the parser. They can be removed in Babel 8.
|
||||
asyncGenerators: {
|
||||
syntax: {
|
||||
name: "@babel/plugin-syntax-async-generators",
|
||||
url: "https://git.io/vb4SY",
|
||||
},
|
||||
transform: {
|
||||
name: "@babel/plugin-proposal-async-generator-functions",
|
||||
url: "https://git.io/vb4yp",
|
||||
},
|
||||
},
|
||||
objectRestSpread: {
|
||||
syntax: {
|
||||
name: "@babel/plugin-syntax-object-rest-spread",
|
||||
url: "https://git.io/vb4y5",
|
||||
},
|
||||
transform: {
|
||||
name: "@babel/plugin-proposal-object-rest-spread",
|
||||
url: "https://git.io/vb4Ss",
|
||||
},
|
||||
},
|
||||
optionalCatchBinding: {
|
||||
syntax: {
|
||||
name: "@babel/plugin-syntax-optional-catch-binding",
|
||||
url: "https://git.io/vb4Sn",
|
||||
},
|
||||
transform: {
|
||||
name: "@babel/plugin-proposal-optional-catch-binding",
|
||||
url: "https://git.io/vb4SI",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const getNameURLCombination = ({ name, url }) => `${name} (${url})`;
|
||||
|
||||
Reference in New Issue
Block a user