Skip to content

feat!: remove use-node-version CLI option and pnpm.executionEnv.nodeVersion manifest field#10373

Merged
zkochan merged 8 commits intomainfrom
deprecate-old-node-engine-settings
Dec 27, 2025
Merged

feat!: remove use-node-version CLI option and pnpm.executionEnv.nodeVersion manifest field#10373
zkochan merged 8 commits intomainfrom
deprecate-old-node-engine-settings

Conversation

@zkochan
Copy link
Copy Markdown
Member

@zkochan zkochan commented Dec 27, 2025

Instead of use-node-version use devEngines.runtime.

Instead of pnpm --config.useNodeVersion=20.0.0 <node.js cli tool>, use pnpm dlx node@runtime:20.0.0 <node.js cli tool>

@zkochan zkochan marked this pull request as ready for review December 27, 2025 21:03
Copilot AI review requested due to automatic review settings December 27, 2025 21:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the deprecated use-node-version CLI option and pnpm.executionEnv.nodeVersion manifest field as part of a breaking change. Users should now use devEngines.runtime and engines.runtime fields instead, or use pnpm dlx node@runtime:<version> for running Node.js CLI tools with specific versions.

Key Changes:

  • Removed automatic Node.js version switching functionality based on manifest configuration
  • Removed --use-node-version CLI option from all commands
  • Updated dlx command test to use new --package=node@runtime:<version> syntax

Reviewed changes

Copilot reviewed 39 out of 40 changed files in this pull request and generated no comments.

Show a summary per file
File Description
workspace/find-packages/test/fixtures/warning-for-non-root-project/packages/foo/package.json Removed executionEnv from test fixture's pnpm object
workspace/find-packages/test/fixtures/warning-for-non-root-project/packages/bar/package.json Removed executionEnv from test fixture's pnpm object
workspace/find-packages/src/index.ts Removed whitelist check for non-root pnpm fields; now warns for all pnpm fields in non-root projects
releasing/plugin-commands-publishing/test/recursivePublish.ts Removed test for pnpm.executionEnv.nodeVersion during publishing
releasing/plugin-commands-publishing/src/publish.ts Removed prepareExecutionEnv call from lifecycle script execution
releasing/plugin-commands-deploy/test/shared-lockfile.test.ts Removed executionEnv from test manifest fixtures
releasing/plugin-commands-deploy/src/createDeployFiles.ts Removed merging of non-root pnpm fields into deploy manifest
pnpm/test/run.ts Removed test for recursive run with different node versions
pnpm/test/install/lifecycleScripts.ts Removed tests for workspace packages using executionEnv.nodeVersion
pnpm/test/exec.ts Removed entire test file for exec with executionEnv
pnpm/test/dlx.ts Updated test to use new --package=node@runtime:<version> syntax instead of --use-node-version
pnpm/test/cli.ts Removed test for useNodeVersion in workspace manifest
pnpm/src/main.ts Removed prepareExecutionEnv logic and simplified nodeVersion handling
pnpm-lock.yaml Removed @pnpm/plugin-commands-env dependency from plugin-commands-installation
pkg-manager/plugin-commands-installation/tsconfig.json Removed reference to plugin-commands-env package
pkg-manager/plugin-commands-installation/src/update/index.ts Removed prepareExecutionEnv parameter
pkg-manager/plugin-commands-installation/src/installDeps.ts Removed PrepareExecutionEnv type and parameter
pkg-manager/plugin-commands-installation/src/install.ts Removed prepareExecutionEnv binding
pkg-manager/plugin-commands-installation/src/dedupe.ts Removed prepareExecutionEnv binding
pkg-manager/plugin-commands-installation/src/add.ts Removed prepareExecutionEnv binding
pkg-manager/plugin-commands-installation/package.json Removed @pnpm/plugin-commands-env dependency
pkg-manager/core/src/install/index.ts Removed prepareExecutionEnv from lifecycle options
pkg-manager/core/src/install/extendInstallOptions.ts Removed PrepareExecutionEnv type and option
packages/types/src/package.ts Removed executionEnv from PnpmSettings interface
packages/types/src/index.ts Removed export of env.ts types
packages/types/src/env.ts Deleted entire file containing execution environment types
packages/constants/src/index.ts Removed USEFUL_NON_ROOT_PNPM_FIELDS constant
exec/plugin-commands-script-runners/test/index.ts Removed test for running scripts with node version
exec/plugin-commands-script-runners/src/runRecursive.ts Removed prepareExecutionEnv logic from recursive script execution
exec/plugin-commands-script-runners/src/run.ts Removed use-node-version option and executionEnv handling
exec/plugin-commands-script-runners/src/exec.ts Simplified path preparation by removing per-package execution env logic
exec/plugin-commands-script-runners/src/dlx.ts Removed use-node-version option type
exec/lifecycle/src/runLifecycleHook.ts Removed prepareExecutionEnv call from lifecycle hook execution
env/plugin-commands-env/test/node.test.ts Removed test for prepareExecutionEnv function
env/plugin-commands-env/src/node.ts Removed prepareExecutionEnv export and implementation
env/plugin-commands-env/src/index.ts Removed prepareExecutionEnv from exports
config/config/test/index.ts Updated tests to use fetchRetries instead of useNodeVersion for testing environment variable and CLI option precedence
config/config/src/getOptionsFromRootManifest.ts Removed executionEnv from options mapping
config/config/src/Config.ts Removed useNodeVersion from Config interface
.changeset/small-numbers-joke.md Added changeset documenting the breaking change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zkochan zkochan added this to the v11.0 milestone Dec 27, 2025
@zkochan zkochan merged commit 71de2b3 into main Dec 27, 2025
17 of 19 checks passed
@zkochan zkochan deleted the deprecate-old-node-engine-settings branch December 27, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants