Describe the user story
As a developer, I want to be able to use a tool that requires an older or newer Node.js version, even if the project uses a different Node.js version.
Describe the solution you'd like
Add a new field to package.json that describes what Node.js version should be used for running a given CLI. For instance:
{
"dependencies": {
"eslint": "7"
},
"dependenciesMeta": {
"eslint": {
"node": "12.17.1"
}
}
}
This field will be automatically populated, if the dependency will be installed using the --node option:
pnpm add eslint --node=12.17.1
pnpm will install the given Node.js version using its Node management feature. The command shim generated at node_modules/.bin/eslint will use the specified node version to run eslint.
Describe the user story
As a developer, I want to be able to use a tool that requires an older or newer Node.js version, even if the project uses a different Node.js version.
Describe the solution you'd like
Add a new field to
package.jsonthat describes what Node.js version should be used for running a given CLI. For instance:{ "dependencies": { "eslint": "7" }, "dependenciesMeta": { "eslint": { "node": "12.17.1" } } }This field will be automatically populated, if the dependency will be installed using the
--nodeoption:pnpm will install the given Node.js version using its Node management feature. The command shim generated at
node_modules/.bin/eslintwill use the specified node version to run eslint.