archive stage 4 parser plugins (#13717)

* archive stage 4 parser plugins

* use npm protocol for archived plugins

* fix: get module.exports from archived plugins

* remove syntax-top-level-await from test options

* use npm syntax-class-static-block
This commit is contained in:
Huáng Jùnliàng
2021-09-01 15:35:24 -04:00
committed by GitHub
parent 804a94f829
commit 1f79784a99
24 changed files with 29 additions and 251 deletions

View File

@@ -31,6 +31,7 @@
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*",
"@babel/plugin-syntax-class-static-block": "^7.14.5",
"@babel/preset-env": "workspace:*"
},
"engines": {

View File

@@ -1,4 +1,7 @@
{
"plugins": ["proposal-class-properties", "syntax-class-static-block"],
"plugins": [
"proposal-class-properties",
"@babel/plugin-syntax-class-static-block"
],
"throws": "Static class blocks are not enabled. Please add `@babel/plugin-proposal-class-static-block` to your configuration."
}

View File

@@ -21,7 +21,7 @@
"dependencies": {
"@babel/helper-create-class-features-plugin": "workspace:^7.14.5",
"@babel/helper-plugin-utils": "workspace:^7.14.5",
"@babel/plugin-syntax-class-static-block": "workspace:^7.14.5"
"@babel/plugin-syntax-class-static-block": "^7.14.5"
},
"peerDependencies": {
"@babel/core": "^7.12.0"

View File

@@ -29,7 +29,7 @@ export default declare(({ types: t, template, assertVersion }) => {
return {
name: "proposal-class-static-block",
inherits: syntaxClassStaticBlock,
inherits: syntaxClassStaticBlock.default,
pre() {
// Enable this in @babel/helper-create-class-features-plugin, so that it

View File

@@ -20,7 +20,7 @@
"@babel/helper-annotate-as-pure": "workspace:^7.14.5",
"@babel/helper-create-class-features-plugin": "workspace:^7.14.5",
"@babel/helper-plugin-utils": "workspace:^7.14.5",
"@babel/plugin-syntax-private-property-in-object": "workspace:^7.14.5"
"@babel/plugin-syntax-private-property-in-object": "^7.14.5"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"

View File

@@ -84,7 +84,7 @@ export default declare(({ assertVersion, types: t, template }, { loose }) => {
return {
name: "proposal-private-property-in-object",
inherits: syntaxPlugin,
inherits: syntaxPlugin.default,
pre() {
// Enable this in @babel/helper-create-class-features-plugin, so that it
// can be handled by the private fields and methods transform.

View File

@@ -1,3 +0,0 @@
src
test
*.log

View File

@@ -1,19 +0,0 @@
# @babel/plugin-syntax-class-static-block
> Allow parsing of class static blocks
See our website [@babel/plugin-syntax-class-static-block](https://babeljs.io/docs/en/babel-plugin-syntax-class-static-block) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-syntax-class-static-block
```
or using yarn:
```sh
yarn add @babel/plugin-syntax-class-static-block --dev
```

View File

@@ -1,32 +0,0 @@
{
"name": "@babel/plugin-syntax-class-static-block",
"version": "7.14.5",
"description": "Allow parsing of class static blocks",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-plugin-syntax-class-static-block"
},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-syntax-class-static-block",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"exports": {
".": "./lib/index.js"
},
"keywords": [
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "workspace:^7.14.5"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
}

View File

@@ -1,13 +0,0 @@
import { declare } from "@babel/helper-plugin-utils";
export default declare(api => {
api.assertVersion(7);
return {
name: "syntax-class-static-block",
manipulateOptions(opts, parserOpts) {
parserOpts.plugins.push("classStaticBlock");
},
};
});

View File

@@ -1,3 +0,0 @@
src
test
*.log

View File

@@ -1,19 +0,0 @@
# @babel/plugin-syntax-private-property-in-object
> Allow parsing of '#foo in obj' brand checks
See our website [@babel/plugin-syntax-private-property-in-object](https://babeljs.io/docs/en/babel-plugin-syntax-private-property-in-object) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-syntax-private-property-in-object
```
or using yarn:
```sh
yarn add @babel/plugin-syntax-private-property-in-object --dev
```

View File

@@ -1,32 +0,0 @@
{
"name": "@babel/plugin-syntax-private-property-in-object",
"version": "7.14.5",
"description": "Allow parsing of '#foo in obj' brand checks",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-plugin-syntax-private-property-in-object"
},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-syntax-private-property-in-object",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"exports": {
".": "./lib/index.js"
},
"keywords": [
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "workspace:^7.14.5"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
}

View File

@@ -1,13 +0,0 @@
import { declare } from "@babel/helper-plugin-utils";
export default declare(api => {
api.assertVersion(7);
return {
name: "syntax-private-property-in-object",
manipulateOptions(opts, parserOpts) {
parserOpts.plugins.push("privateIn");
},
};
});

View File

@@ -1,3 +0,0 @@
node_modules
*.log
src

View File

@@ -1,19 +0,0 @@
# @babel/plugin-syntax-top-level-await
> Allow parsing of top-level await in modules
See our website [@babel/plugin-syntax-top-level-await](https://babeljs.io/docs/en/babel-plugin-syntax-top-level-await) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-syntax-top-level-await
```
or using yarn:
```sh
yarn add @babel/plugin-syntax-top-level-await --dev
```

View File

@@ -1,32 +0,0 @@
{
"name": "@babel/plugin-syntax-top-level-await",
"version": "7.14.5",
"description": "Allow parsing of top-level await in modules",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-plugin-syntax-top-level-await"
},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-syntax-top-level-await",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"keywords": [
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "workspace:^7.14.5"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
}

View File

@@ -1,13 +0,0 @@
import { declare } from "@babel/helper-plugin-utils";
export default declare(api => {
api.assertVersion(7);
return {
name: "syntax-top-level-await",
manipulateOptions(opts, parserOpts) {
parserOpts.plugins.push("topLevelAwait");
},
};
});

View File

@@ -28,6 +28,7 @@
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*",
"@babel/plugin-external-helpers": "workspace:*",
"@babel/plugin-syntax-class-static-block": "^7.14.5",
"@babel/plugin-syntax-object-rest-spread": "^7.8.3"
},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-modules-commonjs",

View File

@@ -1,3 +1,6 @@
{
"plugins": ["transform-modules-commonjs", "syntax-class-static-block"]
"plugins": [
"transform-modules-commonjs",
"@babel/plugin-syntax-class-static-block"
]
}

View File

@@ -1,3 +1,3 @@
{
"plugins": ["transform-modules-systemjs", "syntax-top-level-await"]
"plugins": ["transform-modules-systemjs"]
}

View File

@@ -38,7 +38,7 @@
"@babel/plugin-proposal-unicode-property-regex": "workspace:^7.14.5",
"@babel/plugin-syntax-async-generators": "^7.8.4",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-syntax-class-static-block": "workspace:^7.14.5",
"@babel/plugin-syntax-class-static-block": "^7.14.5",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-export-namespace-from": "^7.8.3",
"@babel/plugin-syntax-json-strings": "^7.8.3",
@@ -48,8 +48,8 @@
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
"@babel/plugin-syntax-optional-chaining": "^7.8.3",
"@babel/plugin-syntax-private-property-in-object": "workspace:^7.14.5",
"@babel/plugin-syntax-top-level-await": "workspace:^7.14.5",
"@babel/plugin-syntax-private-property-in-object": "^7.14.5",
"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@babel/plugin-transform-arrow-functions": "workspace:^7.14.5",
"@babel/plugin-transform-async-to-generator": "workspace:^7.14.5",
"@babel/plugin-transform-block-scoped-functions": "workspace:^7.14.5",

View File

@@ -34,7 +34,7 @@
"@babel/plugin-proposal-unicode-property-regex": "workspace:*",
"@babel/plugin-syntax-async-generators": "^7.8.4",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-syntax-class-static-block": "workspace:*",
"@babel/plugin-syntax-class-static-block": "^7.14.5",
"@babel/plugin-syntax-decimal": "workspace:*",
"@babel/plugin-syntax-decorators": "workspace:*",
"@babel/plugin-syntax-do-expressions": "workspace:*",
@@ -50,7 +50,7 @@
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
"@babel/plugin-syntax-pipeline-operator": "workspace:*",
"@babel/plugin-syntax-record-and-tuple": "workspace:*",
"@babel/plugin-syntax-top-level-await": "workspace:*",
"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@babel/plugin-syntax-typescript": "workspace:*",
"@babel/plugin-transform-arrow-functions": "workspace:*",
"@babel/plugin-transform-async-to-generator": "workspace:*",