Skip to content

Commit

Permalink
Archive plugins (#12117)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Oct 9, 2020
1 parent ebec7c8 commit 62965e3
Show file tree
Hide file tree
Showing 24 changed files with 28 additions and 288 deletions.
4 changes: 3 additions & 1 deletion .flowconfig
Expand Up @@ -27,5 +27,7 @@ suppress_type=$FlowSubtype
esproposal.export_star_as=enable
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable
module.name_mapper='^@babel\/\([a-zA-Z0-9_\-]+\)$' -> '<PROJECT_ROOT>/packages/babel-\1/src/index'
module.name_mapper='^@babel/\([a-zA-Z0-9_-]+\)$' -> '<PROJECT_ROOT>/packages/babel-\1/src/index'
; Todo: can not make it works, 🤷‍♂️
; module.name_mapper='^@babel/plugin-syntax-import-meta$' -> '<PROJECT_ROOT>/packages/babel-standalone/node_modules/@babel/plugin-syntax-import-meta/lib/index'
module.ignore_non_literal_requires=true
7 changes: 0 additions & 7 deletions eslint/babel-eslint-shared-fixtures/config/babel.config.js
Expand Up @@ -7,17 +7,10 @@ module.exports = {
"@babel/preset-react",
],
plugins: [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-syntax-export-default-from",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-syntax-numeric-separator",
"@babel/plugin-syntax-export-namespace-from",
["@babel/plugin-proposal-decorators", { decoratorsBeforeExport: false }],
["@babel/plugin-proposal-pipeline-operator", { proposal: "minimal" }],
"@babel/plugin-syntax-bigint",
"@babel/plugin-proposal-private-methods",
"@babel/plugin-proposal-do-expressions",
],
Expand Down
7 changes: 0 additions & 7 deletions eslint/babel-eslint-shared-fixtures/package.json
Expand Up @@ -9,16 +9,9 @@
"@babel/plugin-proposal-class-properties": "workspace:^7.10.4",
"@babel/plugin-proposal-decorators": "workspace:^7.10.4",
"@babel/plugin-proposal-do-expressions": "workspace:^7.10.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "workspace:^7.10.4",
"@babel/plugin-proposal-optional-chaining": "workspace:^7.11.0",
"@babel/plugin-proposal-pipeline-operator": "workspace:^7.10.4",
"@babel/plugin-proposal-private-methods": "workspace:^7.10.4",
"@babel/plugin-syntax-bigint": "^7.7.4",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-export-default-from": "workspace:^7.10.4",
"@babel/plugin-syntax-export-namespace-from": "^7.0.0",
"@babel/plugin-syntax-import-meta": "workspace:^7.10.4",
"@babel/plugin-syntax-numeric-separator": "workspace:^7.10.4",
"@babel/preset-env": "workspace:^7.11.0",
"@babel/preset-flow": "workspace:^7.10.4",
"@babel/preset-react": "workspace:^7.10.4"
Expand Down
25 changes: 4 additions & 21 deletions jest.config.js
@@ -1,20 +1,3 @@
// These packages under the @babel namespace aren't in this monorepo.
const externalBabelPackages = [
"plugin-syntax-async-generators",
"plugin-syntax-bigint",
"plugin-syntax-dynamic-import",
"plugin-syntax-json-strings",
"plugin-syntax-nullish-coalescing-operator",
"plugin-syntax-object-rest-spread",
"plugin-syntax-optional-catch-binding",
"plugin-syntax-optional-chaining",
"plugin-syntax-export-namespace-from",
];

// prettier-ignore
const monorepoPackagePattern =
`^@babel/(?!eslint-)(?!${externalBabelPackages.join("|")})([a-zA-Z0-9_-]+)$`;

module.exports = {
collectCoverageFrom: [
"packages/*/src/**/*.mjs",
Expand Down Expand Up @@ -60,8 +43,8 @@ module.exports = {
"/test/__data__/",
"<rootDir>/build/",
],
moduleNameMapper: {
[monorepoPackagePattern]: "<rootDir>/packages/babel-$1/",
"^@babel/eslint-([a-zA-Z0-9_-]+)$": "<rootDir>/eslint/babel-eslint-$1/",
},
// We don't need module name mappers here as depedencies of workspace
// package should be declared explicitly in the package.json
// Yarn will generate correct file links so that Jest can resolve correctly
moduleNameMapper: null,
};
Expand Up @@ -17,7 +17,7 @@
],
"dependencies": {
"@babel/helper-plugin-utils": "workspace:^7.10.4",
"@babel/plugin-syntax-logical-assignment-operators": "workspace:^7.10.4"
"@babel/plugin-syntax-logical-assignment-operators": "^7.10.4"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
Expand Down
Expand Up @@ -17,7 +17,7 @@
],
"dependencies": {
"@babel/helper-plugin-utils": "workspace:^7.10.4",
"@babel/plugin-syntax-numeric-separator": "workspace:^7.10.4"
"@babel/plugin-syntax-numeric-separator": "^7.10.4"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
Expand Down
3 changes: 0 additions & 3 deletions packages/babel-plugin-syntax-import-meta/.npmignore

This file was deleted.

19 changes: 0 additions & 19 deletions packages/babel-plugin-syntax-import-meta/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions packages/babel-plugin-syntax-import-meta/package.json

This file was deleted.

13 changes: 0 additions & 13 deletions packages/babel-plugin-syntax-import-meta/src/index.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions packages/babel-plugin-syntax-numeric-separator/.npmignore

This file was deleted.

19 changes: 0 additions & 19 deletions packages/babel-plugin-syntax-numeric-separator/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions packages/babel-plugin-syntax-numeric-separator/package.json

This file was deleted.

13 changes: 0 additions & 13 deletions packages/babel-plugin-syntax-numeric-separator/src/index.js

This file was deleted.

@@ -1,7 +1,3 @@
{
"plugins": [
"external-helpers",
"syntax-import-meta",
"transform-modules-systemjs"
]
"plugins": ["external-helpers", "transform-modules-systemjs"]
}
4 changes: 2 additions & 2 deletions packages/babel-preset-env/package.json
Expand Up @@ -38,9 +38,9 @@
"@babel/plugin-syntax-dynamic-import": "^7.8.0",
"@babel/plugin-syntax-export-namespace-from": "^7.8.3",
"@babel/plugin-syntax-json-strings": "^7.8.0",
"@babel/plugin-syntax-logical-assignment-operators": "workspace:^7.10.4",
"@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0",
"@babel/plugin-syntax-numeric-separator": "workspace:^7.10.4",
"@babel/plugin-syntax-numeric-separator": "^7.10.4",
"@babel/plugin-syntax-object-rest-spread": "^7.8.0",
"@babel/plugin-syntax-optional-catch-binding": "^7.8.0",
"@babel/plugin-syntax-optional-chaining": "^7.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-standalone/package.json
Expand Up @@ -41,7 +41,7 @@
"@babel/plugin-syntax-flow": "workspace:^7.10.4",
"@babel/plugin-syntax-function-bind": "workspace:^7.10.4",
"@babel/plugin-syntax-function-sent": "workspace:^7.10.4",
"@babel/plugin-syntax-import-meta": "workspace:^7.10.4",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-syntax-jsx": "workspace:^7.10.4",
"@babel/plugin-syntax-module-attributes": "workspace:^7.10.4",
"@babel/plugin-syntax-object-rest-spread": "^7.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-standalone/scripts/generate.js
Expand Up @@ -21,7 +21,7 @@ for (const plugin of pluginConfig) {
allList += `"${plugin}": ${camelPlugin},`;
}

const fileContent = `// @flow
const fileContent = `
/*
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
Expand Down
1 change: 0 additions & 1 deletion packages/babel-standalone/src/generated/plugins.js
@@ -1,4 +1,3 @@
// @flow
/*
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
Expand Down

0 comments on commit 62965e3

Please sign in to comment.