Files
pnpm/runtime/commands/package.json
Zoltan Kochan 2efb5d2919 feat: add pnpm runtime set command and deprecate pnpm env use (#10671)
* feat: add `pnpm runtime set` command and deprecate `pnpm env use`

Add a new `pnpm runtime set <name> <version> [-g]` command (alias: `rt`)
in a new `@pnpm/runtime.commands` package. It delegates to
`pnpm add <name>@runtime:<version>` supporting node, deno, and bun.

`pnpm env use` now prints a deprecation warning pointing users to the
new command.

* fix: address PR review feedback for runtime command

- Use opts.dir as cwd when --global is not passed (instead of always
  using pnpmHomeDir)
- Only pass --global-bin-dir when in global mode
- Keep deprecated env command in help output for discoverability
- Add Jest tests for the runtime command (7 tests)
2026-03-01 18:14:57 +01:00

57 lines
1.4 KiB
JSON

{
"name": "@pnpm/runtime.commands",
"version": "1000.0.0-0",
"description": "pnpm commands for managing runtimes",
"keywords": [
"pnpm",
"pnpm11",
"runtime"
],
"license": "MIT",
"funding": "https://opencollective.com/pnpm",
"repository": "https://github.com/pnpm/pnpm/tree/main/runtime/commands",
"homepage": "https://github.com/pnpm/pnpm/tree/main/runtime/commands#readme",
"bugs": {
"url": "https://github.com/pnpm/pnpm/issues"
},
"type": "module",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"exports": {
".": "./lib/index.js"
},
"files": [
"lib",
"!*.map"
],
"scripts": {
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
"_test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest",
"prepublishOnly": "pnpm run compile",
"compile": "tsgo --build && pnpm run lint --fix",
"test": "pnpm run compile && pnpm run _test"
},
"dependencies": {
"@pnpm/cli-utils": "workspace:*",
"@pnpm/config": "workspace:*",
"@pnpm/error": "workspace:*",
"@pnpm/exec.pnpm-cli-runner": "workspace:*",
"render-help": "catalog:"
},
"peerDependencies": {
"@pnpm/logger": "catalog:"
},
"devDependencies": {
"@jest/globals": "catalog:",
"@pnpm/logger": "workspace:*",
"@pnpm/runtime.commands": "workspace:*",
"cross-env": "catalog:"
},
"engines": {
"node": ">=22.13"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}