Skip to content

Add Node.js 24 to test strategy#71091

Merged
desrosj merged 3 commits into
trunkfrom
add/node-24-to-workflows
Aug 6, 2025
Merged

Add Node.js 24 to test strategy#71091
desrosj merged 3 commits into
trunkfrom
add/node-24-to-workflows

Conversation

@desrosj
Copy link
Copy Markdown
Member

@desrosj desrosj commented Aug 6, 2025

What?

This adds version 24 of Node.js to the testing strategies for workflows that test multiple versions of Node.js.

Why?

  • Node.js 22 is the Active LTS version.
  • Node.js 24 is the Current version and slated to become Active LTS later this year (October). This will push 22.x to Maintenance LTS.

Testing against newer versions than the one currently pinned in the WordPress Core/Gutenberg repositories helps spot potential issues ahead of time making upgrading easier when the time comes.

See related: #70844.

How?

The GitHub Actions testing strategies have been updated for workflows that currently test multiple versions of Node.js

desrosj added 2 commits August 6, 2025 07:27
When both `node-version-file` and `node-version` are passed to `actions/setup-node`, a warning is output.

When inputs are empty, they are ignored. This will silence the error while keepign the same functionality.
@desrosj desrosj marked this pull request as ready for review August 6, 2025 19:29
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 6, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>
Co-authored-by: aduth <aduth@git.wordpress.org>
Co-authored-by: sirreal <jonsurrell@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@desrosj desrosj changed the title Add Node.js 24 to test matrices Add Node.js 24 to test strategy Aug 6, 2025
@desrosj desrosj added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Aug 6, 2025
Copy link
Copy Markdown
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Makes sense to me assuming they already pass as-is 👍

Copy link
Copy Markdown
Member

@sirreal sirreal left a comment

Choose a reason for hiding this comment

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

Good to get ahead of this, thanks!

@desrosj desrosj merged commit d3db281 into trunk Aug 6, 2025
74 of 81 checks passed
@desrosj desrosj deleted the add/node-24-to-workflows branch August 6, 2025 20:51
@github-actions github-actions Bot added this to the Gutenberg 21.4 milestone Aug 6, 2025
@aduth
Copy link
Copy Markdown
Member

aduth commented Oct 29, 2025

The v24 LTS is now available. What are the next steps for making this the "default" version?

Following your earlier comment and specifically around having a "compelling argument", one relatively significant feature I'm hoping to start leveraging is native TypeScript support. For example, a lot of the new build tooling that @youknowriad has been championing through #72032 would benefit from this (example).

@jsnajdr
Copy link
Copy Markdown
Member

jsnajdr commented Oct 29, 2025

Another compelling feature that is only in 24 and late 22 versions is the findPackageJSON function in the node:module package. It comes very handy in esbuild plugins for the WordPress build and we've been able to simplify out setup a lot when we discovered it.

@aduth
Copy link
Copy Markdown
Member

aduth commented Nov 4, 2025

Created an issue for tracking LTS update in #72973

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants