iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
615 stars 210 forks source link

Drop Node@12, Node@14, Node@16 support #4777

Closed aruniverse closed 1 year ago

aruniverse commented 1 year ago

See node support https://github.com/nodejs/release#release-schedule

Node12 reached end of life a while back Node14 reaches end of life 4/30/23, which should be close enough to our hopeful 4.0 release Node16 reaches end of life later this yr, was moved up due to OpenSSL

paulius-valiunas commented 1 year ago

Interesting note here, seems like the Node API is slightly different than the browser API... it would be good to keep this in mind when migrating: https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID#browser_compatibility

paulius-valiunas commented 1 year ago

what is our support policy for browser versions? The browser API seems to be relatively new, let's make sure we support the versions we're promising to support.

GytisCepk commented 1 year ago

@aruniverse Electron is still running on Node 16 (version table).

aruniverse commented 1 year ago

@aruniverse Electron is still running on Node 16 (version table).

Aww man. Thanks for letting me know. Hopefully they'll have it updated by the time we release 4.0. If not we will need to continue supporting 16 then :/

Gytis, mind making an issue for the 4.0 backlog to drop electron support for the version electron doesn't support/maintain anymore based on that table?

GytisCepk commented 1 year ago

Hopefully they'll have it updated by the time we release 4.0. If not we will need to continue supporting 16 then :/

Looks like upcoming Electron 23 will be using Node 18 (DEPS file in Electron repo). Electron 23 should be coming out February 7. One think to keep in mind: if we decide to drop Node 16, we will need to drop all Electron versions what we will support in 3.6 and with no 3.7 in plans, with 4.0 we will jump versions like: "x - 22" to "23". Luckily, Electron major versions usually aren't very disruptive.

pmconne commented 1 year ago

We should probably update our matrix of supported platforms in docs/learning/SupportedPlatforms.md to break it down by major release. That information might also need to be made more visible, perhaps in api-support-policies.md. Our README simply says "Node 18".

aruniverse commented 1 year ago

Should we also update our es target? right now we target es2019, but if we're saying we support node18+ then we could bump to es2021 or es2022. https://kangax.github.io/compat-table/es2016plus/

GytisCepk commented 1 year ago

Should we also update our es target? right now we target es2019, but if we're saying we support node18+ then we could bump to es2021 or es2022. https://kangax.github.io/compat-table/es2016plus/

Upgrading to es2021 makes sense to me.

Not sure about es2022: es2022 compatibility seems to be a bit "spotty" at the moment.

aruniverse commented 1 year ago

when we start working on this task, id first drop 12 & 14, and then drop 16 a bit later

GytisCepk commented 1 year ago

PR for dropping Node 12 and Node 14: https://github.com/iTwin/itwinjs-core/pull/5012.

GytisCepk commented 1 year ago

PR for dropping Node 16: https://github.com/iTwin/itwinjs-core/pull/5077.