Page MenuHomePhabricator

Create WMF CI image for Node.js 14
Open, Needs TriagePublic



ReleaseInitial ReleaseActive LTS StartMaintenance StartEnd-of-life
Node.js 102018-04-242018-10-302020-05-192021-04-30
Node.js 122019-04-232019-10-212020-11-302022-04-30
Node.js 142020-04-212020-10-272021-10-19April 2023

As the EOL date for Node.js 10 is nearing, support from the ecosystem is starting to decline. This is primarly due to the ES2019 and ES2020 specifications for JavaScript (adopted in Node.js 12) being relatively big in terms of added capabilities.

Specifically, capabilities that can't easily run-time polyfilled, such as Node.js natively supporting the dynamic import() keyword for reading the .mjs file format, which older Node.js versions can't read (by default).

Use of native ESM is pretty much an all-or-nothing deal when packages are choosing to use it, they are forced to drop Node 10 at the same time. This won't immediately break anything since that will (hopefully) be a SemVer-Major change. But it does mean we might start to have some challenges updating packages, especially if there is an indirect dependency somewhere deep in the tree that didn't follow SemVer. At that point it would take a long time to chase down the whole chain and encourage each one to pin the version of the previous one. (Yay for npm not supporting shrinkwrap/lockfile for libraries.)

This means when developers update package.json locally and check-in package-lock.json, it will pass locally but fail in CI. Or if they use Node 10 locally as well, it'll fail both ways. I'm not actually sure there's even a clear way to fix that apart from manual package-lock.json patching for each update.

Anyway, this task is for creating a Node 14 base image for WMF CI. To be closed once:

  • The images node14, node14-test, node14-test-browser exist in integration-config.
  • The node14-test-browser image is used by the JJB job of at least one Gerrit repository and passing.

For further adoption, separate small or big parent tasks should be filed.