Skip to content

Commit

Permalink
Update @babel/* dependencies (#16933)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo authored Oct 25, 2024
1 parent a1b4ba0 commit e5e3bd2
Show file tree
Hide file tree
Showing 6 changed files with 720 additions and 827 deletions.
55 changes: 0 additions & 55 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,61 +23,6 @@ nmMode: hardlinks-local
nodeLinker: node-modules

packageExtensions:
# @babel/preset-env depends on all these packages using the condition:
# protocol, which does not properly propagate peer dependency requirements.
# We know that we have the correct Babel version in the monorepo, so let's
# just remove the peerDependency requirement to silence the warning.
"@babel/plugin-proposal-private-property-in-object@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-async-generators@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-class-properties@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-class-static-block@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-dynamic-import@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-export-namespace-from@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-import-meta@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-json-strings@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-logical-assignment-operators@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-nullish-coalescing-operator@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-numeric-separator@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-object-rest-spread@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-optional-catch-binding@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-optional-chaining@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-private-property-in-object@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-top-level-await@*":
peerDependencies:
"@babel/core": null
"@babel/plugin-syntax-unicode-sets-regex@*":
peerDependencies:
"@babel/core": null
psl@*:
dependencies:
punycode: ^2.3.0
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ module.exports = function (api) {

convertESM ? "@babel/transform-export-namespace-from" : null,
env !== "standalone"
? ["@babel/plugin-proposal-json-modules", { uncheckedRequire: true }]
? ["@babel/plugin-transform-json-modules", { uncheckedRequire: true }]
: null,

require("./scripts/babel-plugin-bit-decorator/plugin.cjs"),
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@
"packageManager": "yarn@4.3.1",
"devDependencies": {
"$repo-utils": "link:./scripts/repo-utils",
"@babel/cli": "8.0.0-alpha.12",
"@babel/core": "8.0.0-alpha.12",
"@babel/cli": "8.0.0-alpha.13",
"@babel/core": "8.0.0-alpha.13",
"@babel/eslint-parser": "workspace:^",
"@babel/eslint-plugin-development": "workspace:^",
"@babel/eslint-plugin-development-internal": "workspace:^",
"@babel/plugin-proposal-json-modules": "8.0.0-alpha.12",
"@babel/plugin-transform-dynamic-import": "8.0.0-alpha.12",
"@babel/plugin-transform-export-namespace-from": "8.0.0-alpha.12",
"@babel/plugin-transform-modules-commonjs": "8.0.0-alpha.12",
"@babel/plugin-transform-object-rest-spread": "8.0.0-alpha.12",
"@babel/plugin-transform-runtime": "8.0.0-alpha.12",
"@babel/preset-env": "8.0.0-alpha.12",
"@babel/preset-typescript": "8.0.0-alpha.12",
"@babel/runtime": "8.0.0-alpha.12",
"@babel/plugin-transform-dynamic-import": "8.0.0-alpha.13",
"@babel/plugin-transform-export-namespace-from": "8.0.0-alpha.13",
"@babel/plugin-transform-json-modules": "8.0.0-alpha.13",
"@babel/plugin-transform-modules-commonjs": "8.0.0-alpha.13",
"@babel/plugin-transform-object-rest-spread": "8.0.0-alpha.13",
"@babel/plugin-transform-runtime": "8.0.0-alpha.13",
"@babel/preset-env": "8.0.0-alpha.13",
"@babel/preset-typescript": "8.0.0-alpha.13",
"@babel/runtime": "8.0.0-alpha.13",
"@cspotcode/source-map-support": "^0.8.1",
"@eslint/js": "^9.12.0",
"@rollup/plugin-babel": "^6.0.4",
Expand Down
2 changes: 1 addition & 1 deletion scripts/integration-tests/e2e-babel-old-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ sed -i 's/nodeGte12(/nodeGte12.skip(/g' eslint/babel-eslint-tests/test/integrati
sed -i 's/describe(/describe.skip(/g' eslint/babel-eslint-tests/test/integration/config-files.js

# We only support transforming import attributes in new @babel/core versions
sed -i 's#\["@babel/plugin-proposal-json-modules", { uncheckedRequire: true }\]#null#g' babel.config.js
sed -i 's#\["@babel/plugin-transform-json-modules", { uncheckedRequire: true }\]#null#g' babel.config.js
sed -i 's#with { type: "json" }##g' packages/babel-preset-env/src/normalize-options.ts

# Update deps, build and test
Expand Down
4 changes: 0 additions & 4 deletions scripts/integration-tests/e2e-babel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ startLocalRegistry "$PWD"/scripts/integration-tests/verdaccio-config.yml
node "$PWD"/scripts/integration-tests/utils/bump-babel-dependencies.js
export YARN_ENABLE_IMMUTABLE_INSTALLS=false

# This packages has been renamed
sed -i 's/proposal-json-modules/transform-json-modules/g' package.json
sed -i 's/proposal-json-modules/transform-json-modules/g' babel.config.js

if [ "$BABEL_8_BREAKING" = true ] ; then
# This option is removed in Babel 8
sed -i 's/allowDeclareFields: true,\?/\/* allowDeclareFields: true *\//g' babel.config.js
Expand Down
Loading

0 comments on commit e5e3bd2

Please sign in to comment.