Skip to content

Commit

Permalink
Merge branch 'main' into fix/15148
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSodaSea committed Nov 21, 2022
2 parents c66111b + 871fd5e commit db066ab
Show file tree
Hide file tree
Showing 190 changed files with 1,498 additions and 607 deletions.
50 changes: 28 additions & 22 deletions .github/workflows/ci.yml
Expand Up @@ -125,15 +125,14 @@ jobs:
- name: Ensure cwd does not contain uncommitted changes
run: |
node ./scripts/assert-dir-git-clean.js build
- name: Prepare artifacts
run: |
./scripts/get-artifact-files.sh | tar --null -cvf babel-artifact.tar --files-from=-
- uses: actions/upload-artifact@v3
with:
name: babel-artifact
path: |
codemods/*/lib/**/*
eslint/*/lib/**/*
packages/*/lib/**/*
packages/babel-standalone/*.js
!**/node_modules/**
path: babel-artifact.tar
retention-days: 5

build-windows:
name: Build Babel Artifacts On Windows
Expand Down Expand Up @@ -179,6 +178,8 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: babel-artifact
- name: Extract artifacts
run: tar -xf babel-artifact.tar; rm babel-artifact.tar
- name: Lint
run: make -j tscheck lint-ci
- name: Ensure cwd does not contain uncommitted changes
Expand Down Expand Up @@ -223,9 +224,8 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: babel-artifact
- name: Generate runtime helpers
run: |
make build-plugin-transform-runtime-dist
- name: Extract artifacts
run: tar -xf babel-artifact.tar; rm babel-artifact.tar
- name: Use Node.js ${{ matrix.node-version }} # Checkout node version for test executor
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -272,15 +272,14 @@ jobs:
BABEL_ENV: test
BABEL_8_BREAKING: true
BABEL_TYPES_8_BREAKING: true
- name: Prepare artifacts
run: |
./scripts/get-artifact-files.sh | tar --null -cvf babel-artifact.tar --files-from=-
- uses: actions/upload-artifact@v3
with:
name: babel8-test-artifact
path: |
codemods/*/lib/**/*
eslint/*/lib/**/*
packages/*/lib/**/*
packages/babel-standalone/*.js
!**/node_modules/**
name: babel8-artifact
path: babel-artifact.tar
retention-days: 5

test-babel-8-breaking:
name: Test Babel 8 breaking changes on
Expand All @@ -302,7 +301,9 @@ jobs:
yarn install
- uses: actions/download-artifact@v3
with:
name: babel8-test-artifact
name: babel8-artifact
- name: Extract artifacts
run: tar -xf babel-artifact.tar; rm babel-artifact.tar
- name: Generate runtime helpers
run: make build-plugin-transform-runtime-dist
- name: Test
Expand Down Expand Up @@ -334,8 +335,8 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: babel-artifact
- name: Generate runtime helpers
run: make build-plugin-transform-runtime-dist
- name: Extract artifacts
run: tar -xf babel-artifact.tar; rm babel-artifact.tar
- name: Test on Windows
# Hack: --color has supports-color@5 returned true for GitHub CI
# Remove once `chalk` is bumped to 4.0.
Expand All @@ -361,6 +362,8 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: babel-artifact
- name: Extract artifacts
run: tar -xf babel-artifact.tar; rm babel-artifact.tar
- name: Download tests
run: make -j bootstrap-flow bootstrap-typescript bootstrap-test262
- name: Run Test262 Tests
Expand Down Expand Up @@ -407,9 +410,8 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: babel-artifact
- name: Generate runtime helpers
run: |
make build-plugin-transform-runtime-dist
- name: Extract artifacts
run: tar -xf babel-artifact.tar; rm babel-artifact.tar
- name: Generate absoluteRuntime tests
run: yarn test:runtime:generate-absolute-runtime
- name: Test bundlers
Expand Down Expand Up @@ -495,6 +497,8 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: babel-artifact
- name: Extract artifacts
run: tar -xf babel-artifact.tar; rm babel-artifact.tar
- name: Downgrade ESLint to 7.5.0
run: yarn up eslint@7.5.0
- name: Run babel/eslint tests
Expand Down Expand Up @@ -553,6 +557,8 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: babel-artifact
- name: Extract artifacts
run: tar -xf babel-artifact.tar; rm babel-artifact.tar
- name: Checkout test runner
uses: actions/checkout@v3
with:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Expand Up @@ -23,6 +23,13 @@ See [`eslint-plugin-babel`'s releases](https://github.com/babel/eslint-plugin-ba

<!-- DO NOT CHANGE THESE COMMENTS - See .github/actions/trigger-github-release/update-changelog.js -->
<!-- insert-new-changelog-here -->
## v7.20.4 (2022-11-08)

#### :bug: Bug Fix
* `babel-generator`
* [#15160](https://github.com/babel/babel/pull/15160) Fix printing of comments before `=>` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* `babel-generator`, `babel-plugin-transform-typescript`
* [#15144](https://github.com/babel/babel/pull/15144) Falback to printing inner comments as trailing ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
## v7.20.3 (2022-11-07)

#### :bug: Bug Fix
Expand Down
4 changes: 1 addition & 3 deletions Gulpfile.mjs
Expand Up @@ -259,8 +259,6 @@ function createWorker(useWorker) {
}

async function buildBabel(useWorker, ignore = []) {
const enableSourceMap = !process.env.IS_PUBLISH;

const worker = createWorker(useWorker);
const files = await new Promise((resolve, reject) => {
glob(
Expand All @@ -281,7 +279,7 @@ async function buildBabel(useWorker, ignore = []) {
const dest = "./" + mapSrcToLib(file.slice(2));
promises.push(
worker.transform(file, dest, {
sourceMaps: enableSourceMap && !file.endsWith(".d.ts"),
sourceMaps: !file.endsWith(".d.ts"),
})
);
}
Expand Down
6 changes: 3 additions & 3 deletions Makefile
@@ -1,5 +1,5 @@
FLOW_COMMIT = 92bbb5e9dacb8185aa73ea343954d0434b42c40b
TEST262_COMMIT = eb67a7689f422cf14776f78191650d0d78c2d2e4
TEST262_COMMIT = ec752ebaaba706d6b388ea2c2b8df729d419b1c4
TYPESCRIPT_COMMIT = ce85d647ef88183c019588bcf398320ce29b625a

# Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967
Expand Down Expand Up @@ -192,8 +192,8 @@ new-version-checklist:
# @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# @echo "!!!!!! !!!!!!"
# @echo "!!!!!! Write any message that should !!!!!!"
# @echo "!!!!!! block the release here !!!!!!"
# @echo "!!!!!! Update the minVersion of packages/babel-helpers/src/helpers/checkInRHS.js"
# @echo "!!!!!! !!!!!!"
# @echo "!!!!!! !!!!!!"
# @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
Expand Down
2 changes: 1 addition & 1 deletion Makefile.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Makefile.source.mjs
Expand Up @@ -223,10 +223,10 @@ target["build-plugin-transform-runtime-dist"] = function () {

target["prepublish"] = function () {
target["bootstrap-only"]();
target["prepublish-build"]();

env(
() => {
target["prepublish-build"]();
target["test"]();
},
{
Expand Down
1 change: 1 addition & 0 deletions constraints.pro
Expand Up @@ -85,6 +85,7 @@ gen_enforced_field(WorkspaceCwd, 'exports', '{ ".": "./lib/index.js", "./package
WorkspaceIdent \= '@babel/parser',
WorkspaceIdent \= '@babel/plugin-transform-react-jsx', % TODO: Remove in Babel 8
WorkspaceIdent \= '@babel/standalone',
WorkspaceIdent \= '@babel/types', % @babel/types has types exports
\+ atom_concat('@babel/eslint-', _, WorkspaceIdent),
\+ atom_concat('@babel/runtime', _, WorkspaceIdent).

Expand Down
16 changes: 8 additions & 8 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "babel",
"version": "7.20.3",
"version": "7.20.4",
"private": true,
"type": "commonjs",
"scripts": {
Expand All @@ -20,17 +20,17 @@
"packageManager": "yarn@3.2.4",
"devDependencies": {
"@babel/cli": "^7.19.3",
"@babel/core": "^7.19.6",
"@babel/core": "^7.20.2",
"@babel/eslint-config-internal": "workspace:^",
"@babel/eslint-parser": "workspace:^",
"@babel/eslint-plugin-development": "workspace:^",
"@babel/eslint-plugin-development-internal": "workspace:^",
"@babel/plugin-proposal-dynamic-import": "^7.18.6",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-object-rest-spread": "^7.18.9",
"@babel/plugin-proposal-object-rest-spread": "^7.20.2",
"@babel/plugin-transform-modules-commonjs": "^7.19.6",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.19.4",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@babel/runtime": "^7.20.0",
"@rollup/plugin-babel": "^5.3.1",
Expand All @@ -45,15 +45,15 @@
"c8": "^7.12.0",
"chalk": "^5.0.0",
"charcodes": "^0.2.0",
"core-js": "^3.25.1",
"core-js": "^3.26.0",
"eslint": "^8.22.0",
"eslint-formatter-codeframe": "^7.32.1",
"eslint-import-resolver-node": "^0.3.6",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.6.0",
"eslint-plugin-jest": "^27.1.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"glob": "^7.2.0",
"glob": "^8.0.3",
"gulp": "^4.0.2",
"gulp-filter": "^7.0.0",
"gulp-plumber": "^1.2.1",
Expand All @@ -73,7 +73,7 @@
"shelljs": "^0.8.5",
"test262-stream": "^1.4.0",
"through2": "^4.0.0",
"typescript": "~4.8.3"
"typescript": "~4.9.3"
},
"workspaces": [
"codemods/*",
Expand Down
Expand Up @@ -6,7 +6,7 @@
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
Object.defineProperty(target, babelHelpers.toPropertyKey(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
Expand Down
1 change: 1 addition & 0 deletions packages/babel-compat-data/data/plugin-bugfixes.json
Expand Up @@ -94,6 +94,7 @@
"node": "16.9",
"deno": "1.9",
"ios": "13.4",
"samsung": "16",
"electron": "13.0"
},
"transform-optional-chaining": {
Expand Down
6 changes: 6 additions & 0 deletions packages/babel-compat-data/data/plugins.json
Expand Up @@ -6,6 +6,7 @@
"firefox": "93",
"node": "16.11",
"deno": "1.14",
"samsung": "17",
"electron": "15.0"
},
"proposal-class-static-block": {
Expand All @@ -15,6 +16,7 @@
"firefox": "93",
"node": "16.11",
"deno": "1.14",
"samsung": "17",
"electron": "15.0"
},
"transform-private-property-in-object": {
Expand All @@ -26,6 +28,7 @@
"node": "16.9",
"deno": "1.9",
"ios": "15",
"samsung": "16",
"electron": "13.0"
},
"proposal-private-property-in-object": {
Expand All @@ -37,6 +40,7 @@
"node": "16.9",
"deno": "1.9",
"ios": "15",
"samsung": "16",
"electron": "13.0"
},
"transform-class-properties": {
Expand Down Expand Up @@ -170,6 +174,7 @@
"node": "16.9",
"deno": "1.9",
"ios": "13.4",
"samsung": "16",
"electron": "13.0"
},
"proposal-optional-chaining": {
Expand All @@ -181,6 +186,7 @@
"node": "16.9",
"deno": "1.9",
"ios": "13.4",
"samsung": "16",
"electron": "13.0"
},
"transform-json-strings": {
Expand Down
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

COMPAT_TABLE_COMMIT=181d4e9e5b5f918cfe0d956a570bfb8a38b4f453
COMPAT_TABLE_COMMIT=7c6f3188abbea9acc87e07092ce31f3810371bf3
GIT_HEAD=build/compat-table/.git/HEAD

if [ -d "build/compat-table" ]; then
Expand Down

0 comments on commit db066ab

Please sign in to comment.