Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: Fix node version compatible #48368

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

gvgvgvijayan
Copy link
Contributor

@gvgvgvijayan gvgvgvijayan commented Feb 23, 2023

What?

Part of Upgrade node and npm to latest LTS versions.

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

Why?

Resolves syntax error unexpected token in older node version.

Screenshots or screencast

null-coalescing

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
@swissspidy
Copy link
Member

The change makes sense, but AFAIK all packages have the same "node": ">=12" setting. (See #31270 for when this was updated the last time).

Maybe this should now be changed again for all packages simultaneously?

@gziolo @youknowriad maybe one of you could chime in on that?

@youknowriad
Copy link
Contributor

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?

@gziolo
Copy link
Member

gziolo commented Feb 24, 2023

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.

@youknowriad
Copy link
Contributor

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.

@gziolo
Copy link
Member

gziolo commented Feb 24, 2023

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 😅

@gziolo gziolo changed the title Fix node version compatible i18n: Fix node version compatible Mar 1, 2023
@gziolo gziolo added the [Package] i18n /packages/i18n label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] i18n /packages/i18n
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants