Repository navigation
fix: opt into Node.js 24 for Actions and fix cross-platform dist build - #5
Merged
Merged
Conversation
…st build - 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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
GitHub Actions — Node.js 24 opt-in
Added
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: trueto both workflow files (build.ymlandsecurity-scan.yml). This resolves the deprecation warning from the Trivy security scan whereactions/checkout@v4andactions/cache(pulled in internally byactions/setup-node) were flagged as running on Node.js 20, which GitHub is deprecating ahead of a forced migration in June 2026.Cross-platform dist build fix
npm run distwas failing withspawn UNKNOWNwhen building Linux/macOS targets from Windows. The root cause was@yao-pkg/pkgtrying to spawn Linux/macOS Node.js binaries during V8 bytecode fabrication — which Windows cannot execute.Fixed by:
--no-bytecode --publicto thepkgcommand so source files are bundled as-is instead of compiled bytecode, enabling genuine cross-platform builds from any OS.scripts: ["dist/**/*.js"]from the pkg config — pkg auto-detects required JS files via the entry point's require chain.All four platform executables now build successfully from Windows and are correctly renamed with the version number.