Files
pnpm/pnpm11/engine/runtime/commands/tsconfig.json
3478d6f0c1 fix: allow pnpm env remove to delete pnpm-managed Node versions (#15720)
`pnpm env use --global` still requires a global bin directory that pnpm owns and that is on PATH. Removing a Node version only deletes copies pnpm already stored under its home (`nodejs/<version>`), and listing versions does not link a binary, so those commands no longer stop when the global bin is missing or not on PATH.

The TypeScript CLI skips the global-bin PATH check for `env remove` and `env list` (and their aliases) before config loading, because that check ran before the env handler and rejected brew and npm installs. The handler still throws `ERR_PNPM_CANNOT_MANAGE_NODE` for `env use` when there is no global bin. The Rust CLI applies the same split: `use` still returns `CannotManageNode` without a global bin, and `remove` still deletes the store when `global_dirs` cannot be resolved.

Removing the active global `node` package no longer spawns `pnpm remove --global node`, because that child process ran the PATH check again and failed. The TypeScript CLI splits `removeGlobalGroups` out of `handleGlobalRemove` and calls it in-process with the group `env remove` detected. The Rust CLI splits `remove_global_groups` out of `handle_global_remove` the same way. Both still unlink the package's bins when a global bin directory exists.

Closes pnpm/pnpm#8357

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 01:39:53 +02:00

47 lines
773 B
JSON

{
"extends": "@pnpm/tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src"
},
"include": [
"src/**/*.ts",
"../../../__typings__/**/*.d.ts"
],
"references": [
{
"path": "../../../cli/utils"
},
{
"path": "../../../config/reader"
},
{
"path": "../../../core/error"
},
{
"path": "../../../core/logger"
},
{
"path": "../../../core/types"
},
{
"path": "../../../exec/pnpm-cli-runner"
},
{
"path": "../../../global/commands"
},
{
"path": "../../../global/packages"
},
{
"path": "../../../network/auth-header"
},
{
"path": "../../../network/fetch"
},
{
"path": "../node-resolver"
}
]
}