diff --git a/.github/workflows/basic-validation.yml b/.github/workflows/basic-validation.yml index d2b406f34..4cb6489ed 100644 --- a/.github/workflows/basic-validation.yml +++ b/.github/workflows/basic-validation.yml @@ -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' diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml index cede9b636..e45343fd8 100644 --- a/.github/workflows/e2e-cache.yml +++ b/.github/workflows/e2e-cache.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: @@ -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: @@ -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: @@ -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: diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml index b51ba8b52..eb2a481bb 100644 --- a/.github/workflows/versions.yml +++ b/.github/workflows/versions.yml @@ -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 @@ -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 @@ -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 }} @@ -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 }} @@ -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 }} diff --git a/.licenses/npm/@types/node.dep.yml b/.licenses/npm/@types/node.dep.yml index 4773dad77..1942f95c2 100644 --- a/.licenses/npm/@types/node.dep.yml +++ b/.licenses/npm/@types/node.dep.yml @@ -1,6 +1,6 @@ --- name: "@types/node" -version: 20.11.25 +version: 24.2.0 type: npm summary: TypeScript definitions for node homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node diff --git a/.licenses/npm/undici-types.dep.yml b/.licenses/npm/undici-types.dep.yml index a65b8affc..2fb3a54f1 100644 --- a/.licenses/npm/undici-types.dep.yml +++ b/.licenses/npm/undici-types.dep.yml @@ -1,15 +1,17 @@ --- name: undici-types -version: 5.26.5 +version: 7.10.0 type: npm summary: A stand-alone types package for Undici homepage: https://undici.nodejs.org license: mit licenses: -- sources: Auto-generated MIT license text +- sources: LICENSE text: | MIT License + Copyright (c) Matteo Collina and Undici contributors + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights diff --git a/__tests__/data/.nvmrc b/__tests__/data/.nvmrc index 9a2a0e219..54c65116f 100644 --- a/__tests__/data/.nvmrc +++ b/__tests__/data/.nvmrc @@ -1 +1 @@ -v20 +v24 diff --git a/__tests__/data/.tool-versions b/__tests__/data/.tool-versions index 6de89a83a..7ca549c15 100644 --- a/__tests__/data/.tool-versions +++ b/__tests__/data/.tool-versions @@ -1 +1 @@ -nodejs 20.0.0 +nodejs 24.0.0 diff --git a/__tests__/data/.tool-versions-node b/__tests__/data/.tool-versions-node index 4d5dd711b..9f5de99cd 100644 --- a/__tests__/data/.tool-versions-node +++ b/__tests__/data/.tool-versions-node @@ -1 +1 @@ -node 20.0.0 +node 24.0.0 diff --git a/__tests__/data/package-volta.json b/__tests__/data/package-volta.json index 6c9583f1f..12b3b6efc 100644 --- a/__tests__/data/package-volta.json +++ b/__tests__/data/package-volta.json @@ -3,6 +3,6 @@ "node": "^14.0.0" }, "volta": { - "node": "20.0.0" + "node": "24.0.0" } } diff --git a/__tests__/data/package.json b/__tests__/data/package.json index 4fb385a2e..724da5396 100644 --- a/__tests__/data/package.json +++ b/__tests__/data/package.json @@ -1,5 +1,5 @@ { "engines": { - "node": "^20.0.0" + "node": "^24.0.0" } } diff --git a/__tests__/verify-node.sh b/__tests__/verify-node.sh index 797aa7899..38a03a4c7 100755 --- a/__tests__/verify-node.sh +++ b/__tests__/verify-node.sh @@ -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 diff --git a/action.yml b/action.yml index ef58e6991..fb7cb2de0 100644 --- a/action.yml +++ b/action.yml @@ -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() diff --git a/package-lock.json b/package-lock.json index fa0c2eb60..3089e78a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,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", @@ -227,6 +227,7 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -1780,11 +1781,12 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", - "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.0.tgz", + "integrity": "sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw==", + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~7.10.0" } }, "node_modules/@types/node-fetch": { @@ -1800,6 +1802,7 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -2313,6 +2316,7 @@ "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2393,6 +2397,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" @@ -2696,6 +2701,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", @@ -2742,6 +2748,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -2750,6 +2757,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -2758,6 +2766,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0" }, @@ -2769,6 +2778,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", @@ -3296,6 +3306,7 @@ "version": "2.5.5", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz", "integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -3358,6 +3369,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", @@ -3390,6 +3402,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" @@ -3481,6 +3494,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3513,6 +3527,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3524,6 +3539,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" }, @@ -3538,6 +3554,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -4526,6 +4543,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -5173,7 +5191,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/sax": { "version": "1.3.0", @@ -5552,9 +5571,10 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "license": "MIT" }, "node_modules/universal-user-agent": { "version": "6.0.1", diff --git a/package.json b/package.json index dfa86bf27..c7bd15e7e 100644 --- a/package.json +++ b/package.json @@ -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",