i18n: Fix node version compatible#48368
Conversation
Fix node version compatible with null coalescing operator. - The null coalescing operator support is available from node 14 only. Reference: https://node.green/#ES2020-features--nullish-coalescing-operator----- Resolves: https://github.com/WordPress/gutenberg/pull/45414/files
|
The change makes sense, but AFAIK all packages have the same Maybe this should now be changed again for all packages simultaneously? @gziolo @youknowriad maybe one of you could chime in on that? |
|
I agree we need to make some upgrades to node version (minimum and used version) and npm versions. What would you suggest @gziolo? Last LTS? |
|
Node 14 is the last supported LTS version. They will stop supporting Node 14 on April 30, so we should start thinking about setting the minimum version to Node 16. However, we would have to switch to Node 18 and npm 9 in the Gutenberg project and also in WordPress core. |
|
So I guess it's safe to say that today we can update all these minimum versions for our packages to 14 or we can wait a bit and go directly to 16 on April 30. |
Yes, for now, we can do Node 14 everywhere, which should also be annotated in CHANGELOG files as a breaking change to enforce a major version bump for updated packages. I can find some prior art in a bit. Edit: #43141. I'm not sure why we are still at Node 12 being the minimum for production packages 😅 |
What?
Part of Upgrade node and npm to latest LTS versions.
Fix node version compatible with null coalescing operator.
Reference:
https://node.green/#ES2020-features--nullish-coalescing-operator-----
Resolves:
https://github.com/WordPress/gutenberg/pull/45414/files
Why?
Resolves syntax error unexpected token in older node version.
Screenshots or screencast