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

Upgrade to Node 18 #2002

Open
4 tasks
puntope opened this issue Jun 27, 2023 · 0 comments
Open
4 tasks

Upgrade to Node 18 #2002

puntope opened this issue Jun 27, 2023 · 0 comments
Labels
status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. type: enhancement The issue is a request for an enhancement.

Comments

@puntope
Copy link
Contributor

puntope commented Jun 27, 2023

Details

This issue is for upgrading the Node version since 14 (current version) has reached the end of it’s security support period. Since we rely on WP and WC components we should probably follow along with the Gutenberg issue:

WordPress/gutenberg#48588

Their current plan is to jump to Node 18.

This issue will also be helpful to collect any blockers which might be preventing us from upgrading the Node version.

Is your feature request related to a problem?

Node 14 (current version) has reached the end of it’s [security support period]

Describe the solution you'd like

Update to Node 18

📌 Blockers to check

Why blocked

With the current dependency tree, there are some packages do not / will not support Node.js v18, for example:

  1. @es-joy/jsdoccomment@0.20.1, a child dependency of @wordpress/scripts@24.6.0, doesn't support v18.
  2. This extension currently uses @woocommerce/components@10.3.0, but @woocommerce/components@12.0.0 (the current L-2 WC) only supports v16.

The first example blocks this extension to use v18 for now, and the second one may force it to downgrade to v16 in the future.

How to check

Since packages don't always accurately reflect the scope of Node.js support for children dependencies, confirming that these blocks have been removed usually requires actually upgrading the dependencies and testing the installation with Node.js v18 to see if it completes successfully.

Until then, another way to get a quick overview of package's Node.js support is npm view <packageName> engines, for example:

> npm view "@woocommerce/components@>=12" engines
@woocommerce/components@12.0.0 { node: '^16.13.1', pnpm: '^7.13.3' }
@woocommerce/components@12.1.0 { node: '^16.14.1', pnpm: '^8.6.5' }

Acceptance criteria

  • Node engines set to >= 18
  • .nvmrc set to v18
  • App compiles without errors with Node 18
  • JS tests run correctly without errors with Node 18
@puntope puntope added the type: enhancement The issue is a request for an enhancement. label Jun 27, 2023
@eason9487 eason9487 added the status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants