From 0b422d8e0874b72af76accd0054603335195e03b Mon Sep 17 00:00:00 2001 From: KasperRagnar Date: Mon, 27 Apr 2026 19:11:21 +0200 Subject: [PATCH] fix: opt into Node.js 24 for GitHub Actions and fix cross-platform dist build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true to both workflow files to silence the Node.js 20 deprecation warning from actions/checkout and actions/cache (pulled in by setup-node). Deadline for mandatory Node 24 is June 2026. - Add --no-bytecode --public to pkg dist command so cross-platform builds (e.g. Linux/macOS targets from Windows) no longer fail with spawn UNKNOWN during V8 bytecode fabrication. - Remove explicit pkg scripts glob (dist/**/*.js) — pkg auto-detects JS files via the require chain from the entry point. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build.yml | 3 +++ .github/workflows/security-scan.yml | 3 +++ package-lock.json | 4 ++-- package.json | 5 +---- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbf5989..994aed3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,9 @@ on: branches: - master +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + jobs: build: name: Build application diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml index ff71549..295e088 100644 --- a/.github/workflows/security-scan.yml +++ b/.github/workflows/security-scan.yml @@ -3,6 +3,9 @@ name: Security Scan on: pull_request: +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + jobs: trivy: name: Trivy vulnerability scan diff --git a/package-lock.json b/package-lock.json index 1a7adf7..7f72775 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "amc", - "version": "0.2.0", + "version": "0.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "amc", - "version": "0.2.0", + "version": "0.4.0", "dependencies": { "exifr": "^7.1.3", "express": "^4.18.2", diff --git a/package.json b/package.json index 3840dd0..6829544 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "setup": "node scripts/setup.js", "setup:current": "node scripts/setup.js --current", "generate-ico": "node scripts/generate-ico.js", - "dist": "npm run build && pkg . --icon public/logo.ico && node scripts/rename-release.js" + "dist": "npm run build && pkg . --icon public/logo.ico --no-bytecode --public && node scripts/rename-release.js" }, "dependencies": { "exifr": "^7.1.3", @@ -31,9 +31,6 @@ "unzipper": "^0.12.3" }, "pkg": { - "scripts": [ - "dist/**/*.js" - ], "assets": [ "public/**/*", "bin/**/*"