Problem/Motivation
DrupalCI is currently using Node.js 8.16.0 which is EOL since the end of 2019: https://nodejs.org/en/about/releases/. Drupal core would like to drop support for Node.js 8: #3107918: Require Node.js 12.
Proposed resolution
Update to a more recent version of Node.js.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3107927-13.patch | 17.89 KB | lauriii |
| #10 | output.txt | 23.84 KB | lauriii |
| #9 | nightwatch_node_12.15.0.txt | 3.44 KB | bnjmnm |
| #9 | nightwatch_node_8.16.0.txt | 3.44 KB | bnjmnm |
| #6 | 3107927-6.patch | 936 bytes | lauriii |
Comments
Comment #2
lauriiiHave we updated DrupalCI Node.js version before? I'm wondering if this will cause issues with contrib projects. Should we instead allow projects to configure which major version of Node.js they would like to use?
Comment #3
lauriiiComment #4
xjmComment #5
lauriiiComment #6
lauriiiThis updates to Node.js 12.x
Comment #7
damienmckennaTagging as a requirement for Drupal 9.0-beta1.
Comment #8
hestenetThanks very much @laurii! There's one more thing we'd like to test before merging in and deploying - we want to make sure that Nightwatch testing still works properly with this change.
Is that something you can test locally? (No huge rush, we're currently knocking out some unrelated alpha/beta blocker stuff)
Comment #9
bnjmnmNightwatch appears to work fine. Attached are the results running 8.16 and 12.15
Comment #10
lauriiiHere's a console output of the test runner running Nighwatch tests with Node.js 12. I added step to the test runner which outputs the Node.js version near the end to confirm that the Node.js version is indeed updated. I also tried to run functional JavaScript tests but it seems like I'm getting lots of random failures both before and after this change so I wouldn't be able to provide a consistent output from there.
Comment #11
gábor hojtsyComment #12
xjmComment #13
lauriiiHere's a patch that updates to Node 12, but also installs nvm so that the Node version can be configured in the test runner to be one of the pre-installed Node.js versions.
Comment #14
MixologicWhat is this, and why is it necessary?
Comment #15
lauriiiThis is needed so that we can use
bash -lon #3124107: Allow selecting Node.js version with nvm. The problem is thatmesg ncommand outputsstdin: is not a ttybecause when we run commands withbash -ctty hasn't been allocated.Comment #16
MixologicWe did some research and some testing, and determined that there are likely very, very few projects that would be impacted by a wholesale upgrade from 8 -> 12.
We tested this in the dev container environment, and everything appears to be running fine for core testing, so this has now been deployed to production, and drupalci now uses node12 when it does its yarn install step (and also nightwatch tests now rely on node 12)