-
Notifications
You must be signed in to change notification settings - Fork 906
build: add engines field for bundlers and devEngines field for root #1705
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,5 +53,16 @@ | |
| "oxfmt --no-error-on-unmatched-pattern" | ||
| ] | ||
| }, | ||
| "packageManager": "pnpm@11.0.8" | ||
| "devEngines": { | ||
| "packageManager": { | ||
| "name": "pnpm", | ||
| "version": "11.1.2", | ||
| "onFail": "download" | ||
| }, | ||
| "runtime": { | ||
| "name": "node", | ||
| "version": "^22.18.0 || ^24.0.0 || ^26.0.0", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The purpose of the root package.json changes are different. Let's split it to a separate PR. Also this comment is valid
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, this is invalid. If you want node e2e test, then runtime MUST be allowed to use v22 and v26. And we do have such tests. pnpm v11 will throw error if it find itself running on node22 with strict runtime setting.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. But then why do we need this field? We'll always use .node-version for locking dev env?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. .node-version file is not standard. A GitHub user now will receive error msg if he is not running on these versions. This ensures any developers using correct node version to develop.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What we want is consistent node version instead of 'correct' node version, just like the lock file. That's the purpose of .node-version and why Copilot left this comment
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's the purpose of .node-version. I can change back the default behavior for reading a constant version at But as we are not a project that interacts with V8 engine's apis, so we should trust node's semver. Testing on the latest patch of a major is better at testing. We ensure our project is runable on latest patch, and since we are runable on previous versions, then we are likely not breaking anything. Unlike pure javascript pkgs, our project is a node-based tool, so letting our e2e test running on real, latest node versions is better. That fits our users' env. Only if we are developing a pure javascript package, fixing the node version could then be a better way. In this cases, we trust our packing tool and a stable testing env is our major concern. |
||
| "onFail": "error" | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not, npm v11 stops with this field.