Minor Changes
-
Added a new setting
frozenStore(--frozen-store) that letspnpm installrun against a package store on a read-only filesystem (e.g. a Nix store, a read-only bind mount, an OCI layer). When enabled, pnpm opens the store's SQLiteindex.dbthrough theimmutable=1URI — bypassing the WAL/-shmsidecar creation that otherwise fails on a read-only directory — and suppresses every store-write path (theindex.dbwriter and the project-registry write). Pair it with--offline --frozen-lockfileagainst a fully-populated store. Under the global virtual store, package directories live inside the store, so if the store is missing the build output of a package whose lifecycle scripts are approved (or that has a patch), pnpm fails up front withERR_PNPM_FROZEN_STORE_NEEDS_BUILDrather than crashing mid-build on a read-only write — seed the store with those builds first. Incompatible with--forceand with a configured pnpr server, since both write into the store; the side-effects cache is likewise not written underfrozenStore. If the store is missing its content directory, the install fails fast withERR_PNPM_FROZEN_STORE_INCOMPLETErather than attempting to initialize it. The read-onlyimmutable=1open requires Node.js >=22.15.0, >=23.11.0, or >=24.0.0; on older runtimes--frozen-storefails with a clearERR_PNPM_FROZEN_STORE_UNSUPPORTED_NODEerror. Bin-linking also tolerates a read-only store: under the global virtual store a package's bin source lives inside the store, so thechmodthat makes it executable would be refused — withEPERM/EACCES, or withEROFSon a genuinely read-only filesystem. Thatchmodis redundant when the seed already ships its bins executable with a normalized shebang, so it is now skipped in that case, while a non-executable bin (or one still carrying a Windows CRLF shebang) on a read-only store still errors. -
When
pacquet(the Rust port of pnpm) is declared inconfigDependencies, pnpm now delegates dependency resolution to it too — not just materialization — provided the installed pacquet is new enough to support full resolving installs (>= 0.11.7).Previously pacquet only ran in frozen-install mode: pnpm always resolved the dependency graph itself (writing
pnpm-lock.yaml) and handed pacquet a finished lockfile to fetch / import / link. With pacquet >= 0.11.7, a non-frozenpnpm install(default isolatednodeLinker, plain install) is delegated to pacquet end-to-end in a single pass — pacquet resolves the manifests, writes the lockfile, and materializesnode_modules. pnpm detects the capability from the installed pacquet's version; older pacquet releases keep the resolve-then-materialize split, andadd/update/removestill resolve in pnpm (it has to mutate the manifests first). This remains an opt-in preview of the Rust install engine #11723. -
Added a new opt-in
--batchflag topnpm publish --recursivethat sends all selected packages to the registry in a singlePUT /-/pnpm/v1/publishrequest instead of one request per package. The target registry has to implement the batch publish endpoint (pnpr does); registries that don't are reported with a clearERR_PNPM_BATCH_PUBLISH_UNSUPPORTEDerror. The batch is processed all-or-nothing by pnpr: if any package in the batch fails validation, none of the packages are published.
Patch Changes
-
Reject path-traversal and reserved dependency aliases (such as
../../../escape,.bin,.pnpm, ornode_modules) that come from a lockfile rather than a freshly resolved manifest. A crafted lockfile alias could otherwise be joined directly under a hoistednode_modulesdirectory, letting package files be written outside the intended install root or overwrite pnpm-owned layout.The fix adds two layers:
- The
nodeLinker: hoistedgraph builder now validates each alias at the directory sink (safeJoinModulesDir), matching the validation pnpm already performs when resolving aliases from manifests. - The lockfile verification gate (
verifyLockfileResolutions) now runs an always-on, policy-independent check that rejects any importer or snapshot dependency alias that is not a valid package name, failing the install early — before any fetch or filesystem work — for every node linker at once.
- The
-
Made shared package child resolution deterministic when the same package is reached through multiple contexts. pnpm now chooses the shallowest occurrence, then importer order, then parent path, instead of letting request timing decide the child context and missing-peer report pnpm/pnpm#12358.
-
Fix garbled summary line after submitting
pnpm update -iandpnpm audit --fix -i. The interactive checkbox prompt previously printed every selected choice's full table row (label, current/target versions, workspace, URL) joined by commas, producing a wall of text after pressing Enter. The summary now lists only the selected package names (or vulnerability keys) by setting an explicitshortper choice; the in-progress selection UI is unchanged. -
Prevent
pnpm patch-removefrom removing files outside the configured patches directory. -
Fixed
pnpm publishignoringstrictSsl: falsewhen publishing to registries with self-signed certificates. ThestrictSSLoption is now forwarded tolibnpmpublish/npm-registry-fetchso thatstrict-ssl=falsein.npmrcorstrictSsl: falseinpnpm-workspace.yamlis respected during publish, the same way it is forpnpm installpnpm/pnpm#12012. -
Fixed
Cannot destructure property 'manifest' of 'manifestsByPath[rootDir]' as it is undefinedregression introduced in 11.6.0 when runningpnpm add <pkg>outside a workspace on Windows.selectProjectByDirwas keying the resultingProjectsGraphbyopts.dirinstead ofproject.rootDir, so downstreammanifestsByPathlookups missed when the two paths normalized differently (typically drive-letter casing). pnpm/pnpm#12379 -
Git dependencies that point to a subdirectory of a repository (
repo#commit&path:/sub/dir) keep theirpathin the lockfile again. Since the integrity of git-hosted tarballs started being pinned in the lockfile, any install that actually downloaded the tarball rebuilt the lockfile resolution as{ integrity, tarball, gitHosted }and dropped thepathfield, while installs served from the store kept it — so the field disappeared seemingly at random. Withoutpath, later installs from that lockfile silently unpacked the repository root instead of the subdirectory #12304. -
Fixed nondeterministic lockfile output that made
pnpm dedupe --checkfail intermittently in CI. When a locked peer provider was pinned for a dependency that has no child dependencies of its own, the pinned provider leaked into the shared parent scope, so siblings resolved after it could pick up an optional peer they should not see. Which siblings were affected depended on resolution order, which varies with network timing. -
Sped up
pnpm installwith a frozen lockfile by running lockfile verification (the policy revalidation gate added forminimumReleaseAge/trustPolicyand the tarball-URL anti-tamper check) concurrently with fetching and linking instead of blocking the whole install on it. Dependency lifecycle scripts are still held back until verification succeeds, so no script runs on an unverified lockfile: if verification fails the install aborts before any dependency build, and if linking finishes first the install waits for the verification verdict before completing. -
User-defined
npm_config_*environment variables are now preserved during lifecycle script execution. Previously, allnpm_-prefixed env vars were stripped, which caused user-set variables likenpm_config_platform_archto be lost pnpm/pnpm#12399. -
pnpm can now use different auth tokens for different package scopes, even when those scopes use the same registry URL.
Previously, auth was selected only by registry URL. If
@org-aand@org-bboth usedhttps://npm.pkg.github.com/, they had to share the same token. This caused problems for registries that issue tokens per organization or per scope.Configure a scope-specific token by adding the package scope after the registry URL in the auth key:
@org-a:registry=https://npm.pkg.github.com/ @org-b:registry=https://npm.pkg.github.com/ //npm.pkg.github.com/:@org-a:_authToken=${ORG_A_TOKEN} //npm.pkg.github.com/:@org-b:_authToken=${ORG_B_TOKEN} //npm.pkg.github.com/:_authToken=${FALLBACK_TOKEN}
pnpm login --registry=https://npm.pkg.github.com --scope=@org-awrites the token to the same scope-specific auth key.When installing or publishing
@org-a/*, pnpm usesORG_A_TOKEN. For@org-b/*, pnpm usesORG_B_TOKEN. Packages without a matching scope continue to use the registry-wide fallback token. -
pnpm setupno longer prompts to approve build scripts for@pnpm/exewhen installing the standalone executable. pnpm links the platform-specific binary itself, so the package's install scripts are skipped during the global self-install #12377. -
Close lockfile reads deterministically before rewriting lockfiles and keep pacquet's virtual store directory length aligned with pnpm on Windows.
-
A
304 Not Modifiedanswer from the registry now renews the cached metadata file's mtime, so theminimumReleaseAgefreshness shortcut keeps serving resolutions from the cache. Previously, once a cached packument grew older thanminimumReleaseAge, every subsequent install re-validated it against the registry forever, because a 304 never rewrites the file. -
Updated dependency ranges. Notably:
@pnpm/loggerpeer dependency range moved to^1100.0.0.msgpackr1.11.8 → 2.0.4 (store index files remain byte-compatible in both directions).open^7.4.2 → ^11.0.0,memoize^10 → ^11,cli-truncate^5 → ^6,pidtree^0.6 → ^1.@yarnpkg/core4.5.0 → 4.8.0,@rushstack/worker-pool0.7.7 → 0.7.18,@cyclonedx/cyclonedx-library10.0.0 → 10.1.0,@pnpm/config.nerf-dart^1 → ^2,@pnpm/log.group3.0.2 → 4.0.1,@pnpm/util.lex-comparator^3 → ^4.
-
Updated
@zkochan/cmd-shimto v9.0.6. -
Fixed a Windows-only hang where a failed command could take 20–46 seconds to exit. On error, pnpm enumerates descendant processes (via
pidtree) to terminate them, which on Windows shells out towmic/PowerShellGet-CimInstance Win32_Process— a lookup that is extremely slow on some machines. The lookup is now bounded by a short timeout so it can no longer stall the process exit.
Platinum Sponsors
|
|
|
|
Gold Sponsors
|
|
|
|
|
|
|
|
|
|
|