Skip to content

Bump GitHub Actions runtime from node16 to node24#4

Merged
luau-project merged 3 commits intomasterfrom
copilot/bump-node16-to-node24
Mar 28, 2026
Merged

Bump GitHub Actions runtime from node16 to node24#4
luau-project merged 3 commits intomasterfrom
copilot/bump-node16-to-node24

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 27, 2026

Node.js 16 reached EOL in September 2023 and GitHub Actions has deprecated the node16 runtime. This upgrades the action to run on node24.

Changes

  • action.yml: using: 'node16'using: 'node24'
  • main.js: Replace deprecated String.prototype.substr() with slice() (same semantics, spec-compliant); migrated from CommonJS require() to ES module import statements (required by the new ESM-only @actions/* packages)
  • package.json: Bumped all @actions/* dependencies to their latest major versions to resolve undici CVEs; added "type": "module" for ESM support:
    • @actions/cache: ^4.0.0^6.0.0
    • @actions/core: ^1.2.6^3.0.0
    • @actions/exec: ^1.0.4^3.0.0
    • @actions/io: ^1.0.2^3.0.2
    • @actions/tool-cache: ^2.0.2^4.0.0
  • node_modules/: npm install + npm audit fixnpm audit now reports 0 vulnerabilities

Known incompatibilities

Area Notes
substr deprecation Removed from use; slice is the drop-in replacement
Global fetch (Node 18+) Action uses @actions/http-client — no conflict
V8 v13 All syntax in main.js is fully compatible
ESM migration All new major @actions/* versions are ESM-only; main.js now uses import instead of require()
undici ≤6.23.0 CVEs Resolved — new @actions/http-client v4 pulls in undici 6.24.x (patched)

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Update node16 dependency to node24 and check incompatibilities Bump GitHub Actions runtime from node16 to node24 Mar 27, 2026
Copilot AI requested a review from Tieske March 27, 2026 21:02
@Tieske
Copy link
Copy Markdown

Tieske commented Mar 27, 2026

@copilot also fix the undici dependencies, even it it means major version bumps

…es and ESM migration

Agent-Logs-Url: https://github.com/luarocks/gh-actions-lua/sessions/ae17a216-2509-4e6d-8268-aad7f04d8ed8

Co-authored-by: Tieske <1077043+Tieske@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 27, 2026

@copilot also fix the undici dependencies, even it it means major version bumps

Done in commit fec6f0e. All @actions/* packages have been bumped to their latest major versions (cache → v6, core → v3, exec → v3, io → v3, tool-cache → v4), which pull in @actions/http-client v4 (using undici ^6.23.0 resolved to 6.24.x). npm audit now reports 0 vulnerabilities.

Since all new major versions are ESM-only, main.js was also migrated from CommonJS require() to ES module import statements, and "type": "module" was added to package.json.

@Tieske Tieske marked this pull request as ready for review March 27, 2026 21:43
Copy link
Copy Markdown

@Tieske Tieske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok. Test pass. only unsure about why all the dependencies (3000+ files) are included....

@luau-project
Copy link
Copy Markdown
Collaborator

I think such huge number of files changed is expected (due the bump from node 16 to node 24), because actions usually ship all dependencies to not miss any dep at runtime.

  • Some actions (e.g.: that one from ilammy to setup MSVC dev prompt) choose to not ship the node_modules folder, but rely on the user to call first actions/checkout, which pulls all the @actions/* code.

  • Other actions (e.g.: my setup-lua action) choose to use tools like vercel/ncc to bundle all the node_modules dependencies into a single *.js file. Bundling everything with ncc has the advantage to make the review easier. Still, the resulting bundled js file is quite huge (almost 100k lines).

Copy link
Copy Markdown
Collaborator

@luau-project luau-project left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@luau-project luau-project merged commit 6fff34a into master Mar 28, 2026
134 checks passed
@Tieske Tieske deleted the copilot/bump-node16-to-node24 branch March 28, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants