Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure @babel/runtime-corejs3/core-js/*.js can be imported on Node.js 17+ #15060

Merged
merged 7 commits into from Oct 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 32 additions & 15 deletions .github/workflows/ci.yml
Expand Up @@ -19,7 +19,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest
check-latest: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ensures that setup-node will always fetch the latest node version instead of using a locally cached node version. https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#check-latest-version

cache: "yarn"
- name: 'Check or update Yarn cache (fix w/ "yarn install")'
env:
Expand All @@ -38,7 +39,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest
check-latest: true
cache: "yarn"
- name: 'Check for unmet constraints (fix w/ "yarn constraints --fix")'
run: |
Expand All @@ -60,7 +62,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: 18
node-version: latest
check-latest: true
cache: "yarn"
- name: Generate coverage report
run: |
Expand All @@ -79,7 +82,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest
check-latest: true
cache: "yarn"
- name: Use ESM and build
run: make use-esm
Expand All @@ -106,7 +110,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest
check-latest: true
cache: "yarn"
- name: Build babel artifacts
run: |
Expand Down Expand Up @@ -142,7 +147,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest
check-latest: true
cache: "yarn"
- name: Build babel artifacts
shell: bash
Expand All @@ -165,7 +171,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
Expand All @@ -182,14 +189,15 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [16, 14, 12, 10, 8, 6]
node-version: [18, 16, 14, 12, 10, 8, 6]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest # Run yarn on latest node
uses: actions/setup-node@v3
with:
node-version: "*" # Build Babel on latest node LTS versions
node-version: latest
check-latest: true
cache: "yarn"
- name: Install
run: |
Expand Down Expand Up @@ -232,7 +240,7 @@ jobs:
if: matrix.node-version == '6' || matrix.node-version == '8' || matrix.node-version == '10'
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest

build-babel8:
name: Build Babel 8 Artifacts for tests
Expand Down Expand Up @@ -315,7 +323,8 @@ jobs:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
node-version: latest
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
Expand All @@ -341,7 +350,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
Expand All @@ -367,7 +377,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest
check-latest: true
Copy link
Contributor Author

@JLHwung JLHwung Oct 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The runtime integration test has been failing since Node.js 17+. However we didn't catch the error because previously setup-node used the latest cached node versions, i.e. Node 16.x.

cache: "yarn"
# See https://github.com/babel/babel/pull/12906
- name: Support self-references on old Node.js
Expand Down Expand Up @@ -473,7 +484,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
Expand All @@ -493,6 +505,10 @@ jobs:
uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: latest
check-latest: true
cache: "yarn"
- name: Checkout test runner
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -527,7 +543,8 @@ jobs:
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
node-version: latest
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
Expand Down