feat: added engines.runtime to pnpm CLI

The pnpm CLI will now be installed with Node.js
This commit is contained in:
Zoltan Kochan
2025-11-10 01:22:12 +01:00
parent df6d546e13
commit 8a31cf1398
3 changed files with 15 additions and 6 deletions

View File

@@ -0,0 +1,5 @@
---
"pnpm": major
---
The pnpm CLI now gets installed with a specific version of Node.js, which it uses for its runtime. This makes pnpm more stable and it doesn't rely on your globally install Node.js anymore.

View File

@@ -378,9 +378,9 @@ async function updateManifest (workspaceDir: string, manifest: ProjectManifest,
bugs: {
url: 'https://github.com/pnpm/pnpm/issues',
},
engines: {
node: '>=20.19',
},
engines: manifest.engines?.runtime != null
? manifest.engines
: { node: '>=20.19' },
files,
funding: 'https://opencollective.com/pnpm',
homepage,

View File

@@ -78,7 +78,6 @@
"devDependencies": {
"@jest/globals": "catalog:",
"@pnpm/assert-project": "workspace:*",
"@pnpm/fs.v8-file": "workspace:*",
"@pnpm/byline": "catalog:",
"@pnpm/cache.commands": "workspace:*",
"@pnpm/cli-meta": "workspace:*",
@@ -97,6 +96,7 @@
"@pnpm/exec.build-commands": "workspace:*",
"@pnpm/filter-workspace-packages": "workspace:*",
"@pnpm/find-workspace-dir": "workspace:*",
"@pnpm/fs.v8-file": "workspace:*",
"@pnpm/lockfile.types": "workspace:*",
"@pnpm/logger": "workspace:*",
"@pnpm/modules-yaml": "workspace:*",
@@ -153,10 +153,10 @@
"deep-require-cwd": "catalog:",
"delay": "catalog:",
"dir-is-case-sensitive": "catalog:",
"get-port": "catalog:",
"esbuild": "catalog:",
"execa": "catalog:",
"exists-link": "catalog:",
"get-port": "catalog:",
"ini": "catalog:",
"is-windows": "catalog:",
"load-json-file": "catalog:",
@@ -179,7 +179,11 @@
"write-yaml-file": "catalog:"
},
"engines": {
"node": ">=20.19"
"runtime": {
"name": "node",
"version": "24.11.0",
"onFail": "download"
}
},
"pnpm": {
"overrides": {