F41 Change Proposal: Node.js 22.x by default (system-wide)

Node.js 22.x by default

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

Wiki
Announced

:link: Summary

The latest release of Node.js to carry a 30-month lifecycle is the 22.x series. As with 20.x, 18.x 16.x, 14.x, 12.x, 10.x and 8.x before it, Fedora 41 will carry 22.x as the default Node.js interpreter for the system. The 20.x, and 18.x interpreters will remain available as parallel-installable options.

:link: Owner

:link: Detailed Description

Fedora 41 will ship with the latest LTS version of Node.js. dnf install nodejs will give users Node.js 22.x and the matching npm package.

:link: Benefit to Fedora

Node.js is a popular server-side JavaScript engine. Keeping Fedora on the latest release allows us to continue tracking the state-of-the-art in that space. For those whose applications do not yet work with the 22.x release, Fedora 41 will also have the 20.x and 18.x releases available as selectable module streams.

:link: Scope

  • Proposal owners:

We will build Node.js 22.x in Rawhide over the next few days as a non-default version (similar to 18.x in Fedora 40). Once this is done, we will announce that the switch will occur on or soon after May 27th, 2024. At that time, we will rebuild Node.js 20.x in non-default mode and rebuild Node.js 22.x as the default “nodejs” package with the appropriate upgrade path.

  • Other developers: N/A (not a System Wide Change)

Any developer with a package that depends on Node.js at run-time or build-time should test with the 22.x alternative package as soon as possible. Issues should be reported to nodejs@lists.fedoraproject.org.

  • Release engineering:

  • Policies and guidelines: N/A (not needed for this Change)

  • Trademark approval: N/A (not needed for this Change)

:link: Upgrade/compatibility impact

Users running Fedora 39 or Fedora 40 with the nodejs-20 packages will be automatically upgraded to the 22.x packages when they upgrade to Fedora 41, which may cause compatibility issues. If users are running software known not to support Node.js 22.x yet, they will need to install the nodejs18 compatibility packages and possibly modify their startup scripts to call /usr/bin/node-18 rather than /usr/bin/node.

:link: How To Test

  • Confirm that dnf install nodejs results in Node.js 22.x being installed.
  • Confirm that upgrading from Fedora 39 or Fedora 40 with nodejs-20.x installed results in an upgrade to nodejs-22.x
  • Confirm that upgrading from Fedora 39 or Fedora 40 with the nodejs22 package installed results in an upgrade to the nodejs-22.x package, obsoleting the nodejs22 package.

:link: User Experience

Users will have the 22.x release of Node.js available by default. See the “Upgrade/compatibility impact” section for specific details.

:link: Dependencies

All packages prefixed with nodejs- depend on this package. If they do not work with Node.js 22.x, they will need to be updated, or made explicitly dependent upon the nodejs20 compatibility package or else removed from Fedora 41.

Prior to the switchover date to Node.js 22.x as the default, packagers are strongly encouraged to test their existing Node modules with 22.x by installing the nodejs22 forward-compatibility package (which provides /usr/bin/node-22

:link: Contingency Plan

  • Contingency mechanism: Revert to Node.js 20.x as the default Node.js interpreter. This will require bumping epoch.

  • Contingency deadline: Beta Freeze

  • Blocks release? No

  • Blocks product? No

:link: Documentation

:link: Release Notes

Fedora 41 now ships with Node.js 22.x as the default Node.js JavaScript server-side engine. If your applications are not yet ready for this newer version, they will need to be modified to depend on the compatibility package nodejs20 and to rely on /usr/bin/node20 rather than /usr/bin/node for operation.

Last edited by @amoloney 2024-04-28T20:23:24Z

How do you feel about the proposal as written?

  • Strongly in favor
  • In favor, with reservations
  • Neutral
  • Opposed, but could be convinced
  • Strongly opposed
0 voters

If you are in favor but have reservations, or are opposed but something could change your mind, please explain in a reply.

We want everyone to be heard, but many posts repeating the same thing actually makes that harder. If you have something new to say, please say it. If, instead, you find someone has already covered what you’d like to express, please simply giving that post a :heart: instead of reiterating. You can even do this by email, by replying with the heart emoji or just “+1”. This will make long topics easier to follow.

Please note that this is an advisory “straw poll” meant to gauge sentiment. It isn’t a vote or a scientific survey. See About the Change Proposals category for more about the Change Process and moderation policy.

Added f41 and removed f39

Or nodejs20 package, depending on the software in question, right?

In general, I think I understand just from reading this how different Node packages work and what the naming convention is. But if there is some page that explains the scheme, linking it near the beginning would make things more clear.

Yes, that was actually a typo in the Change Proposal. It should have been nodejs20.

This change proposal has now been submitted to FESCo with ticket #3209 for voting.

To find out more, please visit our Changes Policy documentation.

This change has been accepted by FESCo for Fedora Linux 41. A full list of approved changes to date can be found on the Change Set Page.

To find out more about how our changes policy works, please visit our docs site.

Hey @amoloney, could you create a bug in bugzilla for this change? Thanks!