From eab0a1fadbbe71355cc16d753ecab1406066e119 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Mon, 16 Oct 2017 18:18:36 -0400 Subject: [PATCH] Scoped: remove old references to default enabled syntax plugins, fix bootstrap [skip ci] --- .../.npmignore | 3 -- .../README.md | 35 ------------------- .../src/index.js | 7 ---- .../package.json | 3 +- .../src/index.js | 3 -- .../package.json | 1 - .../src/index.js | 3 -- .../package.json | 3 +- .../src/index.js | 3 -- packages/babel-preset-es2017/src/index.js | 2 +- packages/babel-preset-stage-3/src/index.js | 2 +- packages/babel-standalone/package.json | 5 --- packages/babel-standalone/src/index.js | 5 --- 13 files changed, 4 insertions(+), 71 deletions(-) delete mode 100644 packages/babel-plugin-transform-async-functions/.npmignore delete mode 100644 packages/babel-plugin-transform-async-functions/README.md delete mode 100644 packages/babel-plugin-transform-async-functions/src/index.js diff --git a/packages/babel-plugin-transform-async-functions/.npmignore b/packages/babel-plugin-transform-async-functions/.npmignore deleted file mode 100644 index f980694583..0000000000 --- a/packages/babel-plugin-transform-async-functions/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -*.log diff --git a/packages/babel-plugin-transform-async-functions/README.md b/packages/babel-plugin-transform-async-functions/README.md deleted file mode 100644 index 1ff290cdc1..0000000000 --- a/packages/babel-plugin-transform-async-functions/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# @babel/plugin-transform-async-functions - -> Compile async functions to ES5 - -## Installation - -```sh -npm install --save-dev @babel/plugin-transform-async-functions -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-async-functions"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-async-functions script.js -``` - -### Via Node API - -```javascript -require("@babel/core").transform("code", { - plugins: ["transform-async-functions"] -}); -``` diff --git a/packages/babel-plugin-transform-async-functions/src/index.js b/packages/babel-plugin-transform-async-functions/src/index.js deleted file mode 100644 index 528b797773..0000000000 --- a/packages/babel-plugin-transform-async-functions/src/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import asyncSyntaxPlugin from "@babel/plugin-syntax-async-functions"; - -export default function() { - return { - inherits: asyncSyntaxPlugin, - }; -} diff --git a/packages/babel-plugin-transform-async-to-generator/package.json b/packages/babel-plugin-transform-async-to-generator/package.json index ca370d8795..5a125c7a95 100644 --- a/packages/babel-plugin-transform-async-to-generator/package.json +++ b/packages/babel-plugin-transform-async-to-generator/package.json @@ -9,8 +9,7 @@ "babel-plugin" ], "dependencies": { - "@babel/helper-remap-async-to-generator": "7.0.0-beta.3", - "babel-plugin-syntax-async-functions": "7.0.0-beta.0" + "@babel/helper-remap-async-to-generator": "7.0.0-beta.3" }, "devDependencies": { "@babel/helper-plugin-test-runner": "7.0.0-beta.3" diff --git a/packages/babel-plugin-transform-async-to-generator/src/index.js b/packages/babel-plugin-transform-async-to-generator/src/index.js index 8243033af1..29154457d1 100644 --- a/packages/babel-plugin-transform-async-to-generator/src/index.js +++ b/packages/babel-plugin-transform-async-to-generator/src/index.js @@ -1,10 +1,7 @@ import remapAsyncToGenerator from "@babel/helper-remap-async-to-generator"; -import syntaxAsyncFunctions from "@babel/plugin-syntax-async-functions"; export default function() { return { - inherits: syntaxAsyncFunctions, - visitor: { Function(path, state) { if (!path.node.async || path.node.generator) return; diff --git a/packages/babel-plugin-transform-async-to-module-method/package.json b/packages/babel-plugin-transform-async-to-module-method/package.json index 62bec6d746..e11529fc5a 100644 --- a/packages/babel-plugin-transform-async-to-module-method/package.json +++ b/packages/babel-plugin-transform-async-to-module-method/package.json @@ -11,7 +11,6 @@ "dependencies": { "@babel/helper-module-imports": "7.0.0-beta.3", "@babel/helper-remap-async-to-generator": "7.0.0-beta.3", - "babel-plugin-syntax-async-functions": "7.0.0-beta.0", "@babel/types": "7.0.0-beta.3" }, "devDependencies": { diff --git a/packages/babel-plugin-transform-async-to-module-method/src/index.js b/packages/babel-plugin-transform-async-to-module-method/src/index.js index d3869b2134..c116fd30ba 100644 --- a/packages/babel-plugin-transform-async-to-module-method/src/index.js +++ b/packages/babel-plugin-transform-async-to-module-method/src/index.js @@ -1,13 +1,10 @@ import remapAsyncToGenerator from "@babel/helper-remap-async-to-generator"; -import syntaxAsyncFunctions from "@babel/plugin-syntax-async-functions"; import { addNamed } from "@babel/helper-module-imports"; export default function({ types: t }, options) { const { method, module } = options; return { - inherits: syntaxAsyncFunctions, - visitor: { Function(path, state) { if (!path.node.async || path.node.generator) return; diff --git a/packages/babel-plugin-transform-exponentiation-operator/package.json b/packages/babel-plugin-transform-exponentiation-operator/package.json index fc8290cc23..2dc3d30716 100644 --- a/packages/babel-plugin-transform-exponentiation-operator/package.json +++ b/packages/babel-plugin-transform-exponentiation-operator/package.json @@ -9,8 +9,7 @@ "babel-plugin" ], "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "7.0.0-beta.3", - "babel-plugin-syntax-exponentiation-operator": "7.0.0-beta.0" + "@babel/helper-builder-binary-assignment-operator-visitor": "7.0.0-beta.3" }, "devDependencies": { "@babel/helper-plugin-test-runner": "7.0.0-beta.3" diff --git a/packages/babel-plugin-transform-exponentiation-operator/src/index.js b/packages/babel-plugin-transform-exponentiation-operator/src/index.js index 786c3f6561..6f27305d85 100644 --- a/packages/babel-plugin-transform-exponentiation-operator/src/index.js +++ b/packages/babel-plugin-transform-exponentiation-operator/src/index.js @@ -1,10 +1,7 @@ import build from "@babel/helper-builder-binary-assignment-operator-visitor"; -import syntaxExponentiationOperator from "@babel/plugin-syntax-exponentiation-operator"; export default function({ types: t }) { return { - inherits: syntaxExponentiationOperator, - visitor: build({ operator: "**", diff --git a/packages/babel-preset-es2017/src/index.js b/packages/babel-preset-es2017/src/index.js index 4e75713777..fea8b272df 100644 --- a/packages/babel-preset-es2017/src/index.js +++ b/packages/babel-preset-es2017/src/index.js @@ -1,4 +1,4 @@ -import syntaxTrailingFunctionCommas from "@babel/plugin-syntax-trailing-function-commas"; +import syntaxTrailingFunctionCommas from "babel-plugin-syntax-trailing-function-commas"; import transformAsyncToGenerator from "@babel/plugin-transform-async-to-generator"; export default function() { diff --git a/packages/babel-preset-stage-3/src/index.js b/packages/babel-preset-stage-3/src/index.js index 4c1a21cc5b..cf63eb5a08 100644 --- a/packages/babel-preset-stage-3/src/index.js +++ b/packages/babel-preset-stage-3/src/index.js @@ -3,7 +3,7 @@ import transformAsyncGeneratorFunctions from "@babel/plugin-transform-async-gene import transformClassProperties from "@babel/plugin-transform-class-properties"; import transformObjectRestSpread from "@babel/plugin-transform-object-rest-spread"; import transformOptionalCatchBinding from "@babel/plugin-transform-optional-catch-binding"; -import transformUnicodePropertyRegex from "@babel/plugin-transform-unicode-property-regex"; +import transformUnicodePropertyRegex from "babel-plugin-transform-unicode-property-regex"; export default function() { return { diff --git a/packages/babel-standalone/package.json b/packages/babel-standalone/package.json index 8908463f46..66257a026b 100644 --- a/packages/babel-standalone/package.json +++ b/packages/babel-standalone/package.json @@ -13,13 +13,11 @@ "@babel/plugin-check-es2015-constants": "7.0.0-beta.3", "@babel/plugin-external-helpers": "7.0.0-beta.3", "babel-plugin-inline-replace-variables": "1.3.1", - "babel-plugin-syntax-async-functions": "7.0.0-beta.0", "@babel/plugin-syntax-async-generators": "7.0.0-beta.3", "@babel/plugin-syntax-class-properties": "7.0.0-beta.3", "@babel/plugin-syntax-decorators": "7.0.0-beta.3", "@babel/plugin-syntax-do-expressions": "7.0.0-beta.3", "@babel/plugin-syntax-dynamic-import": "7.0.0-beta.3", - "babel-plugin-syntax-exponentiation-operator": "7.0.0-beta.0", "@babel/plugin-syntax-export-extensions": "7.0.0-beta.3", "@babel/plugin-syntax-flow": "7.0.0-beta.3", "@babel/plugin-syntax-function-bind": "7.0.0-beta.3", @@ -27,8 +25,6 @@ "@babel/plugin-syntax-jsx": "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-syntax-trailing-function-commas": "7.0.0-beta.0", - "@babel/plugin-transform-async-functions": "7.0.0-beta.3", "@babel/plugin-transform-async-generator-functions": "7.0.0-beta.3", "@babel/plugin-transform-async-to-generator": "7.0.0-beta.3", "@babel/plugin-transform-async-to-module-method": "7.0.0-beta.3", @@ -63,7 +59,6 @@ "@babel/plugin-transform-es5-property-mutators": "7.0.0-beta.3", "@babel/plugin-transform-eval": "7.0.0-beta.3", "@babel/plugin-transform-exponentiation-operator": "7.0.0-beta.3", - "babel-plugin-transform-export-extensions": "7.0.0-alpha.19", "@babel/plugin-transform-flow-comments": "7.0.0-beta.3", "@babel/plugin-transform-flow-strip-types": "7.0.0-beta.3", "@babel/plugin-transform-function-bind": "7.0.0-beta.3", diff --git a/packages/babel-standalone/src/index.js b/packages/babel-standalone/src/index.js index da40bf7bf0..6e33f20ebe 100644 --- a/packages/babel-standalone/src/index.js +++ b/packages/babel-standalone/src/index.js @@ -140,13 +140,11 @@ export function registerPresets(newPresets) { registerPlugins({ "check-es2015-constants": require("@babel/plugin-check-es2015-constants"), "external-helpers": require("@babel/plugin-external-helpers"), - "syntax-async-functions": require("@babel/plugin-syntax-async-functions"), "syntax-async-generators": require("@babel/plugin-syntax-async-generators"), "syntax-class-properties": require("@babel/plugin-syntax-class-properties"), "syntax-decorators": require("@babel/plugin-syntax-decorators"), "syntax-do-expressions": require("@babel/plugin-syntax-do-expressions"), "syntax-dynamic-import": require("@babel/plugin-syntax-dynamic-import"), - "syntax-exponentiation-operator": require("@babel/plugin-syntax-exponentiation-operator"), "syntax-export-extensions": require("@babel/plugin-syntax-export-extensions"), "syntax-flow": require("@babel/plugin-syntax-flow"), "syntax-function-bind": require("@babel/plugin-syntax-function-bind"), @@ -154,8 +152,6 @@ registerPlugins({ "syntax-jsx": require("@babel/plugin-syntax-jsx"), "syntax-object-rest-spread": require("@babel/plugin-syntax-object-rest-spread"), "syntax-optional-catch-binding": require("@babel/plugin-syntax-optional-catch-binding"), - "syntax-trailing-function-commas": require("@babel/plugin-syntax-trailing-function-commas"), - "transform-async-functions": require("@babel/plugin-transform-async-functions"), "transform-async-to-generator": require("@babel/plugin-transform-async-to-generator"), "transform-async-to-module-method": require("@babel/plugin-transform-async-to-module-method"), "transform-class-properties": require("@babel/plugin-transform-class-properties"), @@ -189,7 +185,6 @@ registerPlugins({ "transform-es5-property-mutators": require("@babel/plugin-transform-es5-property-mutators"), "transform-eval": require("@babel/plugin-transform-eval"), "transform-exponentiation-operator": require("@babel/plugin-transform-exponentiation-operator"), - "transform-export-extensions": require("@babel/plugin-transform-export-extensions"), "transform-flow-comments": require("@babel/plugin-transform-flow-comments"), "transform-flow-strip-types": require("@babel/plugin-transform-flow-strip-types"), "transform-function-bind": require("@babel/plugin-transform-function-bind"),