Skip to content

Upgrade action to use node24 #1325

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/basic-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with:
node-version: '20.x'
node-version: '24.x'
16 changes: 8 additions & 8 deletions .github/workflows/e2e-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
node-version: [18, 20, 22]
node-version: [18, 20, 22, 24]
steps:
- uses: actions/checkout@v4
- name: Clean global cache
Expand All @@ -42,7 +42,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
node-version: [18, 20, 22]
node-version: [18, 20, 22, 24]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
node-version: [18, 20]
node-version: [18, 20, 24]
steps:
- uses: actions/checkout@v4
- name: Yarn version
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
node-version: [18, 20, 22]
node-version: [18, 20, 22, 24]
steps:
- uses: actions/checkout@v4
- name: Update yarn
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
name: Test yarn subprojects
strategy:
matrix:
node-version: [18, 20, 22]
node-version: [18, 20, 22, 24]
runs-on: ubuntu-latest

steps:
Expand All @@ -166,7 +166,7 @@ jobs:
name: Test yarn subprojects all locally managed
strategy:
matrix:
node-version: [18, 20, 22]
node-version: [18, 20, 22, 24]
runs-on: ubuntu-latest

steps:
Expand All @@ -193,7 +193,7 @@ jobs:
name: Test yarn subprojects some locally managed
strategy:
matrix:
node-version: [18, 20, 22]
node-version: [18, 20, 22, 24]
runs-on: ubuntu-latest

steps:
Expand All @@ -220,7 +220,7 @@ jobs:
name: Test yarn subprojects managed by git
strategy:
matrix:
node-version: [18, 20, 22]
node-version: [18, 20, 22, 24]
runs-on: ubuntu-latest

steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
node-version: [18, 20, 22]
node-version: [18, 20, 22, 24]
steps:
- uses: actions/checkout@v4
- name: Setup Node
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
node-version: [18, 20, 22]
node-version: [18, 20, 22, 24]
steps:
- uses: actions/checkout@v4
- name: Setup Node and check latest
Expand All @@ -166,7 +166,7 @@ jobs:
with:
node-version-file: '__tests__/data/${{ matrix.node-version-file }}'
- name: Verify node
run: __tests__/verify-node.sh 20
run: __tests__/verify-node.sh 24

version-file-volta:
runs-on: ${{ matrix.os }}
Expand All @@ -181,7 +181,7 @@ jobs:
with:
node-version-file: '__tests__/data/package-volta.json'
- name: Verify node
run: __tests__/verify-node.sh 20
run: __tests__/verify-node.sh 24

version-file-volta-extends:
runs-on: ${{ matrix.os }}
Expand All @@ -196,7 +196,7 @@ jobs:
with:
node-version-file: '__tests__/data/package-volta-extends.json'
- name: Verify node
run: __tests__/verify-node.sh 20
run: __tests__/verify-node.sh 24

node-dist:
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/@types/node.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions .licenses/npm/undici-types.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion __tests__/data/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v24
2 changes: 1 addition & 1 deletion __tests__/data/.tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 20.0.0
nodejs 24.0.0
2 changes: 1 addition & 1 deletion __tests__/data/.tool-versions-node
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node 20.0.0
node 24.0.0
2 changes: 1 addition & 1 deletion __tests__/data/package-volta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"node": "^14.0.0"
},
"volta": {
"node": "20.0.0"
"node": "24.0.0"
}
}
2 changes: 1 addition & 1 deletion __tests__/data/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"engines": {
"node": "^20.0.0"
"node": "^24.0.0"
}
}
9 changes: 7 additions & 2 deletions __tests__/verify-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ fi

node_version="$(node --version)"
echo "Found node version '$node_version'"
if [ -z "$(echo $node_version | grep --fixed-strings v$1)" ]; then
echo "Unexpected version"

# Extract the major version from the node version (remove the 'v' prefix)
actual_major_version=$(echo $node_version | sed -E 's/^v([0-9]+)\..*/\1/')
expected_major_version=$(echo $1 | sed -E 's/^([0-9]+)\..*/\1/') # Extract major version from argument

if [ "$actual_major_version" != "$expected_major_version" ]; then
echo "Expected Node.js $expected_major_version.x.x but found $node_version"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ outputs:
node-version:
description: 'The installed node version.'
runs:
using: 'node20'
using: 'node24'
main: 'dist/setup/index.js'
post: 'dist/cache-save/index.js'
post-if: success()
38 changes: 29 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/node": "^20.11.25",
"@types/node": "^24.1.0",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
Expand Down
Loading