diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 4d87e15fb..376730e38 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -52,12 +52,7 @@ jobs: npm config set script-shell bash npm ci - - name: Verify compiled JS up to date (Node.js 20) - if: matrix.node-version == 20 - run: .github/workflows/script/check-js-20.sh - - - name: Verify compiled JS up to date (Node.js 24) - if: matrix.node-version == 24 + - name: Verify compiled JS up to date run: .github/workflows/script/check-js.sh - name: Verify PR checks up to date diff --git a/.github/workflows/script/check-js-20.sh b/.github/workflows/script/check-js-20.sh deleted file mode 100755 index 02ed8557a..000000000 --- a/.github/workflows/script/check-js-20.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -set -eu - -# Change @types/node to v20 temporarily to check that the generated JS files are correct. -contents=$(jq '.devDependencies."@types/node" = "^20.0.0"' package.json) -echo "${contents}" > package.json - -npm install - -if [ ! -z "$(git status --porcelain)" ]; then - git config --global user.email "github-actions@github.com" - git config --global user.name "github-actions[bot]" - # The period in `git add --all .` ensures that we stage deleted files too. - git add --all . - git commit -m "Use @types/node v20" -fi - -# Wipe the lib directory in case there are extra unnecessary files in there -rm -rf lib - -# Generate the JavaScript files -npm run-script build - -# Check that repo is still clean. -# The downgrade of @types/node means that we expect certain changes to the generated JS files. -# Therefore, we should ignore these changes to @types/node and check for outstanding changes. -if [[ $(git diff | grep --perl-regexp '^-(?!--)' | grep --count --invert-match --perl-regexp '"@types/node": "\^24') -gt 0 || \ - $(git diff | grep --perl-regexp '^\+(?!\+\+)' | grep --count --invert-match --perl-regexp '"@types/node": "\^20') -gt 0 ]] -then - >&2 echo "Failed: JavaScript files are not up to date. Run 'rm -rf lib && npm run-script build' to update" - git diff - exit 1 -fi -echo "Success: JavaScript files are up to date" - -# Clean up changes to package.json, package-lock.json, and lib/*.js. -git reset --hard HEAD~1 diff --git a/build.mjs b/build.mjs index 2e014e81d..9e28acbd7 100644 --- a/build.mjs +++ b/build.mjs @@ -13,7 +13,7 @@ const OUT_DIR = join(__dirname, "lib"); /** * Clean the output directory before building. - * + * * @type {esbuild.Plugin} */ const cleanPlugin = { @@ -27,7 +27,7 @@ const cleanPlugin = { /** * Copy defaults.json to the output directory since other projects depend on it. - * + * * @type {esbuild.Plugin} */ const copyDefaultsPlugin = { @@ -68,7 +68,7 @@ const context = await esbuild.context({ outdir: OUT_DIR, platform: "node", plugins: [cleanPlugin, copyDefaultsPlugin, onEndPlugin], - target: ["node24"], + target: ["node20"], }); await context.rebuild(); diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 506c3886b..9608f9f58 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -26500,7 +26500,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -28542,7 +28542,7 @@ var require_brace_expansion = __commonJS({ var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } diff --git a/lib/analyze-action.js b/lib/analyze-action.js index d4d77251f..f17cde249 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -32349,7 +32349,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -34391,7 +34391,7 @@ var require_brace_expansion = __commonJS({ var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 86634cdf8..30c9abb8f 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -26500,7 +26500,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -28542,7 +28542,7 @@ var require_brace_expansion = __commonJS({ var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 504e33abc..fdf055f09 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -32349,7 +32349,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -34391,7 +34391,7 @@ var require_brace_expansion = __commonJS({ var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } diff --git a/lib/init-action.js b/lib/init-action.js index 01f7dcdbd..901cbda3f 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -32349,7 +32349,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -34391,7 +34391,7 @@ var require_brace_expansion = __commonJS({ var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index 9d53cdbe6..d3edabe93 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -26500,7 +26500,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -28542,7 +28542,7 @@ var require_brace_expansion = __commonJS({ var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 2d262137b..ee1a6ba94 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -26500,7 +26500,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -28542,7 +28542,7 @@ var require_brace_expansion = __commonJS({ var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index a194b3d5f..c6c18fc06 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -45036,7 +45036,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 9a9e6e6bc..dde7db14c 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -33646,7 +33646,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -35688,7 +35688,7 @@ var require_brace_expansion = __commonJS({ var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index ac0a6da67..5ec030a15 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -26500,7 +26500,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -106366,7 +106366,7 @@ var require_brace_expansion3 = __commonJS({ var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index cc9874e26..dc7506af3 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -32349,7 +32349,7 @@ var require_package = __commonJS({ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -34391,7 +34391,7 @@ var require_brace_expansion = __commonJS({ var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } diff --git a/package-lock.json b/package-lock.json index c13f510c1..cb0108057 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4", @@ -2660,13 +2660,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.6.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.6.0.tgz", - "integrity": "sha512-F1CBxgqwOMc4GKJ7eY22hWhBVQuMYTtqI8L0FcszYcpYX0fzfDGpez22Xau8Mgm7O9fI+zA/TYIdq3tGWfweBA==", + "version": "20.19.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.9.tgz", + "integrity": "sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.13.0" + "undici-types": "~6.21.0" } }, "node_modules/@types/node-forge": { @@ -4200,7 +4200,9 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "1.1.11", + "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", @@ -9195,9 +9197,9 @@ } }, "node_modules/undici-types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.13.0.tgz", - "integrity": "sha512-Ov2Rr9Sx+fRgagJ5AX0qvItZG/JKKoBRAVITs1zk7IqZGTJUwgUr7qoYBpWwakpWilTZFM98rG/AFRocu10iIQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index 60a1f009c..e4ddef341 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@types/console-log-level": "^1.4.5", "@types/follow-redirects": "^1.14.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^24.5.2", + "@types/node": "20.19.9", "@types/node-forge": "^1.3.14", "@types/semver": "^7.7.1", "@types/sinon": "^17.0.4",