Problem/Motivation

Node.js 8 is EOL since the end of 2019. Node.js is only used by our development tooling.

Proposed resolution

Drop support for Node.js 8. Require 10.18.0 instead which is the oldest supported version.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Node.js is a development dependency for Drupal core. In Drupal 9, Drupal core's Node.js requirement has been updated from 8.11.0 to 12.0.0. (Information on changes in Node.js 12.) An updated version of Node.js can be installed directly or with nvm. This only affects sites that have installed Drupal core's JavaScript development dependencies with npm or yarn.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lauriii created an issue. See original summary.

lauriii’s picture

lauriii’s picture

Title: Drop support for Node.js 8 » [PP-1] Drop support for Node.js 8
Status: Needs review » Postponed

We need resolve #3107927: Update Node.js to a more recent version on DrupalCI before we can move forward with this.

xjm’s picture

lauriii’s picture

Any thoughts on requiring Node.js 12 on Drupal 9? According to https://nodejs.org/en/about/releases/, Node.js 10 will be EOL in May 2021. Requiring Node.js 12 would give us an additional year since it will be EOL in May 2022.

Depending on the release schedule of Drupal 9, we might want to consider requiring Node.js 14 which will have its initial release in April. This would give us support until May 2023.

Gábor Hojtsy’s picture

xjm’s picture

Issue tags: +beta target
andypost’s picture

Title: [PP-1] Drop support for Node.js 8 » Drop support for Node.js 8
Status: Postponed » Needs work
lauriii’s picture

Status: Needs work » Needs review
lauriii’s picture

@catch mentioned on Slack that we can change our Node.js dependency in a minor release since it's only a development dependency. This removes some urgency around dropping support for Node.js 10. Based on that, we could move forward with #2.

effulgentsia’s picture

Per #3107927-16: Update Node.js to a more recent version on DrupalCI, DrupalCI is now using Node12. Is there a compelling reason to still support Node10? If there is, then ok, but if not, then I think we should set the minimum to match what DrupalCI tests.

lauriii’s picture

We probably don't have a strong reason to keep support for Node.js 10. There are some changes in the platform requirements of Node.js 12 which are described here: https://medium.com/@nodejs/introducing-node-js-12-76c41a1b3f3f. However, the changes don't seem severe, especially given that Node.js is just a development dependency.

On the other hand, I don't think it would be that much extra effort from us to keep supporting Node.js 10 for another year. It seems like all of our dependencies have kept support for Node.js 10. I also haven't seen any Node.js version specific bug reports since we introduced a development dependency on Node.js. Probably the biggest cost associated to supporting Node.js 10 would be having to drop support for Node.js 10 next spring once it's EOL.

xjm’s picture

Title: Drop support for Node.js 8 » Require Node.js 12
Status: Needs review » Needs work
Issue tags: +rc deadline

We discussed this today in the committer meeting and agreed to require Node.js 12, ideally before RC. NW to update the patch for 12 instead of 10.

lauriii’s picture

Status: Needs work » Needs review
FileSize
348 bytes

Here's a new patch which sets Node.js 12.0 as the minimum requirement.

xjm’s picture

Do we not need to rebuild the lock file for this?

lauriii’s picture

We don't have to update the lock file because we are not changing any dependencies as part of this issue

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Works for me. If I try to install with the version of node that ships in the Ubuntu 18.04 base repos I get an error:

$ nodejs --version
v8.10.0
$ yarn install
yarn install v1.22.4
[1/5] Validating package.json...
error Drupal@: The engine "node" is incompatible with this module. Expected version ">= 12.0". Got "8.10.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

If I try with a newer version:

$ nodejs --version
v12.16.2
$ yarn install
yarn install v1.22.4
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.1.2: The platform "linux" is incompatible with this module.
info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
Done in 3.56s.
xjm’s picture

Assigned: Unassigned » xjm

Reviewing now.

xjm’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs release note, +9.0.0 release notes

Oopsie, we need a release note.

lauriii’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs release note

Added release note

xjm’s picture

Issue summary: View changes

Making the release note a bit more direct/clearer.

xjm’s picture

Status: Needs review » Reviewed & tested by the community

Doesn't need to be NR since it's just a release note wording tweak (though I did ask @lauriii to double-check my update to the release note).

xjm’s picture

Saving issue credit.

  • xjm committed c39a635 on 9.1.x
    Issue #3107918 by lauriii, xjm, longwave, effulgentsia: Require Node.js...

  • xjm committed 146db30 on 9.0.x
    Issue #3107918 by lauriii, xjm, longwave, effulgentsia: Require Node.js...
xjm’s picture

Assigned: xjm » Unassigned
Status: Reviewed & tested by the community » Fixed

Committed to 9.1.x and 9.0.x. Thanks!

xjm’s picture

Issue summary: View changes

Also adding the reference on Node 12 changes.

xjm’s picture

Issue summary: View changes
xjm’s picture

Issue summary: View changes
xjm’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Wim Leers’s picture

Related issues: +#3261734: Require Node.js 16

FYI: next update: #3261734: Require Node.js 16.