pnpm.io icon indicating copy to clipboard operation
pnpm.io copied to clipboard

Clarify the interaction of `useNodeVersion`/`executionEnv.nodeVersion` and `nodeVersion` in settings documentation

Open sdavids opened this issue 9 months ago • 0 comments

https://pnpm.io/settings#usenodeversion

https://pnpm.io/settings#executionenvnodeversion

https://pnpm.io/settings#nodeversion

If you want to prevent contributors of your project from adding new incompatible dependencies, use > nodeVersion and engineStrict in a pnpm-workspace.yaml file at the root of the project:

DRY:

useNodeVersion: 12.22.0
engineStrict: true
executionEnv:
  nodeVersion: 12.22.0
engineStrict: true

Or not DRY?

useNodeVersion: 12.22.0
nodeVersion: 12.22.0
engineStrict: true
executionEnv:
  nodeVersion: 12.22.0
nodeVersion: 12.22.0
engineStrict: true

node -v is executed after the useNodeVersion/executionEnv.nodeVersion has been installed therefore an explicit nodeVersion is unnecessary?

sdavids avatar May 22 '25 16:05 sdavids