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

npm 11 engines declaration #899

Closed
Tracked by #898
wraithgar opened this issue Sep 25, 2024 · 3 comments
Closed
Tracked by #898

npm 11 engines declaration #899

wraithgar opened this issue Sep 25, 2024 · 3 comments

Comments

@wraithgar
Copy link
Member

Node.js 18 is going EOL in 2025 April.

Node.js 20 has to at the very minimum clear 20.5.0 because of the transition from --loaders to --imports, breaking the execution order of loaders and causing issues especially w/ things like tap (more info also at npm/template-oss#451)

Historically we've either picked a floor based on features we want to start using (like private class attributes), the Node.js release schedule, and which versions of npm are in which supported version of Node.js. We don't currently have any features we are waiting to use, the aforementioned loader change is the only node version issue we are concerned about.

The new npm engines should either be

{ node: '^v20.17.0 || >= 22.9.0' }

or

{ node: '>= 22.9.0' }

Even if Node.js v20 does not get npm 11 added to it by default, it would still be good to allow folks using it to be on the latest npm. Absent any compelling reason to drop 20 altogether I think we should keep it.

@ljharb
Copy link

ljharb commented Sep 25, 2024

If unflagged require of esm gets backported to node 20 (unclear if it can) then that would definitely be what you'd want to hold out for.

@wraithgar
Copy link
Member Author

Unflagged esm require update: nodejs/node#55085 (comment)

What this realistically is going to mean is we'll likely have the same situation we had with p-map in npm 9 and currently have with tap in npm 10, where we can't update until the next semver major cycle. That is assuming folks who publish dependencies in the npm cli tree jump on this immediately.

@wraithgar
Copy link
Member Author

I don't think the esm require is reason enough to drop node 20 support. If it's backported (soon) that is nice but I think "latest 20 and latest 22" is going to be what we go with whenever we make the cut.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants