-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Migrate deprecated 'assert' import syntax, bump to Node 18.20 #35826
Conversation
b8555ae
to
0261ad7
Compare
After seeing that this PR failed in the Github workflow due to I'll await some feedback. I can for instance include a reference in the contributor docs to look at |
Thanks for opening this one. We have a tracker for moving to Node 20 in MDN repos here: mdn/mdn#521 |
According to the linked issue no one should start working on this yet. Should I then just revert all nvmrc and package.json changes, but keep the rest and explicitly set the engine to ">=18.18.0, < 19.0.0" to avoid issues such as the ones I got? I could also make a mention in the contributing.md docs about referring to |
We strive to support all current and future LTS versions of Node.js, and currently also support the active LTS version 18. So we don't want to restrict the engine to The good news is that Node 18.20.0 added support for import attributes, so we should require @fatso83 Can you update your PR accordingly? 🙏 |
0261ad7
to
9df769a
Compare
25176e4
to
0964c38
Compare
Updates done |
This is the minimum version that supports the new `import ... with` syntax.
0964c38
to
29398a2
Compare
yarn start
and missing supported Node versions
Thanks @fatso83! |
* Remove deprecated 'assert' import syntax in favor of 'with' fixes #35825 * Set minimum Node version in `.engines` field to 18.20.0 This is the minimum version that supports the new `import ... with` syntax.
Description
This fixes #35825 by ensuring that
yarn start
works. Currently this breaks on both Node 20 and 22 due to scripts using a mix of syntax only supported by either version.Motivation
I wanted to contribute a tiny fix and this made it impossible to check the result by firing up
yarn start
(it still does, by the way, as the proxy feature doesn't seem to work on my Mac). Now, at least, I can run tests and linting.Additional details
Related issues and pull requests
Fixes #35825
Background
nodejs/node#51622