From Fedora Project Wiki


Node.js 16.x by default

Summary

The latest release of Node.js to carry a 30-month lifecycle is the 16.x series. As with 14.x, 12.x, 10.x and 8.x before it, Fedora 35 will carry 16.x as the default Node.js interpreter for the system. The 14.x and 12.x interpreters will remain available as non-default module streams.

Owner

Current status

Detailed Description

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

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 16.x release, Fedora 35 will also have the 14.x and 12.x releases available as selectable module streams.

Scope

  • Proposal owners:

The packages are already built for Fedora 33, 34 and 35 in a non-default module stream. On June 14th, 2021, the nodejs-16.x packages will be built in the non-modular repository and thus become the default in Fedora 35.

  • 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 16.x module stream enabled as soon as possible. Issues should be reported to nodejs@lists.fedoraproject.org

  • Release engineering:

We will coordinate with the Node.js SIG to create a side-tag to perform the rebuilds before making 16.x the default.

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

Upgrade/compatibility impact

As with previous releases, users running Fedora 33 or Fedora 34 with the non-modular nodejs-14.x packages will be automatically upgraded to the 16.x packages when they upgrade to Fedora 35, which may cause issues. If users are running software known not to support Node.js 16.x yet, they can switch the system to use 14.x with dnf module commands.

How To Test

  • Confirm that dnf install nodejs results in Node.js 16.x being installed.
  • Confirm that upgrading from Fedora 33 or Fedora 34 with nodejs-14.x installed (non-modular) results in an upgrade to nodejs-16.x
  • Confirm that upgrading from Fedora 33 or Fedora 34 with the nodejs:14 module enabled does *not* result in an upgrade to 16.x and still has nodejs:14 enabled on Fedora 35.
  • Confirm that upgrading from Fedora 33 or Fedora 34 with the nodejs:16 module enabled upgrades successfully and still has nodejs:16 enabled on Fedora 33.

User Experience

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

Dependencies

All packages prefixed with nodejs- depend on this package. If they do not work with Node.js 16.x, they will need to be updated, made modular and dependent upon the nodejs:14 stream or else removed from Fedora 35.

Prior to the switchover date to Node.js 16.x as the default, packagers are strongly encouraged to test their existing Node modules with 16.x via the Modular version by running:

dnf module reset nodejs
dnf module install nodejs:16/development

Packagers can also test their builds using mock by creating the file /etc/mock/fedora-rawhide-x86_64-nodejs16.cfg with the following contents:

config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['enable_disable_repos'] = ['--enablerepo', 'rawhide-modular']
config_opts['module_install'] = ['nodejs:16/development']

include('templates/fedora-rawhide.tpl')

Then call

mock -r fedora-rawhide-x86_64-nodejs16 --enablerepo=rawhide-modular nodejs-foo

(Note that the --enablerepo=rawhide-modular portion looks redundant, but this is because of a mock bug)

Contingency Plan

  • Contingency mechanism: Revert to Node.js 14.x as the default Node.js interpreter. This will require bumping epoch.
  • Contingency deadline: Beta Freeze
  • Blocks release? No
  • Blocks product? No

Documentation

Release Notes

Fedora 35 now ships with Node.js 16.x as the default Node.js JavaScript server-side engine. If your applications are not yet ready for this newer version, you can revert to the 14.x series by running the following commands

dnf remove nodejs
dnf module reset nodejs
dnf module install nodejs:14