-
Notifications
You must be signed in to change notification settings - Fork 222
Description
What is devEngines?
The official package.json format now supports a devEngines field.
{
"name": "my-project",
"devEngines": {
"runtime": {
"name": "node",
"version": ">= 24.0.0"
},
"packageManager": {
"name": "npm",
"version": "11.7.0"
}
}
}The official docs are not very detailed, so for more info, just refer to the original proposal:
Request
This gives us an actual official place to store this data for Node projects. All Node and npm version management tools, should treat these documented version numbers as the highest priority (ignoring .nvmrc, .node-version, "volta" object, mise.toml, etc), and auto-switch to use what is defined in the devEngines.
The version numbers do allow for a range though. I think the most logical thing for a tool to do is to check for any existing cached node/npm versions that would satisfy the range and use the most recent available option, or if none exist locally download the latest version that would satisfy the given range and auto-switch to it.