Skip to content

Migrate from Node.js 20 to Node.js 24#1230

Merged
JamesIves merged 3 commits into
devfrom
copilot/migrate-nodejs-20-to-24
Jan 12, 2026
Merged

Migrate from Node.js 20 to Node.js 24#1230
JamesIves merged 3 commits into
devfrom
copilot/migrate-nodejs-20-to-24

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 9, 2026

Migration Plan: Node.js 20 to 24

  • Update action.yml to use node24 runtime
  • Update .node-version to use Node.js 24.x (v24.12.0 LTS)
  • Verify build works with updated configuration
  • Fix unit test failures (error message format change in Node.js)
  • All tests passing (20/20)
  • Code review completed - no issues found
  • Security scan completed - no vulnerabilities found
  • Verify no breaking changes introduced by migration

Summary

Successfully migrated the GitHub Action from Node.js 20 to Node.js 24.

Changes Made

  1. action.yml: Updated runtime from node20 to node24
  2. .node-version: Updated from v22.11.0 to v24.12.0 (latest LTS)
  3. tests/fetch.test.ts: Updated test to match Node.js 24 error message format

Validation

✅ Build successful
✅ Linter passes
✅ All tests pass (20/20)
✅ Code review passed
✅ Security scan passed
✅ No breaking changes

Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate from node.js 20 to 24</issue_title>
<issue_description>

Discussed in JamesIves/github-pages-deploy-action#1939

Originally posted by harsha-venugopal-ledn January 7, 2026
This is basically the same thing again as aws-actions/amazon-ecr-login#608

Github is in the process of migrating to Node.js 24. The announcement and time schedule are: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Actions that use node20 will fail some time around April 2026.

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: JamesIves <10888441+JamesIves@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate from Node.js 20 to 24 Migrate from Node.js 20 to Node.js 24 Jan 9, 2026
Copilot AI requested a review from JamesIves January 9, 2026 19:37
Copy link
Copy Markdown
Owner

@JamesIves JamesIves left a comment

Choose a reason for hiding this comment

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

@copilot Resolve the unit test failures

Co-authored-by: JamesIves <10888441+JamesIves@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 12, 2026

@copilot Resolve the unit test failures

Fixed in commit 34bd721. The test failure was due to Node.js 24 changing the error message format for invalid encoding arguments. Updated the test to match the new format and all 20 tests now pass.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.94%. Comparing base (9e121f4) to head (34bd721).
⚠️ Report is 12 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1230   +/-   ##
=======================================
  Coverage   98.94%   98.94%           
=======================================
  Files           4        4           
  Lines          95       95           
  Branches       29       30    +1     
=======================================
  Hits           94       94           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JamesIves JamesIves marked this pull request as ready for review January 12, 2026 14:21
@JamesIves JamesIves merged commit a89d349 into dev Jan 12, 2026
7 checks passed
@JamesIves JamesIves deleted the copilot/migrate-nodejs-20-to-24 branch January 12, 2026 14:21
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.

Migrate from node.js 20 to 24

2 participants