From 717b89558421df8130581c46b5c4ed3c22f152df Mon Sep 17 00:00:00 2001 From: Salman Muin Kayser Chishti Date: Thu, 31 Jul 2025 23:37:22 +0100 Subject: [PATCH] support node 24 --- .github/workflows/artifact-tests.yml | 8 ++++---- .github/workflows/audit.yml | 4 ++-- .github/workflows/cache-tests.yml | 4 ++-- .github/workflows/cache-windows-test.yml | 4 ++-- .github/workflows/releases.yml | 4 ++-- .github/workflows/unit-tests.yml | 3 ++- package.json | 7 +++++-- packages/cache/package.json | 5 ++++- packages/core/package.json | 5 ++++- packages/http-client/package.json | 5 ++++- 10 files changed, 31 insertions(+), 18 deletions(-) diff --git a/.github/workflows/artifact-tests.yml b/.github/workflows/artifact-tests.yml index a74db480..53c1b18b 100644 --- a/.github/workflows/artifact-tests.yml +++ b/.github/workflows/artifact-tests.yml @@ -24,10 +24,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set Node.js 20.x + - name: Set Node.js 24.x uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 24.x # Need root node_modules because certain npm packages like jest are configured for the entire repository and it won't be possible # without these to just compile the artifacts package @@ -79,10 +79,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set Node.js 20.x + - name: Set Node.js 24.x uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 24.x # Need root node_modules because certain npm packages like jest are configured for the entire repository and it won't be possible # without these to just compile the artifacts package diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 6633406b..2239a346 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -20,10 +20,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set Node.js 20.x + - name: Set Node.js 24.x uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 24.x - name: npm install run: npm install diff --git a/.github/workflows/cache-tests.yml b/.github/workflows/cache-tests.yml index dfe89f68..f26afce6 100644 --- a/.github/workflows/cache-tests.yml +++ b/.github/workflows/cache-tests.yml @@ -24,10 +24,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set Node.js 20.x + - name: Set Node.js 24.x uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 24.x # In order to save & restore cache from a shell script, certain env variables need to be set that are only available in the # node context. This runs a local action that gets and sets the necessary env variables that are needed diff --git a/.github/workflows/cache-windows-test.yml b/.github/workflows/cache-windows-test.yml index 75792fc0..4591ac1c 100644 --- a/.github/workflows/cache-windows-test.yml +++ b/.github/workflows/cache-windows-test.yml @@ -23,10 +23,10 @@ jobs: run: | rm "C:\Program Files\Git\usr\bin\tar.exe" - - name: Set Node.js 20.x + - name: Set Node.js 24.x uses: actions/setup-node@v1 with: - node-version: 20.x + node-version: 24.x # In order to save & restore cache from a shell script, certain env variables need to be set that are only available in the # node context. This runs a local action that gets and sets the necessary env variables that are needed diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index dddca79d..13635af7 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -33,10 +33,10 @@ jobs: - name: verify package exists run: ls packages/${{ github.event.inputs.package }} - - name: Set Node.js 20.x + - name: Set Node.js 24.x uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 24.x - name: npm install run: npm install diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 6956df01..f11f9afd 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -20,7 +20,8 @@ jobs: # Node 18 is the current default Node version in hosted runners, so users may still use the toolkit with it when running tests (see https://github.com/actions/toolkit/issues/1841) # Node 20 is the currently support Node version for actions - https://docs.github.com/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#runsusing-for-javascript-actions - node-version: [18.x, 20.x] + # Node 24 is currently supported on actions runners + node-version: [18.x, 20.x, 24.x] fail-fast: false runs-on: ${{ matrix.runs-on }} diff --git a/package.json b/package.json index d394979b..6aabf321 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,9 @@ { "name": "root", - "private": true, + "private": true, + "engines": { + "node": ">=24.0.0" + }, "scripts": { "audit-all": "lerna run audit-moderate", "bootstrap": "lerna exec -- npm install", @@ -17,7 +20,7 @@ }, "devDependencies": { "@types/jest": "^29.5.4", - "@types/node": "^20.5.7", + "@types/node": "^24.1.0", "@types/signale": "^1.4.1", "concurrently": "^6.1.0", "eslint": "^8.0.1", diff --git a/packages/cache/package.json b/packages/cache/package.json index 4d630ed2..8bd207ca 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -3,6 +3,9 @@ "version": "4.0.3", "preview": true, "description": "Actions cache lib", + "engines": { + "node": ">=24.0.0" + }, "keywords": [ "github", "actions", @@ -48,7 +51,7 @@ "semver": "^6.3.1" }, "devDependencies": { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", "typescript": "^5.2.2" diff --git a/packages/core/package.json b/packages/core/package.json index 6d60010e..4cef6d77 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -2,6 +2,9 @@ "name": "@actions/core", "version": "1.11.1", "description": "Actions core lib", + "engines": { + "node": ">=24.0.0" + }, "keywords": [ "github", "actions", @@ -40,6 +43,6 @@ "@actions/http-client": "^2.0.1" }, "devDependencies": { - "@types/node": "^16.18.112" + "@types/node": "^24.1.0" } } \ No newline at end of file diff --git a/packages/http-client/package.json b/packages/http-client/package.json index 17d616cd..2bfd7163 100644 --- a/packages/http-client/package.json +++ b/packages/http-client/package.json @@ -2,6 +2,9 @@ "name": "@actions/http-client", "version": "2.2.3", "description": "Actions Http Client", + "engines": { + "node": ">=24.0.0" + }, "keywords": [ "github", "actions", @@ -39,7 +42,7 @@ "url": "https://github.com/actions/toolkit/issues" }, "devDependencies": { - "@types/node": "20.7.1", + "@types/node": "24.1.0", "@types/tunnel": "0.0.3", "proxy": "^2.1.1", "@types/proxy": "^1.0.1"