pnpm 12.21.0 lets pnpm store add prepare tarball and git dependencies for offline installs. It also makes repeated installs keep their peer dependency choices and fixes several lockfile.format: v13, nodeLinker: hoisted, and pnpm deploy failures. If a pnpr server refuses a setting, pnpm now resolves locally.
Minor Changes
pnpm store add run in a project now prepares downloaded tarballs for every lockfile entry that pins them. Besides registry packages, pnpm install --offline --frozen-lockfile can then install dependencies on a tarball URL and dependencies on a git host such as GitHub whose lockfile entry records an integrity.
Patch Changes
Installs that failed
pnpm now reads a lockfile with a mapping key longer than 1,024 characters written as 'key':, without the ? marker. Before, pnpm install and other commands failed on such a lockfile with ERR_PNPM_BROKEN_LOCKFILE.
With lockfile.format: v13, pnpm install no longer fails to create or rewrite the lockfile when a package declares many of its dependencies as peers.
Fixed pnpm deploy failing with lockfile.format: v13 when injected workspace packages have hashed peer bindings.
Frozen installs with v13 lockfiles now accept valid peer dependencies of injected workspace packages that use catalogs.
Fixed injected workspace packages that depend on themselves linking to a nonexistent directory.
pnpm install with frozenStore enabled no longer fails with ERR_PNPM_FROZEN_STORE_NEEDS_BUILD when nodeLinker is hoisted. pnpm fetch with nodeLinker: hoisted no longer populates global virtual store links or modifies linked agent skills, and it preserves an existing hoisted node_modules directory #18037.
A requirements.txt beside a pyproject.toml that declares [tool.uv.workspace] without a [project] table no longer makes that directory a Python project. pnpm install stopped there with an error when the directory had a .venv that pnpm did not create #18023.
Peer dependencies
Repeated installs no longer change the peer dependency providers that the previous install chose. This covers adding, updating, or removing a dependency, projects that use different ranges of one dependency, dependency cycles, and injected dependencies with autoInstallPeers: falsepnpm/tasks#221.
An unchanged install keeps a valid locked peer provider even when a direct dependency provides another compatible version. Explicit pnpm add and pnpm update requests take precedence over it.
Workspace projects that select different versions of a peer provider no longer share one copy of the package that depends on it. This affected peers reached through an aliased dependency or a peer dependency cycle.
A removed dependency no longer comes back as a peer provider. Before, a direct dependency removed with autoInstallPeers: false could be restored from an old peer resolution, and a removed one could still supply its old peer context.
With nodeLinker: hoisted and autoInstallPeers: false, pnpm install no longer creates duplicate copies of a package whose resolved peers are identical. A package also no longer loads a copy of its dependency that was resolved with different peer versions #18003.
pnpm deploy now binds optional peers declared only in peerDependenciesMeta for linked workspace packages. The deployed manifest and lockfile also retain these peers when filtering dependency groups.
Running scripts
Scripts now stop when pnpm's process group is killed while they are starting.
Bin shims in the global virtual store no longer include the hoisted modules directory of the project that installed them #18035.
pnpm pipeline now rebuilds local packages and reruns build scripts after it restores a shared Cargo build cache with Cargo 1.100 or newer. Before, a worktree could reuse build-script output from the worktree that created the cache.
pnpr
If the pnpr server refuses a setting the install uses, or cannot return the lockfile format pnpm reads, pnpm install and pnpm update print a warning and resolve locally. Cargo and Python resolution also fall back to resolving locally. pnpm now rejects a pnpr resolution of npm dependencies that does not name its lockfile format.
pnpm install with pnprServer now limits the size of the server's resolve and lockfile verification responses. An oversized response ends the request with an error.
pnpm now displays pnpr error codes and reasons when remote requests fail.
Other commands and settings
pnpm setup and the install script now support PowerShell as the login shell on Linux and macOS. They add PNPM_HOME to PATH in profile.ps1 under $XDG_CONFIG_HOME/powershell or ~/.config/powershell#18026.
A lockfileDir setting that points at the default lockfile directory now installs the same way as leaving it unset pnpm/tasks#275.
pnpm 12.20.0 records the specifiers of local directory dependencies in the experimental v13 lockfile and fixes several nodeLinker: hoisted, peer dependency, and overrides bugs. The bundled node-gyp no longer ships the undici version that security scanners flag. Remote resolution and shared build caches no longer work with pnpr 0.1.0-alpha.19 or older.
Minor Changes
With lockfile.format: v13, pnpm install records the dependency specifiers of local directory packages. Frozen installs reject changed specifiers even when the locked versions still satisfy them.
Patch Changes
Upgrading and security
Remote resolution, shared build caches, and release notes no longer work with pnpr 0.1.0-alpha.19 or older. pnpm now reads the capabilities a pnpr server advertises under pnpr.protocols. Installs fail when the server does not confirm the requested resolution and verification policies.
The node-gyp bundled with pnpm no longer ships undici 6, which security scanners flag for CVE-2026-84947. On Node.js 26, node-gyp downloads through a proxy or with a custom CA file no longer crash with "invalid onError method" #17941.
Resolving dependencies
Version-selector overrides entries such as "ms@^2.0.0": "2.1.1" now apply to dependencies declared with the catalog: protocol when the catalog entry's range matches the selector #17922.
A root overrides entry that points a package at a workspace: path, such as workspace:./packages/foo, now also applies when a registry package depends on that package pnpm/tasks#270.
Git dependencies now accept npm's :: separator between fragment parameters, such as github:owner/repo#v1.0.0::path:packages/foo. Before, pnpm read the whole fragment as a branch name and failed to resolve it #17827.
pnpm dedupe now keeps a locked runtime version, from devEngines.runtime or from a dependency's engines.runtime, when the declared range still admits it. pnpm dedupe --check no longer fails each time a newer Node.js release in the range comes out #17984.
With autoInstallPeersFromHighestMatch, conflicting non-semver peer dependencies now remain missing, and identical non-semver peer specifiers are preserved. Preferred registry versions no longer replace local paths or protocol-prefixed specifiers when pnpm installs missing peers pnpm/tasks#272.
Hoisted node linker
With nodeLinker: hoisted, a package now keeps its nested copy of a dependency that it resolved at a version other than the top-level one, including a peer dependency its parent supplies. Before, pnpm could remove that copy as a duplicate or give the top-level slot to a peer variant found deeper in the graph. The package then loaded the top-level version.
Lockfile and peer dependency graphs
Fixed pnpm install keeping stale peer bindings after dependency changes. Required dependencies no longer remain marked optional when another workspace project removes a shared package pnpm/tasks#221.
Repeated installs now keep the same dependency links when packages form cycles with several peer dependency variants pnpm/tasks#221.
Fixed writing lockfile.format: v13 for dependency cycles with missing, optional, or transitive peers. Frozen installs also accept unchanged injected packages whose peers use catalogs. With --no-optional, frozen installs reject required catalog children recorded only as optional dependencies pnpm/tasks#221.
pnpm deploy preserves an injected workspace package's resolved dependencies when they differ from the workspace project's own dependencies. This also applies to packages with publishConfig.directorypnpm/tasks#221.
Running scripts and runtimes
Scripts that pnpm runs in a process group of their own are now ended when pnpm is killed right after starting them. A parallel run that was killed before pnpm registered its scripts left all of them running.
When a command name matches no script and pnpm falls back to running it as a command, the install that runs before scripts now runs once. Its errors and warnings print once #17977.
Failed downloads by project-aware global runtime commands now explain which configuration applies. Node.js failures also list the global mirror settings and environment variables to check.
Other commands and settings
Fixed pnpm occasionally crashing on the first HTTPS request, mostly on Windows virtual machines under load. pnpm now seeds TLS randomness from the operating system's random number generator pnpm/tasks#239.
Fixed pnpm deprecate, pnpm undeprecate, and pnpm unpublish failing with revision conflicts when a registry cache serves stale package metadata.
pnpm sbom now reports malformed workspace manifests. Before, it omitted their packages pnpm/tasks#59.
Fixed pnpm store status reporting approved builds of git dependencies as modified when the store contains legacy build metadata.
pnpm now recognizes Capawesome Cloud and RWX as CI environments.
pnpm 12.19.0 adds pnpm fund, lets the loaded node linker handle packages that need a build, and adds the projectScopedOptionalPeers setting and an experimental JSON lockfile format. It also includes a security fix: an offline install error no longer prints registry credentials. pnpm now checks the engines and platform fields of every workspace project, and many hoisted-linker and frozen-lockfile bugs are fixed.
Minor Changes
Added pnpm fund, which lists the funding URLs declared by the installed dependencies in the same tree npm fund prints. Use --json for the npm fund --json report and --recursive or --filter to report on workspace projects. pnpm fund <pkg> opens the funding URL of an installed package, and --which picks one when it lists several #7354.
With nodeLinker.type: loaded, packages that need a build no longer have to be listed in nodeLinker.excluded. A package with a matching side-effects cache entry loads from the store. If side-effects cache reads and writes are enabled, pnpm builds an approved package once, saves the result to the side-effects cache, and then loads it from the store. This includes a build that changes no files in its package, so its script does not run again in other projects that use the same store. List a package in sideEffectsCache.exclude if its build must run in every project, such as a git hook installer. pnpm materializes other cache misses, packages with native .node addons, and their dependencies automatically.
pnpm also scans JavaScript sources for filesystem imports and for __dirname or import.meta, and materializes matching packages. The scan does not detect computed imports. List such packages in nodeLinker.excluded.
Added the projectScopedOptionalPeers setting. When it is true, a project gets a missing optional peer dependency only if the project's own dependencies install a version of it. Another workspace project's dependencies, such as its devDependencies, no longer supply one. dedupePeerDependents keeps deduplicating everything else #16666.
Added the experimental lockfile.format: v13 setting. With it, pnpm writes pnpm-lock.yaml in a JSON-like syntax, indented with tabs, with a trailing comma after every entry. The file is still valid YAML. The file has one packages entry per package version in place of the packages and snapshots sections, and each entry records the versions of its peer dependencies as its properties. Updating a peer dependency then changes only the lines that record its version. pnpm reads lockfiles in both formats whatever the setting is.
pnpm store add now accepts directories of tarballs, such as pnpm store add ./tarballs, and adds every .tgz, .tar.gz, and .tar file inside them recursively. pnpm store add is now faster when it adds many packages or local tarballs #17875.
With supportedArchitectures set, pnpm install and pnpm fetch also store, without linking them, the dependencies of the archives kept for the other listed platforms. A platform added to the setting gets its archives and their dependencies on the next install. Optional dependencies a listed platform cannot run are not stored, and one that fails to download is skipped. Dependencies from git repositories are not stored for other platforms.
When supportedArchitectures names exactly one platform and not current, pnpm links that platform's variant of a package published with platform variants, together with that variant's dependencies. This holds for the list form and for the os, cpu, and libc form. A variant whose floor or ABI the listed platform does not state is not linked for it: pnpm links another variant that fits, or the version's own archive. Changing the setting, or the platform of the host, such as a node_modules mounted into a musl container or a Node.js with another ABI, relinks the package on the next install, even from a frozen lockfile.
pnpm now provides a prebuilt binary for NetBSD 10 on x64 #17803.
Patch Changes
Security
The error for a tarball that is missing from the store in offline mode no longer prints the credentials or token in the tarball URL.
Installs that failed or hung
pnpm install, pnpm ci, and pnpm install-test outside a workspace now fail with ERR_PNPM_NO_PKG_MANIFEST when the directory has no package.json, package.json5, or package.yaml. They no longer create a package.json, a lockfile, and node_modules there #17727.
Fixed pnpm install hanging when a concurrent tarball download or manifest read is cancelled while other tasks are waiting on the same archive.
Running a global command such as node in a project that pins its version no longer hangs while pnpm installs that version. The hang kept starting new processes until the machine ran out of memory.
A global command such as node now runs the version a project pins when PNPM_CONFIG_LOCKFILE_DIR, PNPM_CONFIG_VIRTUAL_STORE_ONLY, or PNPM_CONFIG_SYMLINK is set in the environment. Before, the dispatch failed with "the installed node executable is not under" the store.
pnpm install now fetches fresh metadata for a package when a version allowed by minimumReleaseAgeExclude is missing from the cached metadata. Before, it could fail with ERR_PNPM_NO_MATCHING_VERSION without contacting the registry #17723.
A ${VAR} placeholder in a registry URL in pnpm-workspace.yaml or the project .npmrc now fails the command. pnpm does not expand environment variables in these files. Before, pnpm ignored such a URL and resolved packages from another registry, such as npmjs.org. pnpm now warns when it ignores a placeholder in a proxy, pnprServer, or userAgent setting in pnpm-workspace.yaml#17762.
Fixed local package installs failing while a workspace lockfile is being written.
pnpm self-update and switching to the packageManager version now work behind a proxy that ends a response by closing the TLS connection without a close_notify alert. The registry signature check failed there with ERR_PNPM_PNPM_ENGINE_IDENTITY_UNVERIFIABLE#17763.
A package tarball that keeps failing to download now fails the install after fetchRetries retries. pnpm used to download it again with a second full set of retries, which doubled the wait. The error now names the actual download failure.
When the native binary of the pnpm version a project pins fails to download, pnpm now reports the download error. It used to report only that no native binary was found for the host.
POSIX bin shims and the pnpm, pn, pnpx, and pnx launchers now run inside a Nix build on macOS with the sandbox enabled. Installing again replaces the shims already in node_modules#17750.
Fixed pnpm leaving process pipes open after it exits on macOS pnpm/tasks#229.
Engines and platform checks
pnpm install, pnpm add, pnpm update, and pnpm remove now check the engines, os, cpu, and libc fields of every workspace project, including the workspace root. pnpm run -r and pnpm exec -r check them before running anything. An incompatible engines.pnpm fails the command. An incompatible engines.node prints a warning, or fails the command with engineStrict enabled. An unsupported platform prints a warning. A project that downloads its own Node.js through devEngines.runtime is checked against that Node.js #17751pnpm/tasks#281pnpm/tasks#299.
Fixed missing warnings when a required dependency does not support the current Node.js version.
An optional dependency that declares no os, cpu, or libc field is no longer skipped because its name contains only an operating system word, such as get-windows on macOS. pnpm now infers its platform from the name only when the name also has a cpu or libc token, such as -win32-x64#17774.
Peer dependencies
With dedupePeerDependents: false, a missing optional peer is no longer resolved from a version that only another workspace project depends on. The workspace root's dependencies still count if resolvePeersFromWorkspaceRoot is true. Before, a tool in one project's devDependencies, such as webpack-cli, could become an optional peer of another project's production dependencies #16666.
pnpm install no longer gives a project an optional peer dependency that it skipped because a required peer would conflict with the project's dependencies. Before, dedupePeerDependents merged the project's copy of the package that declares the peer with another project's copy that resolves it #17781.
pnpm install no longer fills in a missing optional peer dependency if a required peer it brings in conflicts with a version the project depends on. Before, such a peer was installed along with it and reported as unmet #17718.
pnpm install --filter in a sparse checkout now counts the dependencies of workspace projects that are missing from disk when it resolves peer dependencies and marks packages as optional. The lockfile it writes no longer differs from a full checkout in those entries #17791.
Frozen lockfile and workspace links
pnpm install --frozen-lockfile now succeeds when a workspace project recorded in pnpm-lock.yaml has an empty directory, such as a git submodule that was not checked out #17712.
pnpm install --frozen-lockfile now fails with ERR_PNPM_OUTDATED_LOCKFILE when a workspace package linked through a plain semver range, such as ^7.9.5, has changed to a version outside that range #17806.
pnpm install --frozen-lockfile and verifyDepsBeforeRun now accept a workspace: dependency on a project whose version is not valid semver, such as workspace:1 on a project at version 1. Before, they reported the lockfile that pnpm install had just written as out of date.
pnpm install --frozen-lockfile now accepts a lockfile when an injected workspace package declares a file: or link: dependency with backslashes, such as file:..\vendor, or with a slash after the protocol, such as file:/./vendor. Before, the install reported the lockfile as out of date right after pnpm install had written it #17720.
When a package injected through a path, such as file:../lib or ../lib, gives one of its dependencies a catalog: specifier, pnpm install --frozen-lockfile now reports the lockfile as outdated. For a bare path such as ../lib, pnpm install now also fails the way a fresh resolution does. Before, these installs accepted the existing lockfile #17722.
Dependencies declared as workspace: entries in catalogs now remain in the lockfile when excludeLinksFromLockfile is enabled. Frozen installs can restore these links after node_modules is removed pnpm/tasks#260.
With dedupeDirectDeps, pnpm install now compares link: dependencies by the directory they point at. A project's link: dependency is removed when the workspace root links the same directory under a different path. It is kept when the root's link: dependency has the same text but points at another directory. pnpm reports a dependency the root provides as removed only once, when it removes the project's link. The summary shows the package version of a removed link: dependency pnpm/tasks#293.
Hoisted node linker and custom modulesDir
With nodeLinker: hoisted, a package that runs a lifecycle script or has a patch is now cloned or copied into node_modules, as with the isolated linker. A build that rewrites one of its files no longer changes the store copy shared with other projects.
With nodeLinker: hoisted, pnpm no longer deletes a directory outside node_modules when it removes a package whose scope directory is a symlink.
With nodeLinker: hoisted, pnpm install --filter in a sparse checkout now drops previously installed workspace projects that are missing from disk from the hoisted node_modules tree. It no longer recreates node_modules inside a missing project's directory. Packages that only the missing project used are also removed from the root node_modules.
With nodeLinker: hoisted and dedupeDirectDeps, pnpm install now removes a project's link: dependency that the workspace root provides, and reports each link: dependency it removes. Removing the last scoped link: dependency of a scope also removes the empty @scope directory.
With nodeLinker: hoisted and a custom modulesDir, pnpm now installs a workspace project's dependencies that cannot be hoisted to the root into the project's modulesDir. The next install that relinks the project removes the copies that earlier installs left in its node_modules. A later install restores the project's modulesDir when it was removed. Package directories that pnpm did not install are now also moved to .ignored in a custom modulesDir.
Fixed installs in a workspace whose modulesDir is an absolute path, including one that goes through a symlink such as /tmp on macOS, or a path that starts with ... Dependencies of workspace projects no longer end up outside the workspace, and the root project's dependencies, link: dependencies, and commands are linked into the configured directory. pnpm bin, pnpm root, pnpm run, pnpm exec, and pnpm version now use that directory too pnpm/tasks#285.
Store and builds
Concurrent installs into a global virtual store no longer wait on each other. A package that needs a build is built in a private directory and moved into the store once its build has finished, so another project never links a half-built package. An install with --ignore-scripts links the packages it does not build from their own store directories, and pnpm store prune removes the build directories of installs that were interrupted #15568.
Packages that an older pnpm version added to the store now run their install scripts. Before, pnpm could skip those scripts and hardlink the package's files to the store.
pnpm install now keeps patches to bundled dependencies when it restores a package from the side-effects cache, including files a patch adds #17734.
Local installs on macOS now keep cached clones separate from the global virtual store. pnpm store prune removes this cache, so unused cached packages no longer accumulate #17907.
pnpm store prune now stops if a dependency link cannot be read. This keeps installed packages from being removed after an incomplete scan.
A repeat pnpm install now runs a full install when the runtimeOnFail setting changes. Before, it printed "Already up to date" and did not install the runtime a project declares in devEngines.runtimepnpm/tasks#303.
The sync of an injected workspace dependency now copies a file whose source has reached the filesystem's limit on hard links. pnpm patch-commit now copies a file into its scratch directory when the filesystem refuses to hard link it, unless the path is missing or already occupied pnpm/tasks#283.
Speed
pnpm install is faster when it clones files from the store, which it does by default on macOS. On a Mac with endpoint security software, a cold install of a project with about 1,350 packages took 29% less time pnpm/tasks#280.
pnpm install unpacks packages that contain many files faster. Unpacking typescript took 30% less time in our measurements pnpm/tasks#288.
Resolving against a registry that sends Cache-Control: no-cache, such as Azure Artifacts, is fast again when the lockfile already decides the version. pnpm reads the cached metadata for a pinned version, or for a range the lockfile version is proven to win, without a registry request #17758.
POSIX bin shims start fewer processes. Running a dependency's bin through its shim from Git Bash on Windows starts 7 processes where it started 15. Installing again replaces the shims already in node_modules.
Windows
pnpm now installs dependencies and runs lifecycle scripts from projects on mapped Windows network drives. When a network share refuses the links in node_modules, the error now suggests setting nodeLinker: hoisted or moving the project to a local drive #17747.
packageImportMethod: auto now tries hardlinking before cloning, as it does on Linux. Installs from a warm store on a Dev Drive are faster. An install no longer fails when the store refuses a hardlink with an access-denied error, and pnpm tries cloning or copying the file next #17809.
pnpm run and pnpm setup no longer clear the visible terminal when a project path contains non-ASCII characters.
A failed attempt to create a directory junction in node_modules no longer leaves a .pnpm-junction-* directory behind.
pnpm starts faster. It loads system libraries such as user32.dll and shell32.dll the first time a command uses them, so pnpm --version loads 11 libraries where it loaded 25.
pnpm deploy
pnpm deploy now runs the build scripts of a workspace project that it installs as a file: dependency, without a machine-specific allowBuilds key. An allowBuilds entry that denies the project still applies #17740.
pnpm deploy no longer fails when the deployed project depends on a workspace package that sets publishConfig.directory. pnpm installs that package from its publish directory and runs its build scripts #17771.
pnpm deploy without a shared workspace lockfile now resolves a relative workspace: path, such as workspace:../lib, from the source project's directory. It used to be resolved from the deploy target and fail #17804.
pnpm deploy --offline --trust-lockfile now reuses dependencies pinned in the source lockfile from a populated store when registry metadata is unavailable. This works with per-project lockfiles, --legacy, and npm aliases #17888.
Other commands and settings
pnpm dist-tag and pnpm unpublish now offer browser-based authentication when the account's two-factor authentication uses a security key. Before, they asked for a one-time password in that case #17832.
pnpm publish with provenance now downloads Sigstore's current signing configuration before signing. A failed or slow download is retried with the same retry policy and deadline as the signing requests.
pnpm pack and pnpm publish now apply the first rule of a .npmignore or .gitignore that starts with a UTF-8 BOM.
pnpm outdated now checks dependencies when the project has no lockfile, for example with lockfile: false. The Current column shows the installed version, or the lowest version allowed by the declared range if the dependency is not installed #17811.
pnpm self-update now updates the project's engines.pnpm range along with its pnpm pin, keeping the ^ or ~ operator #17732.
On Linux and macOS, pnpm run no longer sometimes reports a lifecycle failure after Ctrl+C interrupts a script.
Config dependencies use the declared registry serverType when recording and installing packages pnpm/tasks#236.
Relative directory selectors set on config.filter or config.filterProd by an updateConfig hook now resolve from the workspace root even when --dir is passed or pnpm runs from a subdirectory #17906.
Commands that add settings to pnpm-workspace.yaml now fail with an error if the file contains only null, and leave the file unchanged. Before, they wrote invalid YAML.
Shell tab-completion now completes directory and file paths for path options such as -C, --dir, --prefix, --store-dir, and --env-file. Before, options without a fixed list of values offered command names #17884.
pnpm 12.18.0 packs, publishes, and installs packages with platform variants on pnpr registries. It also adds per-skill approval of agent skills and pnpm store add for offline installs from downloaded tarballs. Repeat installs and verifyDepsBeforeRun no longer read the package.json of unchanged workspace projects. The release fixes several peer dependency resolution bugs too.
Minor Changes
Agent skills
pnpm now names the link to a dependency's agent skill after the skill alone. A skill that the @acme/kit package ships in skills/auth/ is linked as .claude/skills/auth, not .claude/skills/pnpm-@acme+kit-auth. The next install replaces links with the old names. pnpm lists the linked skills in a # pnpm block of each agent skill directory's .gitignore#17455.
When two approved packages ship a skill of the same name, or the name is already taken in an agent skill directory, pnpm links the skill as pnpm-<package>-<skill>. Before, the install failed.
pnpm approve now asks which agent skills to link when a package ships more than one. pnpm records the chosen skills as a list, such as permissions.<pkg>.skills: [guide, migrate], and does not offer the other skills for approval again. The first time a project approves a skill, pnpm approve also asks which agent directories to link skills into, and records the answer under skills.dirs.
pnpm links agent skills nested in category directories, such as skills/engineering/implement/SKILL.md, up to three levels below skills/. Before, it linked only the skills directly under skills/.
Platform variants
These features need a registry declared with serverType: pnpr.
pnpm pack packs one archive per entry of publishConfig.variants, each platform variant as <name>-<version>~<tag>.tgz. pnpm pack --variant <target> packs only the archive whose entry lists that target. pnpm pack --json prints the integrity and size of every archive it writes.
pnpm publish publishes a package's publishConfig.variants. pnpm uploads every archive before the publish request that references them. Publishing variants to any other registry is refused unless --no-variants is given, which publishes only the archive that targets any.
pnpm publish --upload-variant <target> uploads the archive of one publishConfig.variants entry to the registry's staging area and prints <target>=<integrity>. pnpm publish --variant-integrity <target>=<integrity> then publishes the version from archives that other jobs uploaded. With --recursive, each value names its package as <name>~<target>=<integrity>.
pnpm publish -r --batch now uploads each package archive on its own request and skips archives the registry already holds, so the batch request no longer grows with the archives it publishes. A batch of more than 256 packages still carries every archive inline. Packages with publishConfig.variants can be published in a batch. A batch with variants that would reference more than 256 archives on one registry fails with ERR_PNPM_BATCH_PUBLISH_TOO_MANY_ARCHIVESpnpm/tasks#244.
pnpm publish --provenance signs one statement that names every archive of a version with publishConfig.variants. A platform variant's archive is named by the version's package URL with a variant qualifier.
Rerunning pnpm publish after the version was already published now succeeds when the published version is the same release. pnpm compares the archives, the provenance statement when the rerun signs one, and the dist-tag. When the published version differs, the publish fails with ERR_PNPM_PUBLISHED_RELEASE_DIFFERS, which names what differs.
pnpm installs the platform variant of a package that fits the host, or the package's own archive when none does. The lockfile records every variant. A version published with variants only, and no archive for other hosts, installs on a host one of the variants fits. On any other host, an optional dependency is skipped, and any other dependency fails with an error that lists the platforms the version is published for.
supportedArchitectures platform lists accept platform tags, the same tags publishConfig.variants entries name. An entry can state floors and an ABI, such as linux-x64-manylinux_2_28, darwin-arm64-macos_14_0, linux-x64-napi8 or linux-x64-node127, and any Node.js OS and CPU, such as freebsd-x64. The spellings accepted before still work.
With supportedArchitectures set, pnpm also fetches into the store the variants that the other listed platforms need, when it downloads a package with platform variants.
pnpr registries
pnpm downloads less metadata from a registry declared with serverType: pnpr. A large package document leaves out the manifests of rarely picked versions, and pnpm fetches one only when it picks that version. In a benchmark that resolves 787 packages, the package documents shrank from 30.3 MB to 2.5 MB gzipped. pnpm caches these documents in v12/metadata-pnpr, and the pnpm cache commands cover them.
pnpm warns when a registry that is not declared serverType: pnpr turns out to be pnpr. For a registry declared serverType: pnpr, a minimumReleaseAge longer than 30 days fails with ERR_PNPM_UNSUPPORTED_MINIMUM_RELEASE_AGE.
pnpm publish sends release notes to registries declared with serverType: pnpr. A package's notes are the section for its version in CHANGELOG.md, or the notes that pnpm version -r composed from change intents. --release-notes <file> gives the notes from a file, and --no-release-notes sends none. --publication-name names a release published with --batch.
In a workspace that uses pnpm's versioning, pnpm version -r --release-notes <file> puts a summary above the composed notes of the release.
pnpm view <pkg>@<version> releaseNotes, pnpm outdated --notes, and pnpm update --interactive show the release notes from these registries.
Store and hooks
pnpm store add now prepares the store for offline installs from package tarballs downloaded some other way. After pnpm store add ./tarballs/*.tgz, pnpm install --offline --frozen-lockfile installs each registry package whose lockfile entry pins one of those tarballs #2978.
Custom pnpmfile fetchers can use fetchers.gitHostedTarball, fetchers.git, and fetchers.binarypnpm/tasks#191.
Patch Changes
Installing packages
Running node or pnpm install in a project that pins a Node.js version pnpm has not downloaded yet no longer hangs when a globalPnpmfile is configured #17530.
pnpm install with enableGlobalVirtualStore no longer fails on Windows for a dependency from a named registry, such as gh: or npmjs:#17665.
Concurrent installs that share a global virtual store no longer fail with ERR_PNPM_CMD_SHIM_SYMLINK_BIN when they link the same executable at the same time #17587.
pnpm install and pnpm ci now succeed when dependency skills are approved but no agent skill directory exists. The skills stay unlinked until a directory exists #17574.
Commands run from a workspace package now use the same default store as the workspace root. Before, pnpm add in a package could fail with ERR_PNPM_UNEXPECTED_STORE when the workspace root was its own mount point and the home store was on another volume, as in a sandbox or a container.
A workspace installed with the old behavior may need one pnpm install --force from the workspace root.
pnpm deploy now keeps a symlink in the project whose target is missing from the source, such as a link into a node_modules directory that was removed after the build. Deploy used to drop such a link silently #17571.
pnpm install now links the runtime that an earlier pnpm install --no-runtime skipped, and pnpm install --no-runtime removes a runtime that an earlier install linked #17542.
With enableGlobalVirtualStore, pnpm install again runs a dependency's build scripts in a project whose global virtual store slot another project already built, unless the side-effects cache has build output to restore for it. A build that writes only outside its own package, such as a git hook installer, now takes effect in every project #17526.
Commands of a package whose bin paths contain excess parent directory segments, such as ../dist/cli.js, are no longer missing. Such paths now resolve inside the package #17586.
Generated POSIX shell shims now quote their paths, so shell special characters in a path stay literal.
Lockfile and local paths
Packages from the default registry keep plain lockfile keys, even when a prefix such as npmjs points at the registry set as registry. A dependency written with such a prefix shares the plain entry of the same package. The next install rewrites keys that earlier versions qualified this way #17575.
pnpm install --frozen-lockfile, pnpm approve-builds, and pnpm rebuild now accept a lockfile that resolves a * dependency to a prerelease latest version. pnpm wrote such a lockfile and then reported it as outdated #17594.
pnpm install --frozen-lockfile now accepts a lockfile written with excludeLinksFromLockfile and linkWorkspacePackages on, when a project depends on a workspace package through a catalog: entry. It used to fail with ERR_PNPM_OUTDATED_LOCKFILE.
pnpm install --frozen-lockfile no longer rejects a freshly generated lockfile when addMissingPeerTypes is enabled and an injected workspace package has peer dependencies #17668.
Relative local paths in root overrides now resolve from the workspace root when each project has its own lockfile #17691.
Installing a local directory dependency no longer fails when another project's install is writing a lockfile in that directory.
Relative local paths in root catalogs now resolve for dependencies and peers #17690.
pnpm install now resolves auto-installed relative workspace: and file: peers from the directory of the package that declares them #17676, #17689.
pnpm dedupe --check leaves pnpm-lock.yaml untouched while it looks for deduplication changes. If configDependencies changed since the last install, the check keeps the lockfile they sync, as pnpm install does #17628.
pnpm dedupe --check no longer fails when the only difference is the integrity of a locked version that the registry now reports with a stronger algorithm, such as a sha512 integrity replacing the sha1 shasum it reported when the lockfile was written #17692.
Peer dependencies
Peer deduplication no longer gives a project different copies of a dependency across direct and transitive paths when an optional peer has no provider #17666.
Dependencies no longer bind to another project's peer variant when the provider has nested peers, including providers that finish resolving later #17593.
Re-resolving a lockfile no longer preserves optional peer bindings from other projects when no provider is in scope #17592.
pnpm peers check warns when a required peer is resolved without a provider declared by the project or its dependency ancestors, with autoInstallPeers: false and dedupePeerDependents: true. These warnings do not change the command's exit code or cause strictPeerDependencies failures.
Speed and memory
pnpm install, and pnpm run and pnpm exec with verifyDepsBeforeRun, no longer read the package.json of workspace projects whose files did not change since the last install. This also holds with a pnpmfile, configDependencies, or sharedWorkspaceLockfile: false. In an up-to-date workspace with sharedWorkspaceLockfile: false, pnpm install no longer runs the install of each project pnpm/tasks#256.
A recursive pnpm run or pnpm exec with verifyDepsBeforeRun set no longer reads every package.json in the workspace once per project when sharedWorkspaceLockfile is false. In a 300-project workspace, pnpm -r exec true went from 490 ms to 42 ms pnpm/tasks#256.
pnpm install makes fewer stat calls when it hardlinks files from the store, as few as 12.7.0 made #17543.
Picking versions from registry metadata uses less temporary memory.
verifyDepsBeforeRun and repeat installs
With verifyDepsBeforeRun, pnpm run and pnpm exec now report dependencies as out of date after a dependency is added to the package.json of a local directory dependency, such as "lib": "file:../lib". Before, the command ran without the new dependency installed.
verifyDepsBeforeRun no longer reports a file: directory dependency as out of date after an edit to package.json that leaves its dependencies unchanged #17697.
verifyDepsBeforeRun no longer reports dependencies as out of sync when only the version field of a single-project repository changed #17560. The same holds for a workspace project that no dependency can resolve to. A script run after such a change no longer starts an install first.
A repeat pnpm install now rewrites the bin shims after extendNodePath changes. Before, it reported "Already up to date" and the shims kept the NODE_PATH of the previous setting.
Adding and updating dependencies
pnpm add <pkg> without a version now saves the range that the other workspace projects declare for the package, or the one a matching override sets. A catalog: reference still comes first, and the tag setting is used only when none of these exists pnpm/tasks#191.
pnpm update with only negated selectors, such as pnpm update '!foo', now leaves the dependencies listed in update.ignoreDeps unchanged. Negated crate: and pypi: selectors, such as !crate:sha2, now exclude that dependency and update the rest pnpm/tasks#243.
pnpm update --latest keeps three kinds of Cargo dependencies where they are, unless the crate is named on the command line. Before, it moved each one to the newest release and left a workspace that did not build.
A renamed dependency, such as tower-0-4 = { package = "tower", version = "0.4" }, stays within its requirement if the workspace also declares the crate under its own name.
A crate replaced through [patch.crates-io] keeps its version, with a warning.
A crate whose newest release is older than its current version, such as a prerelease newer than the latest stable release, keeps its version, with a warning. Only an explicit version, such as pnpm update crate:foo@1, moves it back.
Other new major versions are still selected and may need code changes.
pnpm update now keeps a Cargo dependency at its current version, with a warning, if the new version lacks a feature the workspace enables on it. If the crate is named on the command line, as in pnpm update --latest crate:sha2, the update fails with an error that names the missing features.
pnpm update now keeps the operator of every existing Cargo requirement, so ~1.0.0 is updated to ~1.1.0, and an exact = requirement stays exact unless the selector gives a range, such as crate:foo@^2. The savePrefix and saveExact settings apply only to new Cargo dependencies. Saved Cargo requirements omit build metadata.
pnpm update now updates a Cargo dependency whose inline table spans several lines, such as one with a multi-line features array. It failed with "its Cargo.toml dependency declaration is not a string or single-line inline table".
pnpm update no longer applies the savePrefix and saveExact settings to Python requirements. A savePrefix such as ^ made pnpm update fail in a project with Python dependencies.
pnpm update now keeps the precision of a ~= requirement, so ~=1.0 is updated to ~=1.5 and still allows any 1.x release. With --latest, a ==1.* requirement is updated to ==2.*.
Store
pnpm store prune now keeps packages linked from a configured modules directory pnpm/tasks#230.
pnpm store prune now removes aliases of pruned packages.
pnpm store status no longer reports untouched packages as modified when the global virtual store is enabled. If the installed global-store layout cannot be verified, the command reports ERR_PNPM_STORE_STATUS_UNVERIFIABLE and asks for a reinstall #17631.
pnpm store add now fails with ERR_PNPM_FROZEN_STORE_WRITE when frozenStore is enabled. It used to write package files into the read-only store without recording them, so no install could use them.
pnpm cat-index <name>@<version> no longer shows the index of a package whose name differs only in letter case.
Other commands and settings
pnpm link now fails without changing package.json or pnpm-workspace.yaml when the linked package's name is not a valid npm package name. It used to write that name to both files, which made every later install fail #17475.
pnpm link <dir> now resolves a relative <dir> against the current directory. In a directory without a package.json, such as a workspace's packages folder, pnpm link . used to link the nearest project above it into itself #17475.
A Node.js version range such as >=26.13, for example in devEngines.runtime, now resolves to the newest stable release that satisfies it. pnpm picks a prerelease only when no stable release matches #17516.
Switching to the pnpm version a project pins no longer writes a temporary _tmp_* file into the project directory, which file watchers reported on every command #17681.
pnpm now reads the linkWorkspacePackages, injectWorkspacePackages, extendNodePath, frozenStore, and optimisticRepeatInstall settings from PNPM_CONFIG_* environment variables, such as PNPM_CONFIG_LINK_WORKSPACE_PACKAGES=true. --config.extend-node-path now applies too.
Recursive scripts run with --sequential or --workspace-concurrency=1 print GitHub Actions log groups again #17629.
When pnpm docs cannot open a browser, the URL it prints no longer includes the query string or the fragment.
pnpm 12.17.0 adds pnpm peers check --global, dependency-group selectors and wildcards in overrides, and runtime, package manager, Cargo, and Python updates in pnpm outdated and pnpm update. It also fixes files that other users could not read in Docker images, and repeat installs that missed changes to local dependencies.
Minor Changes
pnpm peers check now accepts --global (-g) to check globally installed packages. After a global install or update, the peer dependency warning now suggests pnpm peers check -g#17504.
pnpm outdated and pnpm update now inspect and update package manager and runtime versions in devEngines.packageManager, packageManager, devEngines.runtime, engines.runtime, and runtime: dependencies. With cargo.enabled or python.enabled, pnpm outdated and pnpm update also inspect and update Cargo dependencies in Cargo.toml and Cargo.lock and Python dependencies in pyproject.toml and pylock.toml.
overrides selectors now support :prod, :optional, and :peer pseudo-selectors that target a single dependency group. They also support * wildcard patterns on parent and target package names. An override with a non-range value, such as npm: or file:, no longer adds a peer dependency to dependencies. Removing an optional dependency with "-" now also removes the duplicate entry from dependencies#5391.
Patch Changes
Installing packages
Files that pnpm creates in a project now get the permissions the umask gives any new file, such as 0644. Before, several of them were readable only by the user who ran pnpm, which broke Docker images that run as a different user #17435.
The fix applies to:
node_modules/.pnpm-workspace-state-v1.json. A different user running pnpm run reinstalled the dependencies because it could not read this file.
pnpm-workspace.yaml
the files written by pnpm deploy
patch files from pnpm patch-commit
the lockfile restored by pnpm dedupe --check
the Cargo and Python files that pnpm writes
When pnpm edits an existing file, the file keeps its permissions.
pnpm install no longer writes broken dependency links when the project's node_modules is a symlink to another directory, such as another project's node_modules. The install reported success, but the links it wrote did not resolve #17448.
Commands installed with pnpm add --global now find the dependencies that pnpm hoists for their package. A package that loads a dependency it does not declare, such as a native addon's platform-specific package, failed with "Cannot find module". Reinstall such a package with pnpm add --global to update its existing command #17503.
When pnpm switches to the version a project pins, it now installs that version's native binary for the current host, even if the project's supportedArchitectures excludes the host. Before, pnpm could not use the pinned version and kept running the installed one. pnpm also repairs a pinned version that an earlier install left without the host's binary.
With the global virtual store, a change to a dependency of one package in a dependency cycle now gives every package in that cycle a new directory. Before, the other packages kept their directories and still linked the old copy of the changed package, so the project could load two copies of it #17466.
Packages in a dependency cycle, and packages that depend on one, move to new global virtual store directories once after this update. Those that run a build miss the side-effects cache once.
With nodeLinker: hoisted, when two workspace projects need the same package version and it cannot be hoisted to the root, each project now keeps the copy installed in its own node_modules. Build scripts run in each of these copies. Before, the second project's copy was replaced with a symlink to the first project's, so every repeat install imported it again #17498.
The Node.js latest selector now chooses the newest stable release #17490.
Hardlinking from the store now stats each store file once per install. Since pnpm 12.8.0, a store file was stat'ed again for every package that links it. On an offline install of a large workspace, that added up to 15% system CPU #17500.
Repeat installs and local dependencies
pnpm install --frozen-lockfile no longer reports an outdated lockfile right after the install that wrote it. This happened when a pnpmfile readPackage hook or packageExtensions changed the dependencies or peer dependencies of a local directory dependency outside the workspace projects. It affected a file: dependency, an injected workspace:../dir dependency outside the workspace patterns, and an injected workspace package left out by --filter#17447#17473.
A repeat pnpm install now takes the fast path when ignoredOptionalDependencies removes an optional dependency of a file: directory dependency. It used to resolve again on every run.
pnpm install now resolves again after an edit to an injected workspace:../dir dependency outside the workspace patterns under a shared lockfile. It used to keep the lockfile unchanged. The next pnpm install --frozen-lockfile then failed #17476.
pnpm install now resolves a local directory again after its package.json changes when an override or a package extension adds it to the dependencies of a registry package. pnpm install --frozen-lockfile fails on a lockfile that still records the old dependencies of such a directory #17486.
With injectWorkspacePackages and per-project lockfiles, pnpm install now updates a project's lockfile when a local tarball that an injected workspace project depends on is replaced. The project's lockfile kept the old version and integrity before.
pnpm install now detects a change to a local tarball or directory that only a pnpmfile readPackage hook depends on. A repeat install reported "Already up to date" and kept the old contents before pnpm/tasks#227.
pnpm install now relinks a workspace: or link: dependency whose link was deleted from node_modules. It used to report "Already up to date" and leave the link missing #17485.
A repeat pnpm install reports "Already up to date" again when a pnpmfile readPackage hook changes the dependencies of a workspace project. Since 12.15.0, every such install ran in full #17468.
After an edit to a project's package.json, pnpm install and verifyDepsBeforeRun now run the pnpmfile's readPackage hook on the edited manifest before comparing it with the lockfile. They could report the project up to date when the hook rewrote the edited dependency to a specifier the lockfile did not record.
Adding and updating dependencies
pnpm update --latest with package selectors now updates the dependencies of the selected packages within their declared ranges. Excluded packages and their dependencies keep their locked versions #17444.
pnpm add <pkg>@<tag> now uses a catalog entry set to that same dist-tag. The dependency is saved as catalog: and the entry stays as written pnpm/tasks#225.
When pnpm add adds a new dist-tag such as vue@legacy to a catalog, the catalog entry records the exact version the tag points to. The same applies to a dependency added without a version when the tag setting names a dist-tag other than latest.
pnpm add now saves the resolved version range of an npm alias. For example, pnpm add v2@npm:vue and pnpm add v2@npm:vue@^3.0.0 both save npm:vue@^3.5.13.
Running scripts and commands
Programs that a script or pnpm exec command leaves running, such as a browser opened by the open package, now outlive pnpm exactly when they would outlive the command run without pnpm. Before, on Windows, a failed command, Ctrl+C, or a closed terminal ended all of them. pnpm still ends them when it is killed or crashes.
When a recursive or parallel run bails, the scripts still running now receive SIGTERM on Unix and are killed only if they are still running two seconds later. On Windows, everything those scripts started is ended, including detached processes whose parent has already exited. Before, a bail killed them at once #17465.
On Windows, the shell shim of a .cmd or .bat bin now runs it under Git Bash when MSYS argument conversion is off, such as with MSYS_NO_PATHCONV=1 or MSYS2_ARG_CONV_EXCL='*'. The shim used to start an interactive cmd.exe prompt #17480.
pnx and pnpm create now run the command in the directory selected by --dir or --workspace-root. Without either flag, the command still runs in the directory pnpm was started in.
pnpm --env-file now reads files the way node --env-file does. Values are taken as written, so $VAR is no longer expanded and Windows paths such as C:\Users\me load unchanged. A file is no longer rejected for its contents.
Settings and messages
pnpm version no longer creates a git commit and tag when gitTagVersion is set to false#17460.
pnpm publish now reads the publishBranch setting from pnpm-workspace.yaml and from PNPM_CONFIG_PUBLISH_BRANCH. The --publish-branch flag overrides it.
pnpm now accepts --strict-ssl and --local-address <ip> on the command line.
pnpm doctor uses a 15-second timeout when checking registry connectivity.
pnpm-workspace.yaml parse errors now report ERR_PNPM_INVALID_SETTING.
The error for a dependency with an invalid name in a project's manifest now names the project's directory. It used to say only "The current package", which did not tell which workspace project to fix #17475.
This release fixes pnpm install hanging on a cold store in workspaces that install Cargo crates, and pnpm pack shipping a file that files excludes by name.
Patch Changes
pnpm install no longer hangs on a cold store in a workspace that also installs Cargo crates or a Rust toolchain.
pnpm pack and pnpm publish now apply a files entry that names a file after the glob and directory entries, as npm does. A file excluded by name, such as !dist/index.js, stays out even when a later dist/** matches it. A file named by its path, such as lib/secret.js, ships even when a later !lib/*.js matches it.
pnpm install no longer leaves a broken symlink in an injected workspace dependency when the package links to a file outside its published files and pnpm imports by hardlink. Installing a git dependency now skips internal directory symlinks when importing its files into the store.
pnpm install now relinks a command that a workspace project renames into the projects that depend on it when sharedWorkspaceLockfile is falsepnpm/tasks#224.
pnpm install and pnpm rebuild now refresh privately hoisted .bin shims in node_modules/.pnpm/node_modules/.bin after a dependency build replaces a script target with a native executable #17402.
pnpm install now reads a package's manifest to decide its peer dependencies when it updates an existing lockfile, as it does when it resolves from scratch.
Commands, pnpm --version, pnpm self-update, and invocations with unknown flags now apply the same packageManager and devEngines.packageManager settings when switching to the pinned pnpm version or recording it in pnpm-lock.yaml. --config.<key> flags and lockfileDir now reach the version switch and lockfile sync on every entry point. Unreadable settings in pnpm-workspace.yaml or the global config.yaml that do not affect the pin decision no longer block the version switch pnpm/tasks#222.
pnpm now accepts the --cache-dir <dir> flag, as in pnpm install --cache-dir /tmp/pnpm-cache#17422.
When the version or range given to pnpm unpublish matches every published version, the error now says so and shows the same command with --force. Before, the error suggested running pnpm unpublish <pkg>@<version>, the command that had just failed.
This release adds a global --env-file flag, updates to a symlinked pnpm-lock.yaml, and pnpm setup --no-modify-path. It also fixes two security issues, in zstd decompression and in signing.
Minor Changes
Added a repeatable global --env-file <path> flag to load environment variables from dotenv-style files before running a command. Later files override earlier files, variables already in the environment are preserved, and loaded variables are visible to user-level .npmrc interpolation and lifecycle scripts #7111.
pnpm can now update a pnpm-lock.yaml that is a symlink. List the directories the lockfile may link into in the symlinkedLockfileTargetDirs setting, in the global config or with PNPM_CONFIG_SYMLINKED_LOCKFILE_TARGET_DIRS. pnpm writes the update to the file the symlink points to if that file is inside one of these directories. The symlink stays in place. pnpm ignores this setting in pnpm-workspace.yaml#17222.
Added a --no-modify-path option to pnpm setup. It installs pnpm without adding it to PATH, leaving the shell config file, the Windows registry, and the GitHub Actions environment files unchanged. pnpm setup then prints the lines to add yourself get.pnpm.io#37.
Patch Changes
Security
Fixed memory exposure and allocation handling vulnerabilities when processing zstd-compressed data #17388.
Signing in pnpm and pnpr no longer uses arithmetic that may leak the private key through timing. This covers shared artifacts, OCI registry tokens, and OIDC login state advisory.
Installing packages
A dependency symlink that pnpm cannot point at the wanted target now fails the install with an error that names the link. This happens when the filesystem still serves the old link after pnpm removed it, as a node_modules served by a virtual filesystem does. pnpm used to remove the link again without end and crashed with a segmentation fault once the thread ran out of stack.
Concurrent workspace installs no longer lose store-index rows when initializing the shared SQLite index #17388.
Agent skill links now keep the same target across installs when a package version is installed with several sets of peer dependencies. An install no longer fails with ERR_PNPM_AGENT_SKILL_PATH_OCCUPIED on a skill link that pnpm created for another of those copies #17319.
pnpm now fails at once, without retrying, when a downloaded package archive contains a rejected entry path #17205.
pnpm now builds a git-hosted dependency in every new location it links the dependency into, such as a new global virtual store slot or a fresh node_modules. When the side-effects cache holds the build output, pnpm restores it from there. Before, only the install that fetched the dependency built it. This also fixes dependencies that are already in the store #17224.
Changes a preResolution hook makes to the lockfiles now take effect. The hook now also runs when pnpm installs from an up-to-date lockfile. An error thrown by the hook now fails the install.
A custom fetcher in the pnpmfile can now call fetchers.directory to fetch a package from a local directory. The call rejects with ERR_PNPM_TARBALL_INTEGRITY if the lockfile pins an archive integrity for the package. Previously, calling fetchers.directory failed with a TypeError.
packageImportMethod: copy now also applies to packages that have lifecycle scripts or patches. On a filesystem that supports block cloning, such as ReFS or a Dev Drive on Windows, these packages were cloned #17195.
With nodeLinker: hoisted and autoInstallPeers: false, a package that workspace projects use with different peer versions is now installed once per peer variant, so each project's copy resolves that project's peer #17395.
Under nodeLinker: hoisted, pnpm install now leaves a patched package that is already in place alone. The same holds for a package whose peers include a patched package, such as every package peering on a patched react-native#17188.
With nodeLinker: hoisted, an install that stops partway no longer leaves the next install trusting the packages it was replacing. Before, reverting the change that started the stopped install, such as a patch edit, kept the half-replaced package in node_modules.
Repeat installs and changed settings
A repeat pnpm install now acts on a change to these settings. Before, it reported "Already up to date".
storeDir or virtualStoreDir: it recreates node_modules.
globalVirtualStoreDir: it links the packages from the new directory.
virtualStoreDirMaxLength: it renames the virtual store directories.
dangerouslyAllowAllBuilds turned on: it runs the builds it skipped.
trustLockfile turned off: it verifies the lockfile.
pnpm add, pnpm remove, and pnpm update now fail if node_modules does not match the current settings. Run pnpm install to recreate it. Previously, these commands removed and reinstalled node_modules without asking. They report:
ERR_PNPM_UNEXPECTED_STORE if node_modules was linked from a different store.
ERR_PNPM_UNEXPECTED_VIRTUAL_STORE if it was linked from a different virtual store directory.
ERR_PNPM_MODULES_BREAKING_CHANGE if it was installed by an incompatible pnpm version, or if node_modules/.modules.yaml cannot be read.
ERR_PNPM_NODE_LINKER_DIFF if it was installed with a different nodeLinker.
pnpm update now also fails with ERR_PNPM_HOIST_PATTERN_DIFF and the other errors pnpm add reports for a changed hoist pattern or virtualStoreDirMaxLength.
An install filtered to some workspace projects now fails if node_modules was installed with a different nodeLinker, hoistPattern, publicHoistPattern, store, or virtual store. Before, it recreated node_modules and left the projects it skipped without their dependencies. A pnpm install of the whole workspace still recreates node_modulespnpm/tasks#217.
pnpm install and the verifyDepsBeforeRun check now notice an edited patch file when sharedWorkspaceLockfile is false.
pnpm install now takes its fast path in a workspace with patchedDependencies when the previous install ran with another major version of pnpm.
pnpm install now relinks the bins of a workspace package when its bin field changes, including with --frozen-lockfile and an unchanged lockfile. A filtered install relinks them in the selected projects, and the next install that covers the remaining projects relinks them there #17324.
pnpm install now removes command shims from node_modules/.bin when a workspace dependency renames or removes an entry from its bin field pnpm/tasks#211.
Resolving dependencies and the lockfile
A package that a plain range and a <prefix>: specifier both resolve from one registry is now recorded once in pnpm-lock.yaml and installed once. The lockfile key names the registry a package resolved from. When that registry declares a prefix, through prefix in registries or through namedRegistries, the package is keyed <name>@<prefix>:<version> however its dependency was written: with the prefix, as a plain range its scope routes to that registry, or through the default registry. Before, the plain range was keyed <name>@<version>, so one tarball was installed twice and instanceof checks and module singletons broke between the two copies. The same name and version served by two registries still get separate entries. When several prefixes declare one registry, its packages are keyed by the lexicographically smallest prefix.
If a scope you route reaches a registry that also declares a prefix, your next pnpm install re-keys those entries, which shows up as a lockfile diff. Commit it. pnpm install --frozen-lockfile installs the lockfile as recorded.
pnpm install now resolves a scope's packages again when the scope is routed to another registry in registries. Before, the lockfile kept the versions and integrity resolved from the old registry, so the install failed when the new registry did not serve a locked version or served different content. pnpm records in the workspace state which registry each scope routed to, so a fresh clone without that record installs the lockfile as recorded. Changing the default registry resolves nothing again, and pnpm install --frozen-lockfile is unchanged.
When autoDedupe is off, a workspace project's dependencies now resolve from its own ranges, like they do with sharedWorkspaceLockfile: false. Previously, another project's narrower range could hold them back. For example, ajv: "*" now resolves to the latest Ajv even if another project depends on ajv@^6. Packages that a project lists in peerDependencies still follow the versions other projects use. pnpm dedupe and installs with autoDedupe: true still pick one version that satisfies every range. Set autoDedupe: true if CI runs pnpm dedupe --check#17235.
An optional dependency written with a named-registry prefix, such as work:^1.0.0, now fails the install when it cannot be resolved but the lockfile already has a matching entry from that registry. Such a dependency was skipped, which removed its entries from the lockfile.
With injectWorkspacePackages: true, a workspace: dependency written as a relative path, such as workspace:../lib-a, in a workspace package now resolves from that package's directory #17284.
Fixed pnpm install failing with ERR_PNPM_UNSUPPORTED_PROTOCOL when a workspace package injected through a relative path, such as workspace:../lib, has catalog: dependencies. Their catalog entries now resolve the way they do for a package injected by name #17280.
pnpm dedupe now refreshes cached registry metadata while re-resolving locked versions #17208.
pnpm dedupe --check no longer fails when the only difference is a deprecated notice that the registry added or removed after the lockfile was written #17198.
Installs delegated to a pnpr server now resolve every prefix declared for a registry URL. A dependency or lockfile entry that used the second of two prefixes for the same registry, such as zeta: next to work: in namedRegistries, failed on the server pnpm/tasks#204.
Registry revisions are now addressed at <registry>/<name>@<version>+r<revision>pnpm/tasks#208.
Adding packages and global packages
pnpm add <pkg>@<tag> and pnpm add <pkg>@<range> now install the version the tag or range resolves to, even when the saved range allows a newer one #17234.
pnpm add <pkg> without a version now installs the version under the dist-tag set by the tag setting. An npm: alias or a jsr: dependency without a version resolves that tag too. The setting is read from pnpm-workspace.yaml, the global config, PNPM_CONFIG_TAG, and --config.tag, and defaults to latest.
pnpm add now accepts the lowercase short options -p, -d, -o, and -e as aliases of --save-prod, --save-dev, --save-optional, and --save-exact.
pnpm -D install <pkg> now saves the package to devDependencies. An add option such as -D or -E written before install <pkg> was rejected as an unexpected argument.
pnpm add -T now reports that the short option is ambiguous and points to --save-types and --tilde.
Global packages installed with pnpm add -g are now linked from the global virtual store, so global packages that share dependencies share one copy. Set virtualStoreType: project to give each global install its own virtual store.
pnpm add -g and the other --global commands now fail with ERR_PNPM_CONFIG_CONFLICT_VIRTUAL_STORE_DIR_WITH_GLOBAL when --virtual-store-dir is passed. A custom --hoist-pattern fails with ERR_PNPM_CONFIG_CONFLICT_HOIST_PATTERN_WITH_GLOBAL. Passing --link-workspace-packages, --shared-workspace-lockfile, or --config.lockfile-dir with --global also fails, with the matching ERR_PNPM_CONFIG_CONFLICT_*_WITH_GLOBAL code.
Registries, proxies, and login
pnpm now reads the strictSsl and localAddress settings from pnpm-workspace.yaml, the global config.yaml, PNPM_CONFIG_* environment variables, and --config.* options. This includes pnpm self-update and the download of the pnpm version pinned in packageManager. Before, pnpm read them only from .npmrc as strict-ssl and local-address and ignored the other sources pnpm/tasks#201.
When Corepack runs pnpm and the native binary has to be downloaded, the download now uses the proxy from pnpm's config. That proxy comes from PNPM_CONFIG_HTTPS_PROXY and the matching variables, the global config.yaml, and the user .npmrc. Previously, the download read the proxy only from HTTPS_PROXY, HTTP_PROXY, and NO_PROXYpnpm/tasks#215.
When the pnpm package downloads its native binary on first run, as it does under Corepack, it now trusts the CA certificates from the ca, ca[], and cafile settings of .npmrc, including the ones scoped to the registry. A registry behind a private CA failed with fetch failed before, unless NODE_EXTRA_CA_CERTS named the CA. A project .npmrc is used only while the download is checked against npm's signature. Node.js versions that cannot add CA certificates after startup still need NODE_EXTRA_CA_CERTS.
pnpm login saves the token in <pnpm config>/auth.ini again. Since v12.1.0, an unscoped login had made its registry the default for every project that did not name a registry. A login now also removes the token an earlier login saved for that registry or scope under _auth in the global config.yaml. pnpm login --scope still routes the scope through the global registries setting.
pnpm no longer warns that a registries entry routed through the @ scope matches no configured registry. pnpm applied such an entry and its options such as serverType while reporting it as ignored pnpm/tasks#184.
Running scripts and other commands
pnpm ci --lockfile and pnpm ci --config.lockfile=true no longer delete pnpm-lock.yaml. pnpm ci now always keeps the lockfile and runs a frozen install from it.
pnpm deploy --legacy now checks the workspace lockfile against minimumReleaseAge and the other resolution policies, as pnpm install does, and fails with ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION when a locked version is too new. It used to deploy an older version that is not in the lockfile without a warning #17209.
pnpm deploy now keeps a deployed symlink to a directory inside the project even if the directory is not among the deployed files, such as a link into node_modules#17288.
pnpm pack and pnpm publish now keep pnpm.config in the published package.json. They also always include the file pnpm.config points to in the tarball #17210.
pnpm -r publish --batch now sends PUT /-/pnpr/v0/publish, the batch publish endpoint that pnpr serves.
pnpm audit --ignore and pnpm audit --ignore-unfixable now exit with a non-zero code when vulnerabilities at or above the audit level remain after ignoring. Before, these commands always exited with code 0.
pnpm audit --fix and pnpm audit --interactive now fail with ERR_PNPM_AUDIT_FIX_WITH_IGNORE when combined with --ignore or --ignore-unfixable. Before, the fix ran and the ignore flags had no effect.
pnpm -r run <script> now honors the requiredScripts setting from pnpm-workspace.yaml. If the script is listed there and a selected project does not define it, the run fails with ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT and names the projects that lack it.
pnpm run and pnpm exec no longer report the dependencies as out of date after a lockfile change when dedupePeers is true#17322.
On macOS, killing pnpm while it runs scripts in several projects at once now ends every one of those scripts. Before, a script could keep running after pnpm died.
pnpm run, pnpm exec, and pnpm dlx no longer dump a core file for pnpm itself when a command they started dies from a signal #17204.
The runtime setting is now read. Setting runtime: false in pnpm-workspace.yaml, pnpm_config_runtime=false, or --config.runtime=false stops pnpm install, pnpm add, pnpm dedupe, and the other installing commands from installing the runtimes in devEngines.runtime and engines.runtime. pnpm dedupe now also accepts --no-runtime.
Directory selectors with legacyDirFiltering: true now include the project in the named directory along with its descendants. Excluding a directory also excludes that project pnpm/tasks#196.
pnpm help --all and pnpm help -a now print the full list of commands. They used to fail with an "unrecognized subcommand" error.
Reading the file-creation mask on Linux no longer sets it. pnpm had to replace the mask to learn what it was, and a file another thread created in the window between the two calls was created unmasked.
pnpm now passes an interrupt on to the handler it replaced, with the arguments that handler expects. A handler that asked for the signal's details was called without them. Only a program that embeds pnpm and installs its own SIGINT, SIGTERM or SIGHUP handler was affected.
Store
pnpm store prune now keeps the packages that a project still uses when pnpm copied or cloned them into node_modules. These include patched packages, built packages, and every package installed with packageImportMethod: copy. Before, the prune removed them, and the next install downloaded them again #7192.
pnpm store prune now keeps the packages of a project when the store path reaches its directory through a symlink. Previously, prune dropped such a project from its list and removed the packages only that project used from the global virtual store.
pnpm store prune now removes the package metadata cache, the metadata* directories in the cache directory. This clears the outdated integrity checksums that cause ERR_PNPM_TARBALL_INTEGRITY when a registry republishes a version.
Speed
pnpm install resolves dependencies faster in large workspaces on Linux, macOS, and Windows on x64 and arm64.
Sped up cold installs and pnpm fetch on macOS. pnpm now links downloaded packages into the virtual store on a separate thread, so a slow link pass no longer pauses the downloads that are still in flight #17271.
Sped up installs that add new projects to a workspace with a peer-heavy lockfile. pnpm now reads the lockfile's locked peer versions once for all new projects #17311.
Warm installs no longer read the package.json of every git-hosted dependency. pnpm now stores the manifest of a git-hosted package in the store index when it fetches the package.
pnpm update --depth <n> with a large n, such as the --depth=9999 that update-browserslist-db runs, now finishes as fast as --depth Infinity. It used memory and stack in proportion to n on lockfiles with dependency cycles, and could run out of memory or crash #17329.
Output and warnings
Output that fills the terminal, such as pnpm run --stream script output, is now written once. Before, every new line also rewrote all the lines already on screen #17387.
pnpm now warns when a pnpmfile defines the importPackage hook. pnpm does not run this hook. Use the packageImportMethod setting to choose how packages are written to node_modules.
pnpm now warns when a project's pnpm-workspace.yaml sets ci, globalShims, or tools, and names where to set them instead. These settings were already ignored there without a warning. pnpm config set also refuses to write them to a project's pnpm-workspace.yaml.
pnpm no longer documents the scriptsPrependNodePath setting, which has no effect. A pnpm-workspace.yaml that sets it still loads.
This release lets pnpm-workspace.yaml delegate settings to other files and config dependencies with include, adds lockfile.integrityTarget: tar and tar-registry support, accepts zstd-compressed registry responses, and honors SOURCE_DATE_EPOCH in pnpm deploy and pnpm install. It also rejects registry metadata that names a different package than the one requested and speeds up workspace installs and macOS file linking.
Minor Changes
pnpm-workspace.yaml can now delegate settings to other YAML files and to config dependencies through a new include field. Each source may define only the settings the root manifest delegates to it. Every setting has one owner. Commands that change settings write each one to the file that owns it. A relative path in an included file is relative to that file. See Splitting Settings Across Files.
A config dependency supplies its settings through the YAML file named in the pnpm.config field of its package.json. The new bootConfig setting sets the release-age and trust policy pnpm uses to install config dependencies and the pnpm version from packageManager.
Added the lockfile.integrityTarget setting. With integrityTarget: tar, pnpm-lock.yaml pins the hash of every package's uncompressed tar, so the lockfile no longer changes when a registry recompresses its tarballs or serves them as tars. pnpm learns a version's tar hash from the store or by downloading it once. pnpm audit signatures ties the tar hash to the signed .tgz integrity.
lockfile:integrityTarget:tar
pnpm can now install from a registry that serves uncompressed tars with zstd or gzip content coding. pnpm-lock.yaml records the hash of each tar. Declare such a registry with serverType: pnpr in registries to keep tarball URLs out of the lockfile. See Tar registries.
pnpm now decodes the content coding of tarball downloads itself. It rejects a zstd response whose window is larger than 8 MiB.
Added the maxTarballUnpackedSize setting. It caps the bytes the files of one package may unpack to, 4 GiB by default.
Registry revisions now always pin the hash of the uncompressed tar, the original included. pnpm records an original selected through the revision protocol, for example with a +r0 specifier, as revision: 0 in the lockfile and fetches it from the registry's digest route. pnpm checks a revision's tar whether the registry sends it as a tar, gzip, or zstd. Revision metadata must list revision 0 and mark the selected revision. pnpm rejects incomplete revision metadata with ERR_PNPM_MALFORMED_METADATA.
pnpm now accepts zstd-compressed responses. Registries that serve zstd send package metadata in fewer bytes than with gzip, most of all the full metadata that settings such as minimumReleaseAge and trustPolicy read.
pnpm deploy and pnpm install now use the SOURCE_DATE_EPOCH environment variable as an upper bound for timestamps in node_modules/.modules.yaml and node_modules/.pnpm-workspace-state-v1.json. With an equivalently prepared deploy target and an epoch no later than the timestamps that would otherwise be recorded, deploying the same project twice produces identical files #17171.
pnpm update --interactive now highlights the row under the cursor in cyan while keeping the colors of its version changes.
Patch Changes
Security
pnpm now fails with ERR_PNPM_REGISTRY_NAME_MISMATCH if a registry returns metadata for a package other than the one requested. Before, pnpm installed the package under the name in the metadata, so allowBuilds rules for the requested package did not apply to it.
minimumReleaseAgeExcludePrune and trustPolicyExcludePrune now keep exclusions for resolved configuration dependencies and their transitive dependencies #17142.
Resolving dependencies
When pnpm install resolves a dependency again, it now reuses a version that the install already resolved for the same package, as a fresh install does. Before, it kept the version the lockfile pinned and added a second copy of the package. A locked version still stays when nothing else in the install prefers another version. To pin a transitive dependency on purpose, use overrides#17084.
When another workspace project adds a different version of a package, a project's auto-installed peer on that package now moves to the version a fresh install picks. It used to stay on its locked version while any other project still accepted that version #17058.
A package that lists the same dependency in dependencies and as an optional peer now gets the peer bound when a project adds a provider for it later. The lockfile now records every peer a package declares, including one its own dependency supplies #17056.
pnpm install --prod and pnpm deploy --prod no longer drop a dependency that a package declares both as an optional peer and as its own dependency, when the package resolved it as its own dependency and a dev dependency provides the same package under another alias.
pnpm install with an existing lockfile and a second pnpm dedupe now keep optional peer bindings that point into a dependency cycle or back into the dependent package. Before, the second run dropped the optional peer binding from the lockfile snapshot key.
pnpm install and pnpm dedupe now preserve own-dependency and peer-dependency bindings when reusing a lockfile whose peer suffixes were hashed by peersSuffixMaxLength.
Upgrading a direct dependency in one workspace project now refreshes matching transitive pins in sibling projects during the same pnpm install pass.
With resolvePeersFromWorkspaceRoot: false, a workspace project no longer binds a peer to a version that only another project's dependencies provide. pnpm now auto-installs a version that satisfies the peer range for that project. Before, the project got a version outside the range, with no peer warning.
pnpm install, pnpm add, and pnpm update now reuse the lockfile's resolution for dependencies that take part in a dependency cycle, such as mlly and pkg-types. They re-resolved those packages and everything that depends on them from the registry before pnpm/tasks#130.
pnpm now measures a pnpm.overrides entry written as a workspace: path, such as workspace:./packages/foo, from the directory holding pnpm-workspace.yaml. It used to be measured from each package the override rewrote. The install then linked a directory that does not exist, or failed if workspace packages were injected #17010.
pnpm install now removes config dependencies that are no longer declared, including when the entire configDependencies setting is removed. Frozen installs reject a lockfile that still records removed config dependencies.
pnpm install --update-checksums now re-resolves every locked package and records the integrity the registry reports now.
pnpm add and pnpm install now accept gist:<id> dependencies and GitHub Gist URLs, and install them from the gist's archive. pnpm pkg fix normalizes a gist: repository the way npm pkg fix does, pnpm licenses links a gist package to its gist page, and pnpm sbom reports the repository of a package whose repository field is a gist: shorthand.
pnpm add now reads the package name correctly from a tarball URL under a registry URL that has a path, such as https://example.com/npm/, and installs a registry tarball URL with a malformed percent escape as a plain tarball URL. Before, the registry path became part of the name, so a scoped package failed with ERR_PNPM_INVALID_PACKAGE_NAME.
With minimumReleaseAge set, pnpm now revalidates a package's cached full metadata with a single ETag request so an unchanged registry answers with 304, even when the registry does not list a publish time for every version. Previously, pnpm downloaded that metadata again whenever the cached copy was older than minimumReleaseAge. With resolutionMode set to lowest-direct or time-based, pnpm also reuses that metadata across every workspace project that depends on the package.
When pnpm revalidates cached registry metadata, it now sends If-Modified-Since when the registry's modification time is a date without a time, and no longer crashes when the modification time is before 1970.
Added protocol versioning between the pnpm client and pnpr server, verified applied resolution policies in resolution responses, and preserved structured error codes across the wire.
Performance
Sped up pnpm install on macOS. On a 12-core Mac, installing 1352 packages from a warm store took 1.3 seconds, down from 2.2. pnpm now writes package files into node_modules with 4 threads on macOS, whatever the number of CPU cores. Set the PNPM_MACOS_LINK_THREADS environment variable to use a different number of threads, or to 0 to write files with the threads pnpm uses for the rest of the install.
pnpm install is faster and uses less memory in large workspaces with sharedWorkspaceLockfile: false. Each project's install no longer reads the manifests of every other workspace project again. Installs that wait for their workspace dependencies now count toward workspaceConcurrency#16966.
Sped up workspace project discovery, dependency resolution, lockfile up-to-date checks, and peer dependency checks in large workspaces #16839pnpm/tasks#9. On a workspace with 6,833 projects, the lockfile up-to-date check uses about 1 second less CPU time. The peer dependency check at the end of an install now checks linked workspace projects against the manifests already in memory, without reading each package.json again.
Sped up bin linking and build planning during pnpm install. Package binary targets and shebang runtimes are now precalculated during tarball extraction and served in pnpr registry metadata alongside verified requiresBuild, tarball size, and file-count metadata.
Lowered peak memory when pnpm downloads many packuments, such as during lockfile verification with trustPolicy on Linux. In one 1,800-entry workspace, a lockfile update now peaks at 1.8 to 2.0 GB. It peaked at 2.6 to 3.7 GB before #17020.
pnpm install in a Cargo workspace skips crates that an earlier install already unpacked into the store. Before, a repeat install processed every crate in Cargo.lock again. pnpm install --force unpacks every crate again pnpm/tasks#69.
Linking node_modules and workspaces
Concurrent installs that import the same package into one project now all complete. One of them used to fail with ENOTEMPTY when its copy of the package collided with the copy another install had already placed pnpm/tasks#48.
pnpm install now succeeds when node_modules is a symlink to an existing directory. Dependency hoisting previously rejected a symlinked node_modules as an invalid destination #17157.
A filtered first install under the isolated linker now links every workspace project by name into node_modules/.pnpm/node_modules, not only the selected ones pnpm/tasks#155.
With nodeLinker: hoisted, a filtered install such as pnpm --filter app add <pkg> keeps the root node_modules links and bins of the workspace projects it did not select. A project with no dependencies of its own lost them until the next full install.
pnpm install --filter with nodeLinker: hoisted and --prod or --dev now preserves previously installed dependency groups for unselected workspace projects pnpm/tasks#164. Repeat filtered installs also re-resolve when a transitive injected workspace dependency or a linked dependency's version changes.
With sharedWorkspaceLockfile: false, pnpm install now runs the workspace root's pnpmfile for every project, after the project's own pnpmfile. Before, it ran only the pnpmfile in the project's directory.
pnpm install and pnpm peers check now detect peer dependency issues and report linked package versions in linked projects that use package.json5 or package.yamlpnpm/tasks#172.
pnpm install and pnpm peers check no longer report an unmet peer when a workspace package's peer is provided by a remote tarball URL. pnpm now compares the peer range with the version in the tarball's manifest #17037.
pnpm prune now removes extraneous direct packages from node_modules when package.json and pnpm-lock.yaml are already in sync. pnpm prune also honors --filter, --recursive, sharedWorkspaceLockfile: false, and the trustLockfile setting and --trust-lockfile flag. With the lockfile trusted, pnpm prune --prod works offline when every package is in the store #16999.
Injected workspace packages
pnpm install --frozen-lockfile now fails with ERR_PNPM_OUTDATED_LOCKFILE when a local directory dependency or injected workspace package changes a dependency to a different tarball URL or git commit #17129. It also fails when an injected workspace package changes a dependency's named-registry range, such as work:^2.0.0, to one the locked version no longer satisfies.
pnpm install --frozen-lockfile now accepts the lockfile it wrote for a file: dependency on a directory without a package.json. It also accepts the lockfile for an injected workspace package that bundles a dependency in bundledDependencies, lists a dependency in both dependencies and optionalDependencies, or publishes from a publishConfig.directory whose package.json lists other dependencies than the project's own. Before, these failed with ERR_PNPM_OUTDATED_LOCKFILE.
The lockfile now records a catalog: peer dependency of an injected workspace package as written in its package.json. It recorded the catalog's range before, so editing the catalog changed the consumer's lockfile entry pnpm/tasks#153.
pnpm install now resolves a git, tarball, or tag dependency of an injected workspace package again when its spec changes. Before, it kept the old version.
Repeat installs and verifyDepsBeforeRun now re-check projects that inject a modified workspace package, including when sharedWorkspaceLockfile is false#17007, and accept aliased workspace: ranges on linked dependencies.
An injected workspace package that was linked now becomes a copy when the project that depends on it starts providing one of its peers at a version the package's own workspace context lacks. The link used to stay until that dependency was updated, so the package could not find the peer the project provides #17057.
An injected workspace package now keeps only the files its manifest lists after a lifecycle script or a script named in syncInjectedDepsAfterScripts rebuilds it. Before, these refreshes copied every file of the package directory into the injected copy, including files that files or .npmignore leave out. With deployAllFiles: true the copy still gets every file.
A script listed in syncInjectedDepsAfterScripts now keeps a package's links to its own files as links in the injected copies, the way pnpm install writes them, and updates those copies when sharedWorkspaceLockfile is false. Before, a directory link the script added became a real directory or went missing with deployAllFiles, and with sharedWorkspaceLockfile: false the copies kept the files from the last install.
Running scripts and checking dependencies
Pressing Ctrl+C during pnpm -r run or pnpm --filter <pkg> run no longer reports ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL. pnpm now ends with the interrupted script's status, such as 130 for a script that SIGINT ended on Linux or macOS #16964.
With enableGlobalVirtualStore, a Node.js resolve hook that a script registers now sees the importer as context.parentURL after pnpm's NODE_PATH fallback fails to find a bare specifier. Hooks that resolve tsconfig paths aliases from the importer failed with ERR_MODULE_NOT_FOUND#16979.
pnpm run, pnpm exec, and pnpm restart now pass the install flags they were given, such as --lockfile-dir, --modules-dir, --store-dir, --offline, and --ignore-scripts, to the pnpm install that verifyDepsBeforeRun: install starts. When that install leaves the dependencies out of date, pnpm now prints a warning.
A repeated pnpm install --filter now finishes without reinstalling when the selected projects are up to date, and so does pnpm install once filtered commands have installed every project. After a filtered install, pnpm run and pnpm exec now install a selected project whose dependencies changed in between #17011, require the workspace root when a filtered install with pruneDirectDependencies: true skipped it pnpm/tasks#181, and preserve the recorded ignored build scripts of unselected projects.
The check that runs before a script now holds the workspace projects that the selected project depends on, including with sharedWorkspaceLockfile: false and for workspace dependencies declared with link:. --filter=<project>... now selects link: dependencies as well. In a workspace that has no package.json at its root, pnpm run and pnpm exec no longer reinstall before every command when the dependencies are up to date.
verifyDepsBeforeRun and repeat pnpm install runs now apply overrides before comparing a modified package.json with pnpm-lock.yaml#17127. pnpm install with optimisticRepeatInstall now re-runs when configDependencies changed, verifyDepsBeforeRun reports node_modules out of date when useGitBranchLockfile is enabled and the branch lockfile is missing, and in a single-project repository both checks record a successful lockfile check so later runs skip it until the lockfile changes #16993.
pnpm install and verifyDepsBeforeRun now compare manifests, lockfiles, and patch files by content hash. They notice an edit that kept the file's modification time, as cp -p, rsync -a, or an archive extraction leave it, and a patch file that was copied or touched without changing its content no longer marks dependencies as outdated #16988.
Deploying, packing, and other commands
pnpm deploy now deploys file: dependencies that live outside the workspace directory. It failed with "Refusing to deploy unsafe lockfile path" #16983.
pnpm deploy now records the peer dependencies of the workspace packages it copies into the deployed lockfile. Before, pnpm rejected that lockfile with --frozen-lockfile when a deployed workspace package declared a peer and injectWorkspacePackages was off #17093.
pnpm install --frozen-lockfile and verifyDepsBeforeRun now succeed inside a directory created by pnpm deploy. pnpm deploy writes self-contained workspace and lockfile settings, prunes unused patchedDependencies, and preserves workspace-level dependency resolutions on deployed directory dependencies.
On macOS, pnpm deploy no longer writes a second, unused copy of every package to node_modules/.pnpm/@ in the deploy directory #17116.
pnpm patch-commit and pnpm install now apply a patch that renames or moves a file of the patched package. Such a patch failed with "rename/copy operations in patches are not yet supported".
In workspaces with sharedWorkspaceLockfile: false, pnpm patch, pnpm patch-commit, and pnpm patch-remove now resolve patch files and patchedDependencies entries at the workspace root. pnpm install checks configured patches across all workspace projects before reporting unused patches.
pnpm pack and pnpm publish no longer include editor swap files such as .*.swp, macOS ._* files, .lock-wscript, .wafpickle-*, build/config.gypi, or archived-packages/ in the tarball. Naming one of these files in files still includes it #16955.
pnpm pack and pnpm publish now support extended glob patterns and brace ranges such as part{1..3}.js and part{a..c}.js, including descending ranges, steps, and zero padding, in files, .npmignore, and .gitignore. Explicitly listed internal directory symlinks are preserved below excluded directories, entry points honor nested ignore files, ignore negations can re-include default-excluded logs and backup files, and nested lockfiles follow the package's file selection rules.
Trusted publishing with OIDC now works with registries whose URL has a path, such as https://registry.example/npm/private/. pnpm previously sent the token exchange request to the root of the registry host.
pnpm deprecate and pnpm unpublish now work for packages whose registry metadata is larger than 10 MiB, such as typescript. They accept up to 50 MiB, the same limit as pnpm owner.
pnpm owner ls now lists the owners of a package on the npm registry. It reported every package as not found.
pnpm licenses list --prod now includes optional dependencies, including transitive ones. Pass --no-optional to leave them out. pnpm licenses list also reports no licenses for workspace projects not recorded in the lockfile, errors when pnpm-lock.yaml is missing, and formats empty results as the requested text or JSON pnpm/tasks#174.
pnpm why now reads each selected workspace project's lockfile and modules directory when sharedWorkspaceLockfile is falsepnpm/tasks#169.
pnpm pkg fix now converts a repository string such as github:pnpm/example to the object form, as npm pkg fix does. It also normalizes a GitHub, GitLab, or Bitbucket repository URL the way npm pkg fix does #16980.
Configuration and setting up pnpm
Registry credentials and TLS settings passed with --config, such as --config.//registry.example.com/:_authToken=<token>, are now applied. They take precedence over the same settings in .npmrc files.
pnpm now reads only the settings it needs to decide whether to switch to the pnpm version a project pins. A setting outside them can no longer fail that decision or change its outcome. For example, pnpm --version no longer fails in a pinned project whose pnpm-workspace.yaml has a setting this pnpm cannot read. Projects that pin neither pnpm nor a runtime skip this check without reading any settings.
When pnpm switches to the version a project pins, an option only the pinned pnpm knows now reaches that pnpm when it comes immediately before the command name, as in pnpm --new-flag install. When switching for pnpm --version or an unrecognized command line, pnpm also honors --color, --no-color, --reporter, and --loglevel wherever they appear on the command line.
pnpm self-update now updates the project's pnpm pin when Homebrew installed pnpm or Corepack runs it, leaving the global pnpm alone #17001. Run inside a workspace package, pnpm self-update updates the pin in the workspace root's manifest, including in package.yaml or package.json5.
pnpm setup now completes when Windows registry environment values cannot be read or written. It prints PowerShell commands to configure PNPM_HOME and PATH without registry access #17167.
pnpm setup now succeeds when it cannot tell which shell configuration file to update, for example in a container where SHELL is not set. It installs pnpm and prints the PNPM_HOME and PATH lines to add yourself. Previously it failed with ERR_PNPM_UNKNOWN_SHELL, and so did the installer script at get.pnpm.io #16973.
In StackBlitz WebContainers, pnpm no longer crashes intermittently with Parking not supported on this platform, and running a command that does not exist now reports that the command was not found. Previously it sometimes failed with a generic error.
Platinum Sponsors
Gold Sponsors
Configuration
📅Schedule: (in timezone Europe/Berlin)
Branch creation
At any time (no schedule defined)
Automerge
At any time (no schedule defined)
🚦Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕Ignore: Close this PR and you won't be reminded about this update again.
If you want to rebase/retry this PR, check this box
This PR contains the following updates:
| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [pnpm](https://pnpm.io) ([source](https://github.com/pnpm/pnpm/tree/HEAD/pnpm/npm/pnpm)) | [`12.14.0` → `12.21.0`](https://renovatebot.com/diffs/npm/pnpm/12.14.0/12.21.0) |  |  |
---
### Release Notes
<details>
<summary>pnpm/pnpm (pnpm)</summary>
### [`v12.21.0`](https://github.com/pnpm/pnpm/releases/tag/v12.21.0): pnpm 12.21
[Compare Source](https://github.com/pnpm/pnpm/compare/v12.20.0...v12.21.0)
pnpm 12.21.0 lets `pnpm store add` prepare tarball and git dependencies for offline installs. It also makes repeated installs keep their peer dependency choices and fixes several `lockfile.format: v13`, `nodeLinker: hoisted`, and `pnpm deploy` failures. If a pnpr server refuses a setting, pnpm now resolves locally.
##### Minor Changes
- `pnpm store add` run in a project now prepares downloaded tarballs for every lockfile entry that pins them. Besides registry packages, `pnpm install --offline --frozen-lockfile` can then install dependencies on a tarball URL and dependencies on a git host such as GitHub whose lockfile entry records an `integrity`.
##### Patch Changes
##### Installs that failed
- pnpm now reads a lockfile with a mapping key longer than 1,024 characters written as `'key':`, without the `? ` marker. Before, `pnpm install` and other commands failed on such a lockfile with `ERR_PNPM_BROKEN_LOCKFILE`.
- With `lockfile.format: v13`, `pnpm install` no longer fails to create or rewrite the lockfile when a package declares many of its dependencies as peers.
- Fixed `pnpm deploy` failing with `lockfile.format: v13` when injected workspace packages have hashed peer bindings.
- Frozen installs with v13 lockfiles now accept valid peer dependencies of injected workspace packages that use catalogs.
- Fixed injected workspace packages that depend on themselves linking to a nonexistent directory.
- `pnpm install` with `frozenStore` enabled no longer fails with `ERR_PNPM_FROZEN_STORE_NEEDS_BUILD` when `nodeLinker` is `hoisted`. `pnpm fetch` with `nodeLinker: hoisted` no longer populates global virtual store links or modifies linked agent skills, and it preserves an existing hoisted `node_modules` directory [#​18037](https://github.com/pnpm/pnpm/issues/18037).
- A `requirements.txt` beside a `pyproject.toml` that declares `[tool.uv.workspace]` without a `[project]` table no longer makes that directory a Python project. `pnpm install` stopped there with an error when the directory had a `.venv` that pnpm did not create [#​18023](https://github.com/pnpm/pnpm/issues/18023).
##### Peer dependencies
- Repeated installs no longer change the peer dependency providers that the previous install chose. This covers adding, updating, or removing a dependency, projects that use different ranges of one dependency, dependency cycles, and injected dependencies with `autoInstallPeers: false` [pnpm/tasks#221](https://github.com/pnpm/tasks/issues/221).
An unchanged install keeps a valid locked peer provider even when a direct dependency provides another compatible version. Explicit `pnpm add` and `pnpm update` requests take precedence over it.
- Workspace projects that select different versions of a peer provider no longer share one copy of the package that depends on it. This affected peers reached through an aliased dependency or a peer dependency cycle.
- A removed dependency no longer comes back as a peer provider. Before, a direct dependency removed with `autoInstallPeers: false` could be restored from an old peer resolution, and a removed one could still supply its old peer context.
- With `nodeLinker: hoisted` and `autoInstallPeers: false`, `pnpm install` no longer creates duplicate copies of a package whose resolved peers are identical. A package also no longer loads a copy of its dependency that was resolved with different peer versions [#​18003](https://github.com/pnpm/pnpm/issues/18003).
- `pnpm deploy` now binds optional peers declared only in `peerDependenciesMeta` for linked workspace packages. The deployed manifest and lockfile also retain these peers when filtering dependency groups.
##### Running scripts
- Scripts now stop when pnpm's process group is killed while they are starting.
- Bin shims in the global virtual store no longer include the hoisted modules directory of the project that installed them [#​18035](https://github.com/pnpm/pnpm/issues/18035).
- `pnpm pipeline` now rebuilds local packages and reruns build scripts after it restores a shared Cargo build cache with Cargo 1.100 or newer. Before, a worktree could reuse build-script output from the worktree that created the cache.
##### pnpr
- If the pnpr server refuses a setting the install uses, or cannot return the lockfile format pnpm reads, `pnpm install` and `pnpm update` print a warning and resolve locally. Cargo and Python resolution also fall back to resolving locally. pnpm now rejects a pnpr resolution of npm dependencies that does not name its lockfile format.
- `pnpm install` with `pnprServer` now limits the size of the server's resolve and lockfile verification responses. An oversized response ends the request with an error.
- pnpm now displays pnpr error codes and reasons when remote requests fail.
##### Other commands and settings
- `pnpm setup` and the install script now support PowerShell as the login shell on Linux and macOS. They add `PNPM_HOME` to `PATH` in `profile.ps1` under `$XDG_CONFIG_HOME/powershell` or `~/.config/powershell` [#​18026](https://github.com/pnpm/pnpm/issues/18026).
- A `lockfileDir` setting that points at the default lockfile directory now installs the same way as leaving it unset [pnpm/tasks#275](https://github.com/pnpm/tasks/issues/275).
<!-- sponsors -->
#### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
</td>
<td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/notion.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/notion_light.svg" />
<img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://www.cloudflare.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/cloudflare.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/cloudflare_light.svg" />
<img src="https://pnpm.io/img/users/cloudflare.svg" width="160" alt="Cloudflare" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
#### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/latitude.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/latitude_light.svg" />
<img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://syntax.fm/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/syntaxfm.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/syntaxfm_light.svg" />
<img src="https://pnpm.io/img/users/syntaxfm.svg" width="90" alt="Syntax" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
<!-- sponsors end -->
### [`v12.20.0`](https://github.com/pnpm/pnpm/releases/tag/v12.20.0): pnpm 12.20
[Compare Source](https://github.com/pnpm/pnpm/compare/v12.19.0...v12.20.0)
pnpm 12.20.0 records the specifiers of local directory dependencies in the experimental v13 lockfile and fixes several `nodeLinker: hoisted`, peer dependency, and `overrides` bugs. The bundled `node-gyp` no longer ships the undici version that security scanners flag. Remote resolution and shared build caches no longer work with pnpr 0.1.0-alpha.19 or older.
##### Minor Changes
- With `lockfile.format: v13`, `pnpm install` records the dependency specifiers of local directory packages. Frozen installs reject changed specifiers even when the locked versions still satisfy them.
##### Patch Changes
##### Upgrading and security
- Remote resolution, shared build caches, and release notes no longer work with pnpr 0.1.0-alpha.19 or older. pnpm now reads the capabilities a pnpr server advertises under `pnpr.protocols`. Installs fail when the server does not confirm the requested resolution and verification policies.
- The `node-gyp` bundled with pnpm no longer ships undici 6, which security scanners flag for CVE-2026-84947. On Node.js 26, `node-gyp` downloads through a proxy or with a custom CA file no longer crash with "invalid onError method" [#​17941](https://github.com/pnpm/pnpm/issues/17941).
##### Resolving dependencies
- Version-selector `overrides` entries such as `"ms@^2.0.0": "2.1.1"` now apply to dependencies declared with the `catalog:` protocol when the catalog entry's range matches the selector [#​17922](https://github.com/pnpm/pnpm/issues/17922).
- A root `overrides` entry that points a package at a `workspace:` path, such as `workspace:./packages/foo`, now also applies when a registry package depends on that package [pnpm/tasks#270](https://github.com/pnpm/tasks/issues/270).
- Git dependencies now accept npm's `::` separator between fragment parameters, such as `github:owner/repo#v1.0.0::path:packages/foo`. Before, pnpm read the whole fragment as a branch name and failed to resolve it [#​17827](https://github.com/orgs/pnpm/discussions/17827).
- `pnpm dedupe` now keeps a locked runtime version, from `devEngines.runtime` or from a dependency's `engines.runtime`, when the declared range still admits it. `pnpm dedupe --check` no longer fails each time a newer Node.js release in the range comes out [#​17984](https://github.com/pnpm/pnpm/issues/17984).
- With `autoInstallPeersFromHighestMatch`, conflicting non-semver peer dependencies now remain missing, and identical non-semver peer specifiers are preserved. Preferred registry versions no longer replace local paths or protocol-prefixed specifiers when pnpm installs missing peers [pnpm/tasks#272](https://github.com/pnpm/tasks/issues/272).
##### Hoisted node linker
- With `nodeLinker: hoisted`, a package now keeps its nested copy of a dependency that it resolved at a version other than the top-level one, including a peer dependency its parent supplies. Before, pnpm could remove that copy as a duplicate or give the top-level slot to a peer variant found deeper in the graph. The package then loaded the top-level version.
##### Lockfile and peer dependency graphs
- Fixed `pnpm install` keeping stale peer bindings after dependency changes. Required dependencies no longer remain marked optional when another workspace project removes a shared package [pnpm/tasks#221](https://github.com/pnpm/tasks/issues/221).
- Repeated installs now keep the same dependency links when packages form cycles with several peer dependency variants [pnpm/tasks#221](https://github.com/pnpm/tasks/issues/221).
- Fixed writing `lockfile.format: v13` for dependency cycles with missing, optional, or transitive peers. Frozen installs also accept unchanged injected packages whose peers use catalogs. With `--no-optional`, frozen installs reject required catalog children recorded only as optional dependencies [pnpm/tasks#221](https://github.com/pnpm/tasks/issues/221).
- `pnpm deploy` preserves an injected workspace package's resolved dependencies when they differ from the workspace project's own dependencies. This also applies to packages with `publishConfig.directory` [pnpm/tasks#221](https://github.com/pnpm/tasks/issues/221).
##### Running scripts and runtimes
- Scripts that pnpm runs in a process group of their own are now ended when pnpm is killed right after starting them. A parallel run that was killed before pnpm registered its scripts left all of them running.
- When a command name matches no script and pnpm falls back to running it as a command, the install that runs before scripts now runs once. Its errors and warnings print once [#​17977](https://github.com/pnpm/pnpm/issues/17977).
- Failed downloads by project-aware global runtime commands now explain which configuration applies. Node.js failures also list the global mirror settings and environment variables to check.
##### Other commands and settings
- Fixed `pnpm` occasionally crashing on the first HTTPS request, mostly on Windows virtual machines under load. pnpm now seeds TLS randomness from the operating system's random number generator [pnpm/tasks#239](https://github.com/pnpm/tasks/issues/239).
- Fixed `pnpm deprecate`, `pnpm undeprecate`, and `pnpm unpublish` failing with revision conflicts when a registry cache serves stale package metadata.
- `pnpm sbom` now reports malformed workspace manifests. Before, it omitted their packages [pnpm/tasks#59](https://github.com/pnpm/tasks/issues/59).
- Fixed `pnpm store status` reporting approved builds of git dependencies as modified when the store contains legacy build metadata.
- pnpm now recognizes Capawesome Cloud and RWX as CI environments.
<!-- sponsors -->
#### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
</td>
<td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/notion.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/notion_light.svg" />
<img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://www.cloudflare.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/cloudflare.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/cloudflare_light.svg" />
<img src="https://pnpm.io/img/users/cloudflare.svg" width="160" alt="Cloudflare" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
#### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/latitude.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/latitude_light.svg" />
<img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://syntax.fm/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/syntaxfm.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/syntaxfm_light.svg" />
<img src="https://pnpm.io/img/users/syntaxfm.svg" width="90" alt="Syntax" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
<!-- sponsors end -->
### [`v12.19.0`](https://github.com/pnpm/pnpm/releases/tag/v12.19.0): pnpm 12.19
[Compare Source](https://github.com/pnpm/pnpm/compare/v12.18.0...v12.19.0)
pnpm 12.19.0 adds `pnpm fund`, lets the `loaded` node linker handle packages that need a build, and adds the `projectScopedOptionalPeers` setting and an experimental JSON lockfile format. It also includes a security fix: an offline install error no longer prints registry credentials. pnpm now checks the `engines` and platform fields of every workspace project, and many hoisted-linker and frozen-lockfile bugs are fixed.
##### Minor Changes
- Added `pnpm fund`, which lists the funding URLs declared by the installed dependencies in the same tree `npm fund` prints. Use `--json` for the `npm fund --json` report and `--recursive` or `--filter` to report on workspace projects. `pnpm fund <pkg>` opens the funding URL of an installed package, and `--which` picks one when it lists several [#​7354](https://github.com/pnpm/pnpm/issues/7354).
- With `nodeLinker.type: loaded`, packages that need a build no longer have to be listed in `nodeLinker.excluded`. A package with a matching side-effects cache entry loads from the store. If side-effects cache reads and writes are enabled, pnpm builds an approved package once, saves the result to the side-effects cache, and then loads it from the store. This includes a build that changes no files in its package, so its script does not run again in other projects that use the same store. List a package in `sideEffectsCache.exclude` if its build must run in every project, such as a git hook installer. pnpm materializes other cache misses, packages with native `.node` addons, and their dependencies automatically.
pnpm also scans JavaScript sources for filesystem imports and for `__dirname` or `import.meta`, and materializes matching packages. The scan does not detect computed imports. List such packages in `nodeLinker.excluded`.
- Added the `projectScopedOptionalPeers` setting. When it is `true`, a project gets a missing optional peer dependency only if the project's own dependencies install a version of it. Another workspace project's dependencies, such as its `devDependencies`, no longer supply one. `dedupePeerDependents` keeps deduplicating everything else [#​16666](https://github.com/orgs/pnpm/discussions/16666).
- Added the experimental `lockfile.format: v13` setting. With it, pnpm writes `pnpm-lock.yaml` in a JSON-like syntax, indented with tabs, with a trailing comma after every entry. The file is still valid YAML. The file has one `packages` entry per package version in place of the `packages` and `snapshots` sections, and each entry records the versions of its peer dependencies as its properties. Updating a peer dependency then changes only the lines that record its version. pnpm reads lockfiles in both formats whatever the setting is.
- `pnpm store add` now accepts directories of tarballs, such as `pnpm store add ./tarballs`, and adds every `.tgz`, `.tar.gz`, and `.tar` file inside them recursively. `pnpm store add` is now faster when it adds many packages or local tarballs [#​17875](https://github.com/pnpm/pnpm/issues/17875).
- With `supportedArchitectures` set, `pnpm install` and `pnpm fetch` also store, without linking them, the dependencies of the archives kept for the other listed platforms. A platform added to the setting gets its archives and their dependencies on the next install. Optional dependencies a listed platform cannot run are not stored, and one that fails to download is skipped. Dependencies from git repositories are not stored for other platforms.
- When `supportedArchitectures` names exactly one platform and not `current`, pnpm links that platform's variant of a package published with platform variants, together with that variant's dependencies. This holds for the list form and for the `os`, `cpu`, and `libc` form. A variant whose floor or ABI the listed platform does not state is not linked for it: pnpm links another variant that fits, or the version's own archive. Changing the setting, or the platform of the host, such as a `node_modules` mounted into a musl container or a Node.js with another ABI, relinks the package on the next install, even from a frozen lockfile.
- pnpm now provides a prebuilt binary for NetBSD 10 on x64 [#​17803](https://github.com/pnpm/pnpm/issues/17803).
##### Patch Changes
##### Security
- The error for a tarball that is missing from the store in offline mode no longer prints the credentials or token in the tarball URL.
##### Installs that failed or hung
- `pnpm install`, `pnpm ci`, and `pnpm install-test` outside a workspace now fail with `ERR_PNPM_NO_PKG_MANIFEST` when the directory has no `package.json`, `package.json5`, or `package.yaml`. They no longer create a `package.json`, a lockfile, and `node_modules` there [#​17727](https://github.com/pnpm/pnpm/issues/17727).
- Fixed `pnpm install` hanging when a concurrent tarball download or manifest read is cancelled while other tasks are waiting on the same archive.
- Running a global command such as `node` in a project that pins its version no longer hangs while pnpm installs that version. The hang kept starting new processes until the machine ran out of memory.
- A global command such as `node` now runs the version a project pins when `PNPM_CONFIG_LOCKFILE_DIR`, `PNPM_CONFIG_VIRTUAL_STORE_ONLY`, or `PNPM_CONFIG_SYMLINK` is set in the environment. Before, the dispatch failed with "the installed node executable is not under" the store.
- `pnpm install` now fetches fresh metadata for a package when a version allowed by `minimumReleaseAgeExclude` is missing from the cached metadata. Before, it could fail with `ERR_PNPM_NO_MATCHING_VERSION` without contacting the registry [#​17723](https://github.com/pnpm/pnpm/issues/17723).
- A `${VAR}` placeholder in a registry URL in `pnpm-workspace.yaml` or the project `.npmrc` now fails the command. pnpm does not expand environment variables in these files. Before, pnpm ignored such a URL and resolved packages from another registry, such as npmjs.org. pnpm now warns when it ignores a placeholder in a proxy, `pnprServer`, or `userAgent` setting in `pnpm-workspace.yaml` [#​17762](https://github.com/pnpm/pnpm/issues/17762).
- Fixed local package installs failing while a workspace lockfile is being written.
- `pnpm self-update` and switching to the `packageManager` version now work behind a proxy that ends a response by closing the TLS connection without a `close_notify` alert. The registry signature check failed there with `ERR_PNPM_PNPM_ENGINE_IDENTITY_UNVERIFIABLE` [#​17763](https://github.com/pnpm/pnpm/issues/17763).
- A package tarball that keeps failing to download now fails the install after `fetchRetries` retries. pnpm used to download it again with a second full set of retries, which doubled the wait. The error now names the actual download failure.
- When the native binary of the pnpm version a project pins fails to download, pnpm now reports the download error. It used to report only that no native binary was found for the host.
- POSIX bin shims and the `pnpm`, `pn`, `pnpx`, and `pnx` launchers now run inside a Nix build on macOS with the sandbox enabled. Installing again replaces the shims already in `node_modules` [#​17750](https://github.com/pnpm/pnpm/issues/17750).
- Fixed pnpm leaving process pipes open after it exits on macOS [pnpm/tasks#229](https://github.com/pnpm/tasks/issues/229).
##### Engines and platform checks
- `pnpm install`, `pnpm add`, `pnpm update`, and `pnpm remove` now check the `engines`, `os`, `cpu`, and `libc` fields of every workspace project, including the workspace root. `pnpm run -r` and `pnpm exec -r` check them before running anything. An incompatible `engines.pnpm` fails the command. An incompatible `engines.node` prints a warning, or fails the command with `engineStrict` enabled. An unsupported platform prints a warning. A project that downloads its own Node.js through `devEngines.runtime` is checked against that Node.js [#​17751](https://github.com/pnpm/pnpm/issues/17751) [pnpm/tasks#281](https://github.com/pnpm/tasks/issues/281) [pnpm/tasks#299](https://github.com/pnpm/tasks/issues/299).
- Fixed missing warnings when a required dependency does not support the current Node.js version.
- An optional dependency that declares no `os`, `cpu`, or `libc` field is no longer skipped because its name contains only an operating system word, such as `get-windows` on macOS. pnpm now infers its platform from the name only when the name also has a cpu or libc token, such as `-win32-x64` [#​17774](https://github.com/pnpm/pnpm/issues/17774).
##### Peer dependencies
- With `dedupePeerDependents: false`, a missing optional peer is no longer resolved from a version that only another workspace project depends on. The workspace root's dependencies still count if `resolvePeersFromWorkspaceRoot` is `true`. Before, a tool in one project's `devDependencies`, such as `webpack-cli`, could become an optional peer of another project's production dependencies [#​16666](https://github.com/orgs/pnpm/discussions/16666).
- `pnpm install` no longer gives a project an optional peer dependency that it skipped because a required peer would conflict with the project's dependencies. Before, `dedupePeerDependents` merged the project's copy of the package that declares the peer with another project's copy that resolves it [#​17781](https://github.com/pnpm/pnpm/issues/17781).
- `pnpm install` no longer fills in a missing optional peer dependency if a required peer it brings in conflicts with a version the project depends on. Before, such a peer was installed along with it and reported as unmet [#​17718](https://github.com/orgs/pnpm/discussions/17718).
- `pnpm install --filter` in a sparse checkout now counts the dependencies of workspace projects that are missing from disk when it resolves peer dependencies and marks packages as optional. The lockfile it writes no longer differs from a full checkout in those entries [#​17791](https://github.com/pnpm/pnpm/issues/17791).
##### Frozen lockfile and workspace links
- `pnpm install --frozen-lockfile` now succeeds when a workspace project recorded in `pnpm-lock.yaml` has an empty directory, such as a git submodule that was not checked out [#​17712](https://github.com/pnpm/pnpm/issues/17712).
- `pnpm install --frozen-lockfile` now fails with `ERR_PNPM_OUTDATED_LOCKFILE` when a workspace package linked through a plain semver range, such as `^7.9.5`, has changed to a version outside that range [#​17806](https://github.com/pnpm/pnpm/issues/17806).
- `pnpm install --frozen-lockfile` and `verifyDepsBeforeRun` now accept a `workspace:` dependency on a project whose version is not valid semver, such as `workspace:1` on a project at version `1`. Before, they reported the lockfile that `pnpm install` had just written as out of date.
- `pnpm install --frozen-lockfile` now accepts a lockfile when an injected workspace package declares a `file:` or `link:` dependency with backslashes, such as `file:..\vendor`, or with a slash after the protocol, such as `file:/./vendor`. Before, the install reported the lockfile as out of date right after `pnpm install` had written it [#​17720](https://github.com/pnpm/pnpm/pull/17720).
- When a package injected through a path, such as `file:../lib` or `../lib`, gives one of its dependencies a `catalog:` specifier, `pnpm install --frozen-lockfile` now reports the lockfile as outdated. For a bare path such as `../lib`, `pnpm install` now also fails the way a fresh resolution does. Before, these installs accepted the existing lockfile [#​17722](https://github.com/pnpm/pnpm/pull/17722).
- Dependencies declared as `workspace:` entries in catalogs now remain in the lockfile when `excludeLinksFromLockfile` is enabled. Frozen installs can restore these links after `node_modules` is removed [pnpm/tasks#260](https://github.com/pnpm/tasks/issues/260).
- With `dedupeDirectDeps`, `pnpm install` now compares `link:` dependencies by the directory they point at. A project's `link:` dependency is removed when the workspace root links the same directory under a different path. It is kept when the root's `link:` dependency has the same text but points at another directory. pnpm reports a dependency the root provides as removed only once, when it removes the project's link. The summary shows the package version of a removed `link:` dependency [pnpm/tasks#293](https://github.com/pnpm/tasks/issues/293).
##### Hoisted node linker and custom modulesDir
- With `nodeLinker: hoisted`, a package that runs a lifecycle script or has a patch is now cloned or copied into `node_modules`, as with the isolated linker. A build that rewrites one of its files no longer changes the store copy shared with other projects.
- With `nodeLinker: hoisted`, pnpm no longer deletes a directory outside `node_modules` when it removes a package whose scope directory is a symlink.
- With `nodeLinker: hoisted`, `pnpm install --filter` in a sparse checkout now drops previously installed workspace projects that are missing from disk from the hoisted `node_modules` tree. It no longer recreates `node_modules` inside a missing project's directory. Packages that only the missing project used are also removed from the root `node_modules`.
- With `nodeLinker: hoisted` and `dedupeDirectDeps`, `pnpm install` now removes a project's `link:` dependency that the workspace root provides, and reports each `link:` dependency it removes. Removing the last scoped `link:` dependency of a scope also removes the empty `@scope` directory.
- With `nodeLinker: hoisted` and a custom `modulesDir`, pnpm now installs a workspace project's dependencies that cannot be hoisted to the root into the project's `modulesDir`. The next install that relinks the project removes the copies that earlier installs left in its `node_modules`. A later install restores the project's `modulesDir` when it was removed. Package directories that pnpm did not install are now also moved to `.ignored` in a custom `modulesDir`.
- Fixed installs in a workspace whose `modulesDir` is an absolute path, including one that goes through a symlink such as `/tmp` on macOS, or a path that starts with `..`. Dependencies of workspace projects no longer end up outside the workspace, and the root project's dependencies, `link:` dependencies, and commands are linked into the configured directory. `pnpm bin`, `pnpm root`, `pnpm run`, `pnpm exec`, and `pnpm version` now use that directory too [pnpm/tasks#285](https://github.com/pnpm/tasks/issues/285).
##### Store and builds
- Concurrent installs into a global virtual store no longer wait on each other. A package that needs a build is built in a private directory and moved into the store once its build has finished, so another project never links a half-built package. An install with `--ignore-scripts` links the packages it does not build from their own store directories, and `pnpm store prune` removes the build directories of installs that were interrupted [#​15568](https://github.com/pnpm/pnpm/issues/15568).
- Packages that an older pnpm version added to the store now run their install scripts. Before, pnpm could skip those scripts and hardlink the package's files to the store.
- `pnpm install` now keeps patches to bundled dependencies when it restores a package from the side-effects cache, including files a patch adds [#​17734](https://github.com/pnpm/pnpm/issues/17734).
- Local installs on macOS now keep cached clones separate from the global virtual store. `pnpm store prune` removes this cache, so unused cached packages no longer accumulate [#​17907](https://github.com/pnpm/pnpm/issues/17907).
- `pnpm store prune` now stops if a dependency link cannot be read. This keeps installed packages from being removed after an incomplete scan.
- A repeat `pnpm install` now runs a full install when the `runtimeOnFail` setting changes. Before, it printed "Already up to date" and did not install the runtime a project declares in `devEngines.runtime` [pnpm/tasks#303](https://github.com/pnpm/tasks/issues/303).
- The sync of an injected workspace dependency now copies a file whose source has reached the filesystem's limit on hard links. `pnpm patch-commit` now copies a file into its scratch directory when the filesystem refuses to hard link it, unless the path is missing or already occupied [pnpm/tasks#283](https://github.com/pnpm/tasks/issues/283).
##### Speed
- `pnpm install` is faster when it clones files from the store, which it does by default on macOS. On a Mac with endpoint security software, a cold install of a project with about 1,350 packages took 29% less time [pnpm/tasks#280](https://github.com/pnpm/tasks/issues/280).
- `pnpm install` unpacks packages that contain many files faster. Unpacking `typescript` took 30% less time in our measurements [pnpm/tasks#288](https://github.com/pnpm/tasks/issues/288).
- Resolving against a registry that sends `Cache-Control: no-cache`, such as Azure Artifacts, is fast again when the lockfile already decides the version. pnpm reads the cached metadata for a pinned version, or for a range the lockfile version is proven to win, without a registry request [#​17758](https://github.com/pnpm/pnpm/issues/17758).
- POSIX bin shims start fewer processes. Running a dependency's bin through its shim from Git Bash on Windows starts 7 processes where it started 15. Installing again replaces the shims already in `node_modules`.
##### Windows
- pnpm now installs dependencies and runs lifecycle scripts from projects on mapped Windows network drives. When a network share refuses the links in `node_modules`, the error now suggests setting `nodeLinker: hoisted` or moving the project to a local drive [#​17747](https://github.com/pnpm/pnpm/issues/17747).
- `packageImportMethod: auto` now tries hardlinking before cloning, as it does on Linux. Installs from a warm store on a Dev Drive are faster. An install no longer fails when the store refuses a hardlink with an access-denied error, and pnpm tries cloning or copying the file next [#​17809](https://github.com/pnpm/pnpm/issues/17809).
- `pnpm run` and `pnpm setup` no longer clear the visible terminal when a project path contains non-ASCII characters.
- A failed attempt to create a directory junction in `node_modules` no longer leaves a `.pnpm-junction-*` directory behind.
- `pnpm` starts faster. It loads system libraries such as `user32.dll` and `shell32.dll` the first time a command uses them, so `pnpm --version` loads 11 libraries where it loaded 25.
##### pnpm deploy
- `pnpm deploy` now runs the build scripts of a workspace project that it installs as a `file:` dependency, without a machine-specific `allowBuilds` key. An `allowBuilds` entry that denies the project still applies [#​17740](https://github.com/pnpm/pnpm/issues/17740).
- `pnpm deploy` no longer fails when the deployed project depends on a workspace package that sets `publishConfig.directory`. pnpm installs that package from its publish directory and runs its build scripts [#​17771](https://github.com/pnpm/pnpm/pull/17771).
- `pnpm deploy` without a shared workspace lockfile now resolves a relative `workspace:` path, such as `workspace:../lib`, from the source project's directory. It used to be resolved from the deploy target and fail [#​17804](https://github.com/pnpm/pnpm/issues/17804).
- `pnpm deploy --offline --trust-lockfile` now reuses dependencies pinned in the source lockfile from a populated store when registry metadata is unavailable. This works with per-project lockfiles, `--legacy`, and npm aliases [#​17888](https://github.com/pnpm/pnpm/issues/17888).
##### Other commands and settings
- `pnpm dist-tag` and `pnpm unpublish` now offer browser-based authentication when the account's two-factor authentication uses a security key. Before, they asked for a one-time password in that case [#​17832](https://github.com/pnpm/pnpm/issues/17832).
- `pnpm publish` with provenance now downloads Sigstore's current signing configuration before signing. A failed or slow download is retried with the same retry policy and deadline as the signing requests.
- `pnpm pack` and `pnpm publish` now apply the first rule of a `.npmignore` or `.gitignore` that starts with a UTF-8 BOM.
- `pnpm outdated` now checks dependencies when the project has no lockfile, for example with `lockfile: false`. The `Current` column shows the installed version, or the lowest version allowed by the declared range if the dependency is not installed [#​17811](https://github.com/pnpm/pnpm/issues/17811).
- `pnpm self-update` now updates the project's `engines.pnpm` range along with its pnpm pin, keeping the `^` or `~` operator [#​17732](https://github.com/pnpm/pnpm/issues/17732).
- On Linux and macOS, `pnpm run` no longer sometimes reports a lifecycle failure after `Ctrl+C` interrupts a script.
- Config dependencies use the declared registry `serverType` when recording and installing packages [pnpm/tasks#236](https://github.com/pnpm/tasks/issues/236).
- Relative directory selectors set on `config.filter` or `config.filterProd` by an `updateConfig` hook now resolve from the workspace root even when `--dir` is passed or `pnpm` runs from a subdirectory [#​17906](https://github.com/pnpm/pnpm/issues/17906).
- Commands that add settings to `pnpm-workspace.yaml` now fail with an error if the file contains only `null`, and leave the file unchanged. Before, they wrote invalid YAML.
- Shell tab-completion now completes directory and file paths for path options such as `-C`, `--dir`, `--prefix`, `--store-dir`, and `--env-file`. Before, options without a fixed list of values offered command names [#​17884](https://github.com/pnpm/pnpm/issues/17884).
<!-- sponsors -->
#### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
</td>
<td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://www.cloudflare.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/cloudflare.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/cloudflare_light.svg" />
<img src="https://pnpm.io/img/users/cloudflare.svg" width="160" alt="Cloudflare" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
#### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
</td>
<td align="center" valign="middle">
<a href="https://syntax.fm/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/syntaxfm.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/syntaxfm_light.svg" />
<img src="https://pnpm.io/img/users/syntaxfm.svg" width="90" alt="Syntax" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
<!-- sponsors end -->
### [`v12.18.0`](https://github.com/pnpm/pnpm/releases/tag/v12.18.0): pnpm 12.18
[Compare Source](https://github.com/pnpm/pnpm/compare/v12.17.0...v12.18.0)
pnpm 12.18.0 packs, publishes, and installs packages with platform variants on pnpr registries. It also adds per-skill approval of agent skills and `pnpm store add` for offline installs from downloaded tarballs. Repeat installs and `verifyDepsBeforeRun` no longer read the `package.json` of unchanged workspace projects. The release fixes several peer dependency resolution bugs too.
##### Minor Changes
##### Agent skills
- pnpm now names the link to a dependency's agent skill after the skill alone. A skill that the `@acme/kit` package ships in `skills/auth/` is linked as `.claude/skills/auth`, not `.claude/skills/pnpm-@acme+kit-auth`. The next install replaces links with the old names. pnpm lists the linked skills in a `# pnpm` block of each agent skill directory's `.gitignore` [#​17455](https://github.com/pnpm/pnpm/discussions/17455).
When two approved packages ship a skill of the same name, or the name is already taken in an agent skill directory, pnpm links the skill as `pnpm-<package>-<skill>`. Before, the install failed.
- `pnpm approve` now asks which agent skills to link when a package ships more than one. pnpm records the chosen skills as a list, such as `permissions.<pkg>.skills: [guide, migrate]`, and does not offer the other skills for approval again. The first time a project approves a skill, `pnpm approve` also asks which agent directories to link skills into, and records the answer under `skills.dirs`.
- pnpm links agent skills nested in category directories, such as `skills/engineering/implement/SKILL.md`, up to three levels below `skills/`. Before, it linked only the skills directly under `skills/`.
##### Platform variants
These features need a registry declared with `serverType: pnpr`.
- `pnpm pack` packs one archive per entry of `publishConfig.variants`, each platform variant as `<name>-<version>~<tag>.tgz`. `pnpm pack --variant <target>` packs only the archive whose entry lists that target. `pnpm pack --json` prints the `integrity` and `size` of every archive it writes.
- `pnpm publish` publishes a package's `publishConfig.variants`. pnpm uploads every archive before the publish request that references them. Publishing variants to any other registry is refused unless `--no-variants` is given, which publishes only the archive that targets `any`.
- `pnpm publish --upload-variant <target>` uploads the archive of one `publishConfig.variants` entry to the registry's staging area and prints `<target>=<integrity>`. `pnpm publish --variant-integrity <target>=<integrity>` then publishes the version from archives that other jobs uploaded. With `--recursive`, each value names its package as `<name>~<target>=<integrity>`.
- `pnpm publish -r --batch` now uploads each package archive on its own request and skips archives the registry already holds, so the batch request no longer grows with the archives it publishes. A batch of more than 256 packages still carries every archive inline. Packages with `publishConfig.variants` can be published in a batch. A batch with variants that would reference more than 256 archives on one registry fails with `ERR_PNPM_BATCH_PUBLISH_TOO_MANY_ARCHIVES` [pnpm/tasks#244](https://github.com/pnpm/tasks/issues/244).
- `pnpm publish --provenance` signs one statement that names every archive of a version with `publishConfig.variants`. A platform variant's archive is named by the version's package URL with a `variant` qualifier.
- Rerunning `pnpm publish` after the version was already published now succeeds when the published version is the same release. pnpm compares the archives, the provenance statement when the rerun signs one, and the dist-tag. When the published version differs, the publish fails with `ERR_PNPM_PUBLISHED_RELEASE_DIFFERS`, which names what differs.
- pnpm installs the platform variant of a package that fits the host, or the package's own archive when none does. The lockfile records every variant. A version published with variants only, and no archive for other hosts, installs on a host one of the variants fits. On any other host, an optional dependency is skipped, and any other dependency fails with an error that lists the platforms the version is published for.
- `supportedArchitectures` platform lists accept platform tags, the same tags `publishConfig.variants` entries name. An entry can state floors and an ABI, such as `linux-x64-manylinux_2_28`, `darwin-arm64-macos_14_0`, `linux-x64-napi8` or `linux-x64-node127`, and any Node.js OS and CPU, such as `freebsd-x64`. The spellings accepted before still work.
- With `supportedArchitectures` set, pnpm also fetches into the store the variants that the other listed platforms need, when it downloads a package with platform variants.
##### pnpr registries
- pnpm downloads less metadata from a registry declared with `serverType: pnpr`. A large package document leaves out the manifests of rarely picked versions, and pnpm fetches one only when it picks that version. In a benchmark that resolves 787 packages, the package documents shrank from 30.3 MB to 2.5 MB gzipped. pnpm caches these documents in `v12/metadata-pnpr`, and the `pnpm cache` commands cover them.
pnpm warns when a registry that is not declared `serverType: pnpr` turns out to be pnpr. For a registry declared `serverType: pnpr`, a `minimumReleaseAge` longer than 30 days fails with `ERR_PNPM_UNSUPPORTED_MINIMUM_RELEASE_AGE`.
- `pnpm publish` sends release notes to registries declared with `serverType: pnpr`. A package's notes are the section for its version in `CHANGELOG.md`, or the notes that `pnpm version -r` composed from change intents. `--release-notes <file>` gives the notes from a file, and `--no-release-notes` sends none. `--publication-name` names a release published with `--batch`.
In a workspace that uses pnpm's versioning, `pnpm version -r --release-notes <file>` puts a summary above the composed notes of the release.
`pnpm view <pkg>@<version> releaseNotes`, `pnpm outdated --notes`, and `pnpm update --interactive` show the release notes from these registries.
##### Store and hooks
- `pnpm store add` now prepares the store for offline installs from package tarballs downloaded some other way. After `pnpm store add ./tarballs/*.tgz`, `pnpm install --offline --frozen-lockfile` installs each registry package whose lockfile entry pins one of those tarballs [#​2978](https://github.com/pnpm/pnpm/issues/2978).
- Custom pnpmfile fetchers can use `fetchers.gitHostedTarball`, `fetchers.git`, and `fetchers.binary` [pnpm/tasks#191](https://github.com/pnpm/tasks/issues/191).
##### Patch Changes
##### Installing packages
- Running `node` or `pnpm install` in a project that pins a Node.js version pnpm has not downloaded yet no longer hangs when a `globalPnpmfile` is configured [#​17530](https://github.com/pnpm/pnpm/issues/17530).
- `pnpm install` with `enableGlobalVirtualStore` no longer fails on Windows for a dependency from a named registry, such as `gh:` or `npmjs:` [#​17665](https://github.com/pnpm/pnpm/issues/17665).
- Concurrent installs that share a global virtual store no longer fail with `ERR_PNPM_CMD_SHIM_SYMLINK_BIN` when they link the same executable at the same time [#​17587](https://github.com/pnpm/pnpm/issues/17587).
- `pnpm install` and `pnpm ci` now succeed when dependency skills are approved but no agent skill directory exists. The skills stay unlinked until a directory exists [#​17574](https://github.com/pnpm/pnpm/issues/17574).
- Commands run from a workspace package now use the same default store as the workspace root. Before, `pnpm add` in a package could fail with `ERR_PNPM_UNEXPECTED_STORE` when the workspace root was its own mount point and the home store was on another volume, as in a sandbox or a container.
A workspace installed with the old behavior may need one `pnpm install --force` from the workspace root.
- `pnpm deploy` now keeps a symlink in the project whose target is missing from the source, such as a link into a `node_modules` directory that was removed after the build. Deploy used to drop such a link silently [#​17571](https://github.com/pnpm/pnpm/issues/17571).
- `pnpm install` now links the runtime that an earlier `pnpm install --no-runtime` skipped, and `pnpm install --no-runtime` removes a runtime that an earlier install linked [#​17542](https://github.com/pnpm/pnpm/issues/17542).
- With `enableGlobalVirtualStore`, `pnpm install` again runs a dependency's build scripts in a project whose global virtual store slot another project already built, unless the side-effects cache has build output to restore for it. A build that writes only outside its own package, such as a git hook installer, now takes effect in every project [#​17526](https://github.com/pnpm/pnpm/issues/17526).
- Commands of a package whose `bin` paths contain excess parent directory segments, such as `../dist/cli.js`, are no longer missing. Such paths now resolve inside the package [#​17586](https://github.com/pnpm/pnpm/issues/17586).
- Generated POSIX shell shims now quote their paths, so shell special characters in a path stay literal.
##### Lockfile and local paths
- Packages from the default registry keep plain lockfile keys, even when a prefix such as `npmjs` points at the registry set as `registry`. A dependency written with such a prefix shares the plain entry of the same package. The next install rewrites keys that earlier versions qualified this way [#​17575](https://github.com/pnpm/pnpm/issues/17575).
- `pnpm install --frozen-lockfile`, `pnpm approve-builds`, and `pnpm rebuild` now accept a lockfile that resolves a `*` dependency to a prerelease `latest` version. pnpm wrote such a lockfile and then reported it as outdated [#​17594](https://github.com/pnpm/pnpm/issues/17594).
- `pnpm install --frozen-lockfile` now accepts a lockfile written with `excludeLinksFromLockfile` and `linkWorkspacePackages` on, when a project depends on a workspace package through a `catalog:` entry. It used to fail with `ERR_PNPM_OUTDATED_LOCKFILE`.
- `pnpm install --frozen-lockfile` no longer rejects a freshly generated lockfile when `addMissingPeerTypes` is enabled and an injected workspace package has peer dependencies [#​17668](https://github.com/pnpm/pnpm/issues/17668).
- Relative local paths in root `overrides` now resolve from the workspace root when each project has its own lockfile [#​17691](https://github.com/pnpm/pnpm/issues/17691).
Installing a local directory dependency no longer fails when another project's install is writing a lockfile in that directory.
- Relative local paths in root catalogs now resolve for dependencies and peers [#​17690](https://github.com/pnpm/pnpm/issues/17690).
- `pnpm install` now resolves auto-installed relative `workspace:` and `file:` peers from the directory of the package that declares them [#​17676](https://github.com/pnpm/pnpm/issues/17676), [#​17689](https://github.com/pnpm/pnpm/issues/17689).
- `pnpm dedupe --check` leaves `pnpm-lock.yaml` untouched while it looks for deduplication changes. If `configDependencies` changed since the last install, the check keeps the lockfile they sync, as `pnpm install` does [#​17628](https://github.com/pnpm/pnpm/issues/17628).
- `pnpm dedupe --check` no longer fails when the only difference is the integrity of a locked version that the registry now reports with a stronger algorithm, such as a `sha512` integrity replacing the `sha1` shasum it reported when the lockfile was written [#​17692](https://github.com/pnpm/pnpm/issues/17692).
##### Peer dependencies
- Peer deduplication no longer gives a project different copies of a dependency across direct and transitive paths when an optional peer has no provider [#​17666](https://github.com/pnpm/pnpm/issues/17666).
- Dependencies no longer bind to another project's peer variant when the provider has nested peers, including providers that finish resolving later [#​17593](https://github.com/pnpm/pnpm/issues/17593).
- Re-resolving a lockfile no longer preserves optional peer bindings from other projects when no provider is in scope [#​17592](https://github.com/pnpm/pnpm/issues/17592).
- `pnpm peers check` warns when a required peer is resolved without a provider declared by the project or its dependency ancestors, with `autoInstallPeers: false` and `dedupePeerDependents: true`. These warnings do not change the command's exit code or cause `strictPeerDependencies` failures.
##### Speed and memory
- `pnpm install`, and `pnpm run` and `pnpm exec` with `verifyDepsBeforeRun`, no longer read the `package.json` of workspace projects whose files did not change since the last install. This also holds with a pnpmfile, `configDependencies`, or `sharedWorkspaceLockfile: false`. In an up-to-date workspace with `sharedWorkspaceLockfile: false`, `pnpm install` no longer runs the install of each project [pnpm/tasks#256](https://github.com/pnpm/tasks/issues/256).
- A recursive `pnpm run` or `pnpm exec` with `verifyDepsBeforeRun` set no longer reads every `package.json` in the workspace once per project when `sharedWorkspaceLockfile` is `false`. In a 300-project workspace, `pnpm -r exec true` went from 490 ms to 42 ms [pnpm/tasks#256](https://github.com/pnpm/tasks/issues/256).
- `pnpm install` makes fewer `stat` calls when it hardlinks files from the store, as few as 12.7.0 made [#​17543](https://github.com/pnpm/pnpm/issues/17543).
- Picking versions from registry metadata uses less temporary memory.
##### verifyDepsBeforeRun and repeat installs
- With `verifyDepsBeforeRun`, `pnpm run` and `pnpm exec` now report dependencies as out of date after a dependency is added to the `package.json` of a local directory dependency, such as `"lib": "file:../lib"`. Before, the command ran without the new dependency installed.
- `verifyDepsBeforeRun` no longer reports a `file:` directory dependency as out of date after an edit to `package.json` that leaves its dependencies unchanged [#​17697](https://github.com/pnpm/pnpm/issues/17697).
- `verifyDepsBeforeRun` no longer reports dependencies as out of sync when only the `version` field of a single-project repository changed [#​17560](https://github.com/pnpm/pnpm/issues/17560). The same holds for a workspace project that no dependency can resolve to. A script run after such a change no longer starts an install first.
- A repeat `pnpm install` now rewrites the bin shims after `extendNodePath` changes. Before, it reported "Already up to date" and the shims kept the `NODE_PATH` of the previous setting.
##### Adding and updating dependencies
- `pnpm add <pkg>` without a version now saves the range that the other workspace projects declare for the package, or the one a matching override sets. A `catalog:` reference still comes first, and the `tag` setting is used only when none of these exists [pnpm/tasks#191](https://github.com/pnpm/tasks/issues/191).
- `pnpm update` with only negated selectors, such as `pnpm update '!foo'`, now leaves the dependencies listed in `update.ignoreDeps` unchanged. Negated `crate:` and `pypi:` selectors, such as `!crate:sha2`, now exclude that dependency and update the rest [pnpm/tasks#243](https://github.com/pnpm/tasks/issues/243).
- `pnpm update --latest` keeps three kinds of Cargo dependencies where they are, unless the crate is named on the command line. Before, it moved each one to the newest release and left a workspace that did not build.
- A renamed dependency, such as `tower-0-4 = { package = "tower", version = "0.4" }`, stays within its requirement if the workspace also declares the crate under its own name.
- A crate replaced through `[patch.crates-io]` keeps its version, with a warning.
- A crate whose newest release is older than its current version, such as a prerelease newer than the latest stable release, keeps its version, with a warning. Only an explicit version, such as `pnpm update crate:foo@1`, moves it back.
Other new major versions are still selected and may need code changes.
- `pnpm update` now keeps a Cargo dependency at its current version, with a warning, if the new version lacks a feature the workspace enables on it. If the crate is named on the command line, as in `pnpm update --latest crate:sha2`, the update fails with an error that names the missing features.
- `pnpm update` now keeps the operator of every existing Cargo requirement, so `~1.0.0` is updated to `~1.1.0`, and an exact `=` requirement stays exact unless the selector gives a range, such as `crate:foo@^2`. The `savePrefix` and `saveExact` settings apply only to new Cargo dependencies. Saved Cargo requirements omit build metadata.
- `pnpm update` now updates a Cargo dependency whose inline table spans several lines, such as one with a multi-line `features` array. It failed with "its Cargo.toml dependency declaration is not a string or single-line inline table".
- `pnpm update` no longer applies the `savePrefix` and `saveExact` settings to Python requirements. A `savePrefix` such as `^` made `pnpm update` fail in a project with Python dependencies.
`pnpm update` now keeps the precision of a `~=` requirement, so `~=1.0` is updated to `~=1.5` and still allows any 1.x release. With `--latest`, a `==1.*` requirement is updated to `==2.*`.
##### Store
- `pnpm store prune` now keeps packages linked from a configured modules directory [pnpm/tasks#230](https://github.com/pnpm/tasks/issues/230).
- `pnpm store prune` now removes aliases of pruned packages.
- `pnpm store status` no longer reports untouched packages as modified when the global virtual store is enabled. If the installed global-store layout cannot be verified, the command reports `ERR_PNPM_STORE_STATUS_UNVERIFIABLE` and asks for a reinstall [#​17631](https://github.com/pnpm/pnpm/issues/17631).
- `pnpm store add` now fails with `ERR_PNPM_FROZEN_STORE_WRITE` when `frozenStore` is enabled. It used to write package files into the read-only store without recording them, so no install could use them.
- `pnpm cat-index <name>@<version>` no longer shows the index of a package whose name differs only in letter case.
##### Other commands and settings
- `pnpm link` now fails without changing `package.json` or `pnpm-workspace.yaml` when the linked package's name is not a valid npm package name. It used to write that name to both files, which made every later install fail [#​17475](https://github.com/pnpm/pnpm/issues/17475).
- `pnpm link <dir>` now resolves a relative `<dir>` against the current directory. In a directory without a `package.json`, such as a workspace's `packages` folder, `pnpm link .` used to link the nearest project above it into itself [#​17475](https://github.com/pnpm/pnpm/issues/17475).
- A Node.js version range such as `>=26.13`, for example in `devEngines.runtime`, now resolves to the newest stable release that satisfies it. pnpm picks a prerelease only when no stable release matches [#​17516](https://github.com/pnpm/pnpm/issues/17516).
- Switching to the pnpm version a project pins no longer writes a temporary `_tmp_*` file into the project directory, which file watchers reported on every command [#​17681](https://github.com/pnpm/pnpm/issues/17681).
- pnpm now reads the `linkWorkspacePackages`, `injectWorkspacePackages`, `extendNodePath`, `frozenStore`, and `optimisticRepeatInstall` settings from `PNPM_CONFIG_*` environment variables, such as `PNPM_CONFIG_LINK_WORKSPACE_PACKAGES=true`. `--config.extend-node-path` now applies too.
- Recursive scripts run with `--sequential` or `--workspace-concurrency=1` print GitHub Actions log groups again [#​17629](https://github.com/pnpm/pnpm/issues/17629).
- When `pnpm docs` cannot open a browser, the URL it prints no longer includes the query string or the fragment.
<!-- sponsors -->
#### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
</td>
<td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://www.cloudflare.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/cloudflare.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/cloudflare_light.svg" />
<img src="https://pnpm.io/img/users/cloudflare.svg" width="160" alt="Cloudflare" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
#### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
</td>
<td align="center" valign="middle">
<a href="https://syntax.fm/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/syntaxfm.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/syntaxfm_light.svg" />
<img src="https://pnpm.io/img/users/syntaxfm.svg" width="90" alt="Syntax" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
<!-- sponsors end -->
### [`v12.17.0`](https://github.com/pnpm/pnpm/releases/tag/v12.17.0): pnpm 12.17
[Compare Source](https://github.com/pnpm/pnpm/compare/v12.16.1...v12.17.0)
pnpm 12.17.0 adds `pnpm peers check --global`, dependency-group selectors and wildcards in `overrides`, and runtime, package manager, Cargo, and Python updates in `pnpm outdated` and `pnpm update`. It also fixes files that other users could not read in Docker images, and repeat installs that missed changes to local dependencies.
##### Minor Changes
- `pnpm peers check` now accepts `--global` (`-g`) to check globally installed packages. After a global install or update, the peer dependency warning now suggests `pnpm peers check -g` [#​17504](https://github.com/pnpm/pnpm/issues/17504).
- `pnpm outdated` and `pnpm update` now inspect and update package manager and runtime versions in `devEngines.packageManager`, `packageManager`, `devEngines.runtime`, `engines.runtime`, and `runtime:` dependencies. With `cargo.enabled` or `python.enabled`, `pnpm outdated` and `pnpm update` also inspect and update Cargo dependencies in `Cargo.toml` and `Cargo.lock` and Python dependencies in `pyproject.toml` and `pylock.toml`.
- `overrides` selectors now support `:prod`, `:optional`, and `:peer` pseudo-selectors that target a single dependency group. They also support `*` wildcard patterns on parent and target package names. An override with a non-range value, such as `npm:` or `file:`, no longer adds a peer dependency to `dependencies`. Removing an optional dependency with `"-"` now also removes the duplicate entry from `dependencies` [#​5391](https://github.com/pnpm/pnpm/issues/5391).
##### Patch Changes
##### Installing packages
- Files that pnpm creates in a project now get the permissions the umask gives any new file, such as `0644`. Before, several of them were readable only by the user who ran pnpm, which broke Docker images that run as a different user [#​17435](https://github.com/orgs/pnpm/discussions/17435).
The fix applies to:
- `node_modules/.pnpm-workspace-state-v1.json`. A different user running `pnpm run` reinstalled the dependencies because it could not read this file.
- `pnpm-workspace.yaml`
- the files written by `pnpm deploy`
- patch files from `pnpm patch-commit`
- the lockfile restored by `pnpm dedupe --check`
- the Cargo and Python files that pnpm writes
When pnpm edits an existing file, the file keeps its permissions.
- `pnpm install` no longer writes broken dependency links when the project's `node_modules` is a symlink to another directory, such as another project's `node_modules`. The install reported success, but the links it wrote did not resolve [#​17448](https://github.com/pnpm/pnpm/issues/17448).
- Commands installed with `pnpm add --global` now find the dependencies that pnpm hoists for their package. A package that loads a dependency it does not declare, such as a native addon's platform-specific package, failed with "Cannot find module". Reinstall such a package with `pnpm add --global` to update its existing command [#​17503](https://github.com/pnpm/pnpm/issues/17503).
- When pnpm switches to the version a project pins, it now installs that version's native binary for the current host, even if the project's `supportedArchitectures` excludes the host. Before, pnpm could not use the pinned version and kept running the installed one. pnpm also repairs a pinned version that an earlier install left without the host's binary.
- With the global virtual store, a change to a dependency of one package in a dependency cycle now gives every package in that cycle a new directory. Before, the other packages kept their directories and still linked the old copy of the changed package, so the project could load two copies of it [#​17466](https://github.com/pnpm/pnpm/issues/17466).
Packages in a dependency cycle, and packages that depend on one, move to new global virtual store directories once after this update. Those that run a build miss the side-effects cache once.
- With `nodeLinker: hoisted`, when two workspace projects need the same package version and it cannot be hoisted to the root, each project now keeps the copy installed in its own `node_modules`. Build scripts run in each of these copies. Before, the second project's copy was replaced with a symlink to the first project's, so every repeat install imported it again [#​17498](https://github.com/pnpm/pnpm/issues/17498).
- The Node.js `latest` selector now chooses the newest stable release [#​17490](https://github.com/pnpm/pnpm/issues/17490).
- Hardlinking from the store now stats each store file once per install. Since pnpm 12.8.0, a store file was stat'ed again for every package that links it. On an offline install of a large workspace, that added up to 15% system CPU [#​17500](https://github.com/pnpm/pnpm/issues/17500).
##### Repeat installs and local dependencies
- `pnpm install --frozen-lockfile` no longer reports an outdated lockfile right after the install that wrote it. This happened when a pnpmfile `readPackage` hook or `packageExtensions` changed the dependencies or peer dependencies of a local directory dependency outside the workspace projects. It affected a `file:` dependency, an injected `workspace:../dir` dependency outside the workspace patterns, and an injected workspace package left out by `--filter` [#​17447](https://github.com/pnpm/pnpm/issues/17447) [#​17473](https://github.com/pnpm/pnpm/issues/17473).
A repeat `pnpm install` now takes the fast path when `ignoredOptionalDependencies` removes an optional dependency of a `file:` directory dependency. It used to resolve again on every run.
- `pnpm install` now resolves again after an edit to an injected `workspace:../dir` dependency outside the workspace patterns under a shared lockfile. It used to keep the lockfile unchanged. The next `pnpm install --frozen-lockfile` then failed [#​17476](https://github.com/pnpm/pnpm/issues/17476).
- `pnpm install` now resolves a local directory again after its `package.json` changes when an override or a package extension adds it to the dependencies of a registry package. `pnpm install --frozen-lockfile` fails on a lockfile that still records the old dependencies of such a directory [#​17486](https://github.com/pnpm/pnpm/issues/17486).
- With `injectWorkspacePackages` and per-project lockfiles, `pnpm install` now updates a project's lockfile when a local tarball that an injected workspace project depends on is replaced. The project's lockfile kept the old version and integrity before.
- `pnpm install` now detects a change to a local tarball or directory that only a pnpmfile `readPackage` hook depends on. A repeat install reported "Already up to date" and kept the old contents before [pnpm/tasks#227](https://github.com/pnpm/tasks/issues/227).
- `pnpm install` now relinks a `workspace:` or `link:` dependency whose link was deleted from `node_modules`. It used to report "Already up to date" and leave the link missing [#​17485](https://github.com/pnpm/pnpm/issues/17485).
- A repeat `pnpm install` reports "Already up to date" again when a pnpmfile `readPackage` hook changes the dependencies of a workspace project. Since 12.15.0, every such install ran in full [#​17468](https://github.com/pnpm/pnpm/issues/17468).
After an edit to a project's `package.json`, `pnpm install` and `verifyDepsBeforeRun` now run the pnpmfile's `readPackage` hook on the edited manifest before comparing it with the lockfile. They could report the project up to date when the hook rewrote the edited dependency to a specifier the lockfile did not record.
##### Adding and updating dependencies
- `pnpm update --latest` with package selectors now updates the dependencies of the selected packages within their declared ranges. Excluded packages and their dependencies keep their locked versions [#​17444](https://github.com/pnpm/pnpm/issues/17444).
- `pnpm add <pkg>@<tag>` now uses a catalog entry set to that same dist-tag. The dependency is saved as `catalog:` and the entry stays as written [pnpm/tasks#225](https://github.com/pnpm/tasks/issues/225).
When `pnpm add` adds a new dist-tag such as `vue@legacy` to a catalog, the catalog entry records the exact version the tag points to. The same applies to a dependency added without a version when the `tag` setting names a dist-tag other than `latest`.
- `pnpm add` now saves the resolved version range of an npm alias. For example, `pnpm add v2@npm:vue` and `pnpm add v2@npm:vue@^3.0.0` both save `npm:vue@^3.5.13`.
##### Running scripts and commands
- Programs that a script or `pnpm exec` command leaves running, such as a browser opened by the `open` package, now outlive pnpm exactly when they would outlive the command run without pnpm. Before, on Windows, a failed command, `Ctrl+C`, or a closed terminal ended all of them. pnpm still ends them when it is killed or crashes.
When a recursive or parallel run bails, the scripts still running now receive `SIGTERM` on Unix and are killed only if they are still running two seconds later. On Windows, everything those scripts started is ended, including detached processes whose parent has already exited. Before, a bail killed them at once [#​17465](https://github.com/pnpm/pnpm/issues/17465).
- On Windows, the shell shim of a `.cmd` or `.bat` bin now runs it under Git Bash when MSYS argument conversion is off, such as with `MSYS_NO_PATHCONV=1` or `MSYS2_ARG_CONV_EXCL='*'`. The shim used to start an interactive cmd.exe prompt [#​17480](https://github.com/pnpm/pnpm/issues/17480).
- `pnx` and `pnpm create` now run the command in the directory selected by `--dir` or `--workspace-root`. Without either flag, the command still runs in the directory pnpm was started in.
- `pnpm --env-file` now reads files the way `node --env-file` does. Values are taken as written, so `$VAR` is no longer expanded and Windows paths such as `C:\Users\me` load unchanged. A file is no longer rejected for its contents.
##### Settings and messages
- `pnpm version` no longer creates a git commit and tag when `gitTagVersion` is set to `false` [#​17460](https://github.com/pnpm/pnpm/issues/17460).
- `pnpm publish` now reads the `publishBranch` setting from `pnpm-workspace.yaml` and from `PNPM_CONFIG_PUBLISH_BRANCH`. The `--publish-branch` flag overrides it.
- `pnpm` now accepts `--strict-ssl` and `--local-address <ip>` on the command line.
- `pnpm doctor` uses a 15-second timeout when checking registry connectivity.
- `pnpm-workspace.yaml` parse errors now report `ERR_PNPM_INVALID_SETTING`.
- The error for a dependency with an invalid name in a project's manifest now names the project's directory. It used to say only "The current package", which did not tell which workspace project to fix [#​17475](https://github.com/pnpm/pnpm/issues/17475).
<!-- sponsors -->
#### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
</td>
<td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://www.cloudflare.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/cloudflare.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/cloudflare_light.svg" />
<img src="https://pnpm.io/img/users/cloudflare.svg" width="160" alt="Cloudflare" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
#### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
</td>
<td align="center" valign="middle">
<a href="https://syntax.fm/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/syntaxfm.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/syntaxfm_light.svg" />
<img src="https://pnpm.io/img/users/syntaxfm.svg" width="90" alt="Syntax" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
<!-- sponsors end -->
### [`v12.16.1`](https://github.com/pnpm/pnpm/releases/tag/v12.16.1): pnpm 12.16.1
[Compare Source](https://github.com/pnpm/pnpm/compare/v12.16.0...v12.16.1)
This release fixes `pnpm install` hanging on a cold store in workspaces that install Cargo crates, and `pnpm pack` shipping a file that `files` excludes by name.
##### Patch Changes
- `pnpm install` no longer hangs on a cold store in a workspace that also installs Cargo crates or a Rust toolchain.
- `pnpm pack` and `pnpm publish` now apply a `files` entry that names a file after the glob and directory entries, as npm does. A file excluded by name, such as `!dist/index.js`, stays out even when a later `dist/**` matches it. A file named by its path, such as `lib/secret.js`, ships even when a later `!lib/*.js` matches it.
- `pnpm install` no longer leaves a broken symlink in an injected workspace dependency when the package links to a file outside its published files and pnpm imports by hardlink. Installing a git dependency now skips internal directory symlinks when importing its files into the store.
- `pnpm install` now relinks a command that a workspace project renames into the projects that depend on it when `sharedWorkspaceLockfile` is `false` [pnpm/tasks#224](https://github.com/pnpm/tasks/issues/224).
- `pnpm install` and `pnpm rebuild` now refresh privately hoisted `.bin` shims in `node_modules/.pnpm/node_modules/.bin` after a dependency build replaces a script target with a native executable [#​17402](https://github.com/pnpm/pnpm/issues/17402).
- `pnpm install` now reads a package's manifest to decide its peer dependencies when it updates an existing lockfile, as it does when it resolves from scratch.
- Commands, `pnpm --version`, `pnpm self-update`, and invocations with unknown flags now apply the same `packageManager` and `devEngines.packageManager` settings when switching to the pinned pnpm version or recording it in `pnpm-lock.yaml`. `--config.<key>` flags and `lockfileDir` now reach the version switch and lockfile sync on every entry point. Unreadable settings in `pnpm-workspace.yaml` or the global `config.yaml` that do not affect the pin decision no longer block the version switch [pnpm/tasks#222](https://github.com/pnpm/tasks/issues/222).
- pnpm now accepts the `--cache-dir <dir>` flag, as in `pnpm install --cache-dir /tmp/pnpm-cache` [#​17422](https://github.com/pnpm/pnpm/issues/17422).
- When the version or range given to `pnpm unpublish` matches every published version, the error now says so and shows the same command with `--force`. Before, the error suggested running `pnpm unpublish <pkg>@<version>`, the command that had just failed.
<!-- sponsors -->
#### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
</td>
<td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
#### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
</td>
</tr>
</tbody>
</table>
<!-- sponsors end -->
### [`v12.16.0`](https://github.com/pnpm/pnpm/releases/tag/v12.16.0): pnpm 12.16
[Compare Source](https://github.com/pnpm/pnpm/compare/v12.15.0...v12.16.0)
This release adds a global `--env-file` flag, updates to a symlinked `pnpm-lock.yaml`, and `pnpm setup --no-modify-path`. It also fixes two security issues, in zstd decompression and in signing.
##### Minor Changes
- Added a repeatable global `--env-file <path>` flag to load environment variables from dotenv-style files before running a command. Later files override earlier files, variables already in the environment are preserved, and loaded variables are visible to user-level `.npmrc` interpolation and lifecycle scripts [#​7111](https://github.com/pnpm/pnpm/issues/7111).
- pnpm can now update a `pnpm-lock.yaml` that is a symlink. List the directories the lockfile may link into in the `symlinkedLockfileTargetDirs` setting, in the global config or with `PNPM_CONFIG_SYMLINKED_LOCKFILE_TARGET_DIRS`. pnpm writes the update to the file the symlink points to if that file is inside one of these directories. The symlink stays in place. pnpm ignores this setting in `pnpm-workspace.yaml` [#​17222](https://github.com/pnpm/pnpm/issues/17222).
- Added a `--no-modify-path` option to `pnpm setup`. It installs pnpm without adding it to `PATH`, leaving the shell config file, the Windows registry, and the GitHub Actions environment files unchanged. `pnpm setup` then prints the lines to add yourself [get.pnpm.io#37](https://github.com/pnpm/get.pnpm.io/issues/37).
##### Patch Changes
##### Security
- Fixed memory exposure and allocation handling vulnerabilities when processing zstd-compressed data [#​17388](https://github.com/pnpm/pnpm/pull/17388).
- Signing in pnpm and pnpr no longer uses arithmetic that may leak the private key through timing. This covers shared artifacts, OCI registry tokens, and OIDC login state [advisory](https://rustsec.org/advisories/RUSTSEC-2026-0387).
##### Installing packages
- A dependency symlink that pnpm cannot point at the wanted target now fails the install with an error that names the link. This happens when the filesystem still serves the old link after pnpm removed it, as a `node_modules` served by a virtual filesystem does. pnpm used to remove the link again without end and crashed with a segmentation fault once the thread ran out of stack.
- Concurrent workspace installs no longer lose store-index rows when initializing the shared SQLite index [#​17388](https://github.com/pnpm/pnpm/pull/17388).
- Agent skill links now keep the same target across installs when a package version is installed with several sets of peer dependencies. An install no longer fails with `ERR_PNPM_AGENT_SKILL_PATH_OCCUPIED` on a skill link that pnpm created for another of those copies [#​17319](https://github.com/pnpm/pnpm/issues/17319).
- pnpm now fails at once, without retrying, when a downloaded package archive contains a rejected entry path [#​17205](https://github.com/pnpm/pnpm/issues/17205).
- pnpm now builds a git-hosted dependency in every new location it links the dependency into, such as a new global virtual store slot or a fresh `node_modules`. When the side-effects cache holds the build output, pnpm restores it from there. Before, only the install that fetched the dependency built it. This also fixes dependencies that are already in the store [#​17224](https://github.com/pnpm/pnpm/issues/17224).
- Changes a `preResolution` hook makes to the lockfiles now take effect. The hook now also runs when pnpm installs from an up-to-date lockfile. An error thrown by the hook now fails the install.
- A custom fetcher in the pnpmfile can now call `fetchers.directory` to fetch a package from a local directory. The call rejects with `ERR_PNPM_TARBALL_INTEGRITY` if the lockfile pins an archive integrity for the package. Previously, calling `fetchers.directory` failed with a `TypeError`.
- `packageImportMethod: copy` now also applies to packages that have lifecycle scripts or patches. On a filesystem that supports block cloning, such as ReFS or a Dev Drive on Windows, these packages were cloned [#​17195](https://github.com/pnpm/pnpm/issues/17195).
- With `nodeLinker: hoisted` and `autoInstallPeers: false`, a package that workspace projects use with different peer versions is now installed once per peer variant, so each project's copy resolves that project's peer [#​17395](https://github.com/pnpm/pnpm/issues/17395).
- Under `nodeLinker: hoisted`, `pnpm install` now leaves a patched package that is already in place alone. The same holds for a package whose peers include a patched package, such as every package peering on a patched `react-native` [#​17188](https://github.com/pnpm/pnpm/issues/17188).
- With `nodeLinker: hoisted`, an install that stops partway no longer leaves the next install trusting the packages it was replacing. Before, reverting the change that started the stopped install, such as a patch edit, kept the half-replaced package in `node_modules`.
##### Repeat installs and changed settings
- A repeat `pnpm install` now acts on a change to these settings. Before, it reported "Already up to date".
- `storeDir` or `virtualStoreDir`: it recreates `node_modules`.
- `globalVirtualStoreDir`: it links the packages from the new directory.
- `virtualStoreDirMaxLength`: it renames the virtual store directories.
- `dangerouslyAllowAllBuilds` turned on: it runs the builds it skipped.
- `trustLockfile` turned off: it verifies the lockfile.
- `pnpm add`, `pnpm remove`, and `pnpm update` now fail if `node_modules` does not match the current settings. Run `pnpm install` to recreate it. Previously, these commands removed and reinstalled `node_modules` without asking. They report:
- `ERR_PNPM_UNEXPECTED_STORE` if `node_modules` was linked from a different store.
- `ERR_PNPM_UNEXPECTED_VIRTUAL_STORE` if it was linked from a different virtual store directory.
- `ERR_PNPM_MODULES_BREAKING_CHANGE` if it was installed by an incompatible pnpm version, or if `node_modules/.modules.yaml` cannot be read.
- `ERR_PNPM_NODE_LINKER_DIFF` if it was installed with a different `nodeLinker`.
`pnpm update` now also fails with `ERR_PNPM_HOIST_PATTERN_DIFF` and the other errors `pnpm add` reports for a changed hoist pattern or `virtualStoreDirMaxLength`.
- An install filtered to some workspace projects now fails if `node_modules` was installed with a different `nodeLinker`, `hoistPattern`, `publicHoistPattern`, store, or virtual store. Before, it recreated `node_modules` and left the projects it skipped without their dependencies. A `pnpm install` of the whole workspace still recreates `node_modules` [pnpm/tasks#217](https://github.com/pnpm/tasks/issues/217).
- `pnpm install` and the `verifyDepsBeforeRun` check now notice an edited patch file when `sharedWorkspaceLockfile` is `false`.
- `pnpm install` now takes its fast path in a workspace with `patchedDependencies` when the previous install ran with another major version of pnpm.
- `pnpm install` now relinks the bins of a workspace package when its `bin` field changes, including with `--frozen-lockfile` and an unchanged lockfile. A filtered install relinks them in the selected projects, and the next install that covers the remaining projects relinks them there [#​17324](https://github.com/pnpm/pnpm/issues/17324).
- `pnpm install` now removes command shims from `node_modules/.bin` when a workspace dependency renames or removes an entry from its `bin` field [pnpm/tasks#211](https://github.com/pnpm/tasks/issues/211).
##### Resolving dependencies and the lockfile
- A package that a plain range and a `<prefix>:` specifier both resolve from one registry is now recorded once in `pnpm-lock.yaml` and installed once. The lockfile key names the registry a package resolved from. When that registry declares a prefix, through `prefix` in `registries` or through `namedRegistries`, the package is keyed `<name>@<prefix>:<version>` however its dependency was written: with the prefix, as a plain range its scope routes to that registry, or through the default registry. Before, the plain range was keyed `<name>@<version>`, so one tarball was installed twice and `instanceof` checks and module singletons broke between the two copies. The same name and version served by two registries still get separate entries. When several prefixes declare one registry, its packages are keyed by the lexicographically smallest prefix.
If a scope you route reaches a registry that also declares a prefix, your next `pnpm install` re-keys those entries, which shows up as a lockfile diff. Commit it. `pnpm install --frozen-lockfile` installs the lockfile as recorded.
- `pnpm install` now resolves a scope's packages again when the scope is routed to another registry in `registries`. Before, the lockfile kept the versions and integrity resolved from the old registry, so the install failed when the new registry did not serve a locked version or served different content. pnpm records in the workspace state which registry each scope routed to, so a fresh clone without that record installs the lockfile as recorded. Changing the default registry resolves nothing again, and `pnpm install --frozen-lockfile` is unchanged.
- When `autoDedupe` is off, a workspace project's dependencies now resolve from its own ranges, like they do with `sharedWorkspaceLockfile: false`. Previously, another project's narrower range could hold them back. For example, `ajv: "*"` now resolves to the latest Ajv even if another project depends on `ajv@^6`. Packages that a project lists in `peerDependencies` still follow the versions other projects use. `pnpm dedupe` and installs with `autoDedupe: true` still pick one version that satisfies every range. Set `autoDedupe: true` if CI runs `pnpm dedupe --check` [#​17235](https://github.com/pnpm/pnpm/issues/17235).
- An optional dependency written with a named-registry prefix, such as `work:^1.0.0`, now fails the install when it cannot be resolved but the lockfile already has a matching entry from that registry. Such a dependency was skipped, which removed its entries from the lockfile.
- With `injectWorkspacePackages: true`, a `workspace:` dependency written as a relative path, such as `workspace:../lib-a`, in a workspace package now resolves from that package's directory [#​17284](https://github.com/pnpm/pnpm/issues/17284).
- Fixed `pnpm install` failing with `ERR_PNPM_UNSUPPORTED_PROTOCOL` when a workspace package injected through a relative path, such as `workspace:../lib`, has `catalog:` dependencies. Their catalog entries now resolve the way they do for a package injected by name [#​17280](https://github.com/pnpm/pnpm/issues/17280).
- `pnpm dedupe` now refreshes cached registry metadata while re-resolving locked versions [#​17208](https://github.com/pnpm/pnpm/issues/17208).
- `pnpm dedupe --check` no longer fails when the only difference is a `deprecated` notice that the registry added or removed after the lockfile was written [#​17198](https://github.com/pnpm/pnpm/issues/17198).
- Installs delegated to a pnpr server now resolve every prefix declared for a registry URL. A dependency or lockfile entry that used the second of two prefixes for the same registry, such as `zeta:` next to `work:` in `namedRegistries`, failed on the server [pnpm/tasks#204](https://github.com/pnpm/tasks/issues/204).
- Registry revisions are now addressed at `<registry>/<name>@<version>+r<revision>` [pnpm/tasks#208](https://github.com/pnpm/tasks/issues/208).
##### Adding packages and global packages
- `pnpm add <pkg>@<tag>` and `pnpm add <pkg>@<range>` now install the version the tag or range resolves to, even when the saved range allows a newer one [#​17234](https://github.com/pnpm/pnpm/issues/17234).
- `pnpm add <pkg>` without a version now installs the version under the dist-tag set by the `tag` setting. An `npm:` alias or a `jsr:` dependency without a version resolves that tag too. The setting is read from `pnpm-workspace.yaml`, the global config, `PNPM_CONFIG_TAG`, and `--config.tag`, and defaults to `latest`.
- `pnpm add` now accepts the lowercase short options `-p`, `-d`, `-o`, and `-e` as aliases of `--save-prod`, `--save-dev`, `--save-optional`, and `--save-exact`.
- `pnpm -D install <pkg>` now saves the package to devDependencies. An `add` option such as `-D` or `-E` written before `install <pkg>` was rejected as an unexpected argument.
- `pnpm add -T` now reports that the short option is ambiguous and points to `--save-types` and `--tilde`.
- Global packages installed with `pnpm add -g` are now linked from the global virtual store, so global packages that share dependencies share one copy. Set `virtualStoreType: project` to give each global install its own virtual store.
- `pnpm add -g` and the other `--global` commands now fail with `ERR_PNPM_CONFIG_CONFLICT_VIRTUAL_STORE_DIR_WITH_GLOBAL` when `--virtual-store-dir` is passed. A custom `--hoist-pattern` fails with `ERR_PNPM_CONFIG_CONFLICT_HOIST_PATTERN_WITH_GLOBAL`. Passing `--link-workspace-packages`, `--shared-workspace-lockfile`, or `--config.lockfile-dir` with `--global` also fails, with the matching `ERR_PNPM_CONFIG_CONFLICT_*_WITH_GLOBAL` code.
##### Registries, proxies, and login
- pnpm now reads the `strictSsl` and `localAddress` settings from `pnpm-workspace.yaml`, the global `config.yaml`, `PNPM_CONFIG_*` environment variables, and `--config.*` options. This includes `pnpm self-update` and the download of the pnpm version pinned in `packageManager`. Before, pnpm read them only from `.npmrc` as `strict-ssl` and `local-address` and ignored the other sources [pnpm/tasks#201](https://github.com/pnpm/tasks/issues/201).
- When Corepack runs pnpm and the native binary has to be downloaded, the download now uses the proxy from pnpm's config. That proxy comes from `PNPM_CONFIG_HTTPS_PROXY` and the matching variables, the global `config.yaml`, and the user `.npmrc`. Previously, the download read the proxy only from `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY` [pnpm/tasks#215](https://github.com/pnpm/tasks/issues/215).
- When the `pnpm` package downloads its native binary on first run, as it does under Corepack, it now trusts the CA certificates from the `ca`, `ca[]`, and `cafile` settings of `.npmrc`, including the ones scoped to the registry. A registry behind a private CA failed with `fetch failed` before, unless `NODE_EXTRA_CA_CERTS` named the CA. A project `.npmrc` is used only while the download is checked against npm's signature. Node.js versions that cannot add CA certificates after startup still need `NODE_EXTRA_CA_CERTS`.
- `pnpm login` saves the token in `<pnpm config>/auth.ini` again. Since v12.1.0, an unscoped login had made its registry the default for every project that did not name a registry. A login now also removes the token an earlier login saved for that registry or scope under `_auth` in the global `config.yaml`. `pnpm login --scope` still routes the scope through the global `registries` setting.
- pnpm no longer warns that a `registries` entry routed through the `@` scope matches no configured registry. pnpm applied such an entry and its options such as `serverType` while reporting it as ignored [pnpm/tasks#184](https://github.com/pnpm/tasks/issues/184).
##### Running scripts and other commands
- `pnpm ci --lockfile` and `pnpm ci --config.lockfile=true` no longer delete `pnpm-lock.yaml`. `pnpm ci` now always keeps the lockfile and runs a frozen install from it.
- `pnpm deploy --legacy` now checks the workspace lockfile against `minimumReleaseAge` and the other resolution policies, as `pnpm install` does, and fails with `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` when a locked version is too new. It used to deploy an older version that is not in the lockfile without a warning [#​17209](https://github.com/pnpm/pnpm/issues/17209).
- `pnpm deploy` now keeps a deployed symlink to a directory inside the project even if the directory is not among the deployed files, such as a link into `node_modules` [#​17288](https://github.com/pnpm/pnpm/issues/17288).
- `pnpm pack` and `pnpm publish` now keep `pnpm.config` in the published `package.json`. They also always include the file `pnpm.config` points to in the tarball [#​17210](https://github.com/pnpm/pnpm/issues/17210).
- `pnpm -r publish --batch` now sends `PUT /-/pnpr/v0/publish`, the batch publish endpoint that pnpr serves.
- `pnpm audit --ignore` and `pnpm audit --ignore-unfixable` now exit with a non-zero code when vulnerabilities at or above the audit level remain after ignoring. Before, these commands always exited with code 0.
- `pnpm audit --fix` and `pnpm audit --interactive` now fail with `ERR_PNPM_AUDIT_FIX_WITH_IGNORE` when combined with `--ignore` or `--ignore-unfixable`. Before, the fix ran and the ignore flags had no effect.
- `pnpm -r run <script>` now honors the `requiredScripts` setting from `pnpm-workspace.yaml`. If the script is listed there and a selected project does not define it, the run fails with `ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT` and names the projects that lack it.
- `pnpm run` and `pnpm exec` no longer report the dependencies as out of date after a lockfile change when `dedupePeers` is `true` [#​17322](https://github.com/pnpm/pnpm/issues/17322).
- On macOS, killing pnpm while it runs scripts in several projects at once now ends every one of those scripts. Before, a script could keep running after pnpm died.
- `pnpm run`, `pnpm exec`, and `pnpm dlx` no longer dump a core file for `pnpm` itself when a command they started dies from a signal [#​17204](https://github.com/pnpm/pnpm/issues/17204).
- The `runtime` setting is now read. Setting `runtime: false` in `pnpm-workspace.yaml`, `pnpm_config_runtime=false`, or `--config.runtime=false` stops `pnpm install`, `pnpm add`, `pnpm dedupe`, and the other installing commands from installing the runtimes in `devEngines.runtime` and `engines.runtime`. `pnpm dedupe` now also accepts `--no-runtime`.
- Directory selectors with `legacyDirFiltering: true` now include the project in the named directory along with its descendants. Excluding a directory also excludes that project [pnpm/tasks#196](https://github.com/pnpm/tasks/issues/196).
- `pnpm help --all` and `pnpm help -a` now print the full list of commands. They used to fail with an "unrecognized subcommand" error.
- Reading the file-creation mask on Linux no longer sets it. pnpm had to replace the mask to learn what it was, and a file another thread created in the window between the two calls was created unmasked.
- pnpm now passes an interrupt on to the handler it replaced, with the arguments that handler expects. A handler that asked for the signal's details was called without them. Only a program that embeds pnpm and installs its own `SIGINT`, `SIGTERM` or `SIGHUP` handler was affected.
##### Store
- `pnpm store prune` now keeps the packages that a project still uses when pnpm copied or cloned them into `node_modules`. These include patched packages, built packages, and every package installed with `packageImportMethod: copy`. Before, the prune removed them, and the next install downloaded them again [#​7192](https://github.com/pnpm/pnpm/issues/7192).
- `pnpm store prune` now keeps the packages of a project when the store path reaches its directory through a symlink. Previously, prune dropped such a project from its list and removed the packages only that project used from the global virtual store.
- `pnpm store prune` now removes the package metadata cache, the `metadata*` directories in the cache directory. This clears the outdated integrity checksums that cause `ERR_PNPM_TARBALL_INTEGRITY` when a registry republishes a version.
##### Speed
- `pnpm install` resolves dependencies faster in large workspaces on Linux, macOS, and Windows on x64 and arm64.
- Sped up cold installs and `pnpm fetch` on macOS. pnpm now links downloaded packages into the virtual store on a separate thread, so a slow link pass no longer pauses the downloads that are still in flight [#​17271](https://github.com/pnpm/pnpm/issues/17271).
- Sped up installs that add new projects to a workspace with a peer-heavy lockfile. pnpm now reads the lockfile's locked peer versions once for all new projects [#​17311](https://github.com/pnpm/pnpm/issues/17311).
- Warm installs no longer read the `package.json` of every git-hosted dependency. pnpm now stores the manifest of a git-hosted package in the store index when it fetches the package.
- `pnpm update --depth <n>` with a large `n`, such as the `--depth=9999` that `update-browserslist-db` runs, now finishes as fast as `--depth Infinity`. It used memory and stack in proportion to `n` on lockfiles with dependency cycles, and could run out of memory or crash [#​17329](https://github.com/pnpm/pnpm/issues/17329).
##### Output and warnings
- Output that fills the terminal, such as `pnpm run --stream` script output, is now written once. Before, every new line also rewrote all the lines already on screen [#​17387](https://github.com/pnpm/pnpm/issues/17387).
- pnpm now warns when a pnpmfile defines the `importPackage` hook. pnpm does not run this hook. Use the `packageImportMethod` setting to choose how packages are written to `node_modules`.
- `pnpm` now warns when a project's `pnpm-workspace.yaml` sets `ci`, `globalShims`, or `tools`, and names where to set them instead. These settings were already ignored there without a warning. `pnpm config set` also refuses to write them to a project's `pnpm-workspace.yaml`.
- pnpm no longer documents the `scriptsPrependNodePath` setting, which has no effect. A `pnpm-workspace.yaml` that sets it still loads.
<!-- sponsors -->
#### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
</td>
<td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
#### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
</td>
</tr>
</tbody>
</table>
<!-- sponsors end -->
### [`v12.15.0`](https://github.com/pnpm/pnpm/releases/tag/v12.15.0): pnpm 12.15
[Compare Source](https://github.com/pnpm/pnpm/compare/v12.14.0...v12.15.0)
This release lets `pnpm-workspace.yaml` delegate settings to other files and config dependencies with `include`, adds `lockfile.integrityTarget: tar` and tar-registry support, accepts zstd-compressed registry responses, and honors `SOURCE_DATE_EPOCH` in `pnpm deploy` and `pnpm install`. It also rejects registry metadata that names a different package than the one requested and speeds up workspace installs and macOS file linking.
##### Minor Changes
- `pnpm-workspace.yaml` can now delegate settings to other YAML files and to config dependencies through a new `include` field. Each source may define only the settings the root manifest delegates to it. Every setting has one owner. Commands that change settings write each one to the file that owns it. A relative path in an included file is relative to that file. See [Splitting Settings Across Files](https://pnpm.io/config-includes).
A config dependency supplies its settings through the YAML file named in the `pnpm.config` field of its `package.json`. The new `bootConfig` setting sets the release-age and trust policy pnpm uses to install config dependencies and the pnpm version from `packageManager`.
- Added the `lockfile.integrityTarget` setting. With `integrityTarget: tar`, `pnpm-lock.yaml` pins the hash of every package's uncompressed tar, so the lockfile no longer changes when a registry recompresses its tarballs or serves them as tars. pnpm learns a version's tar hash from the store or by downloading it once. `pnpm audit signatures` ties the tar hash to the signed `.tgz` integrity.
```yaml title="pnpm-workspace.yaml"
lockfile:
integrityTarget: tar
```
- pnpm can now install from a registry that serves uncompressed tars with zstd or gzip content coding. `pnpm-lock.yaml` records the hash of each tar. Declare such a registry with `serverType: pnpr` in `registries` to keep tarball URLs out of the lockfile. See [Tar registries](https://pnpm.io/registries#tar-registries).
pnpm now decodes the content coding of tarball downloads itself. It rejects a zstd response whose window is larger than 8 MiB.
Added the `maxTarballUnpackedSize` setting. It caps the bytes the files of one package may unpack to, 4 GiB by default.
- Registry revisions now always pin the hash of the uncompressed tar, the original included. pnpm records an original selected through the revision protocol, for example with a `+r0` specifier, as `revision: 0` in the lockfile and fetches it from the registry's digest route. pnpm checks a revision's tar whether the registry sends it as a tar, gzip, or zstd. Revision metadata must list revision 0 and mark the selected revision. pnpm rejects incomplete revision metadata with `ERR_PNPM_MALFORMED_METADATA`.
- pnpm now accepts zstd-compressed responses. Registries that serve zstd send package metadata in fewer bytes than with gzip, most of all the full metadata that settings such as `minimumReleaseAge` and `trustPolicy` read.
- `pnpm deploy` and `pnpm install` now use the `SOURCE_DATE_EPOCH` environment variable as an upper bound for timestamps in `node_modules/.modules.yaml` and `node_modules/.pnpm-workspace-state-v1.json`. With an equivalently prepared deploy target and an epoch no later than the timestamps that would otherwise be recorded, deploying the same project twice produces identical files [#​17171](https://github.com/pnpm/pnpm/issues/17171).
- `pnpm update --interactive` now highlights the row under the cursor in cyan while keeping the colors of its version changes.
##### Patch Changes
##### Security
- pnpm now fails with `ERR_PNPM_REGISTRY_NAME_MISMATCH` if a registry returns metadata for a package other than the one requested. Before, pnpm installed the package under the name in the metadata, so `allowBuilds` rules for the requested package did not apply to it.
- `minimumReleaseAgeExcludePrune` and `trustPolicyExcludePrune` now keep exclusions for resolved configuration dependencies and their transitive dependencies [#​17142](https://github.com/pnpm/pnpm/issues/17142).
##### Resolving dependencies
- When `pnpm install` resolves a dependency again, it now reuses a version that the install already resolved for the same package, as a fresh install does. Before, it kept the version the lockfile pinned and added a second copy of the package. A locked version still stays when nothing else in the install prefers another version. To pin a transitive dependency on purpose, use `overrides` [#​17084](https://github.com/pnpm/pnpm/issues/17084).
- When another workspace project adds a different version of a package, a project's auto-installed peer on that package now moves to the version a fresh install picks. It used to stay on its locked version while any other project still accepted that version [#​17058](https://github.com/pnpm/pnpm/issues/17058).
- A package that lists the same dependency in `dependencies` and as an optional peer now gets the peer bound when a project adds a provider for it later. The lockfile now records every peer a package declares, including one its own dependency supplies [#​17056](https://github.com/pnpm/pnpm/issues/17056).
- `pnpm install --prod` and `pnpm deploy --prod` no longer drop a dependency that a package declares both as an optional peer and as its own dependency, when the package resolved it as its own dependency and a dev dependency provides the same package under another alias.
- `pnpm install` with an existing lockfile and a second `pnpm dedupe` now keep optional peer bindings that point into a dependency cycle or back into the dependent package. Before, the second run dropped the optional peer binding from the lockfile snapshot key.
- `pnpm install` and `pnpm dedupe` now preserve own-dependency and peer-dependency bindings when reusing a lockfile whose peer suffixes were hashed by `peersSuffixMaxLength`.
Upgrading a direct dependency in one workspace project now refreshes matching transitive pins in sibling projects during the same `pnpm install` pass.
- With `resolvePeersFromWorkspaceRoot: false`, a workspace project no longer binds a peer to a version that only another project's dependencies provide. pnpm now auto-installs a version that satisfies the peer range for that project. Before, the project got a version outside the range, with no peer warning.
- `pnpm install`, `pnpm add`, and `pnpm update` now reuse the lockfile's resolution for dependencies that take part in a dependency cycle, such as `mlly` and `pkg-types`. They re-resolved those packages and everything that depends on them from the registry before [pnpm/tasks#130](https://github.com/pnpm/tasks/issues/130).
- pnpm now measures a `pnpm.overrides` entry written as a `workspace:` path, such as `workspace:./packages/foo`, from the directory holding `pnpm-workspace.yaml`. It used to be measured from each package the override rewrote. The install then linked a directory that does not exist, or failed if workspace packages were injected [#​17010](https://github.com/pnpm/pnpm/issues/17010).
- `pnpm install` now removes config dependencies that are no longer declared, including when the entire `configDependencies` setting is removed. Frozen installs reject a lockfile that still records removed config dependencies.
- `pnpm install --update-checksums` now re-resolves every locked package and records the integrity the registry reports now.
- `pnpm add` and `pnpm install` now accept `gist:<id>` dependencies and GitHub Gist URLs, and install them from the gist's archive. `pnpm pkg fix` normalizes a `gist:` repository the way `npm pkg fix` does, `pnpm licenses` links a gist package to its gist page, and `pnpm sbom` reports the repository of a package whose `repository` field is a `gist:` shorthand.
- `pnpm add` now reads the package name correctly from a tarball URL under a registry URL that has a path, such as `https://example.com/npm/`, and installs a registry tarball URL with a malformed percent escape as a plain tarball URL. Before, the registry path became part of the name, so a scoped package failed with `ERR_PNPM_INVALID_PACKAGE_NAME`.
- With `minimumReleaseAge` set, pnpm now revalidates a package's cached full metadata with a single ETag request so an unchanged registry answers with `304`, even when the registry does not list a publish time for every version. Previously, pnpm downloaded that metadata again whenever the cached copy was older than `minimumReleaseAge`. With `resolutionMode` set to `lowest-direct` or `time-based`, pnpm also reuses that metadata across every workspace project that depends on the package.
- When pnpm revalidates cached registry metadata, it now sends `If-Modified-Since` when the registry's modification time is a date without a time, and no longer crashes when the modification time is before 1970.
- Added protocol versioning between the pnpm client and pnpr server, verified applied resolution policies in resolution responses, and preserved structured error codes across the wire.
##### Performance
- Sped up `pnpm install` on macOS. On a 12-core Mac, installing 1352 packages from a warm store took 1.3 seconds, down from 2.2. pnpm now writes package files into `node_modules` with 4 threads on macOS, whatever the number of CPU cores. Set the `PNPM_MACOS_LINK_THREADS` environment variable to use a different number of threads, or to `0` to write files with the threads pnpm uses for the rest of the install.
- `pnpm install` is faster and uses less memory in large workspaces with `sharedWorkspaceLockfile: false`. Each project's install no longer reads the manifests of every other workspace project again. Installs that wait for their workspace dependencies now count toward `workspaceConcurrency` [#​16966](https://github.com/pnpm/pnpm/issues/16966).
- Sped up workspace project discovery, dependency resolution, lockfile up-to-date checks, and peer dependency checks in large workspaces [#​16839](https://github.com/pnpm/pnpm/issues/16839) [pnpm/tasks#9](https://github.com/pnpm/tasks/issues/9). On a workspace with 6,833 projects, the lockfile up-to-date check uses about 1 second less CPU time. The peer dependency check at the end of an install now checks linked workspace projects against the manifests already in memory, without reading each `package.json` again.
- Sped up bin linking and build planning during `pnpm install`. Package binary targets and shebang runtimes are now precalculated during tarball extraction and served in `pnpr` registry metadata alongside verified `requiresBuild`, tarball size, and file-count metadata.
- Lowered peak memory when pnpm downloads many packuments, such as during lockfile verification with `trustPolicy` on Linux. In one 1,800-entry workspace, a lockfile update now peaks at 1.8 to 2.0 GB. It peaked at 2.6 to 3.7 GB before [#​17020](https://github.com/pnpm/pnpm/issues/17020).
- `pnpm install` in a Cargo workspace skips crates that an earlier install already unpacked into the store. Before, a repeat install processed every crate in `Cargo.lock` again. `pnpm install --force` unpacks every crate again [pnpm/tasks#69](https://github.com/pnpm/tasks/issues/69).
##### Linking node_modules and workspaces
- Concurrent installs that import the same package into one project now all complete. One of them used to fail with `ENOTEMPTY` when its copy of the package collided with the copy another install had already placed [pnpm/tasks#48](https://github.com/pnpm/tasks/issues/48).
- `pnpm install` now succeeds when `node_modules` is a symlink to an existing directory. Dependency hoisting previously rejected a symlinked `node_modules` as an invalid destination [#​17157](https://github.com/pnpm/pnpm/issues/17157).
- A filtered first install under the isolated linker now links every workspace project by name into `node_modules/.pnpm/node_modules`, not only the selected ones [pnpm/tasks#155](https://github.com/pnpm/tasks/issues/155).
- With `nodeLinker: hoisted`, a filtered install such as `pnpm --filter app add <pkg>` keeps the root `node_modules` links and bins of the workspace projects it did not select. A project with no dependencies of its own lost them until the next full install.
- `pnpm install --filter` with `nodeLinker: hoisted` and `--prod` or `--dev` now preserves previously installed dependency groups for unselected workspace projects [pnpm/tasks#164](https://github.com/pnpm/tasks/issues/164). Repeat filtered installs also re-resolve when a transitive injected workspace dependency or a linked dependency's version changes.
- With `sharedWorkspaceLockfile: false`, `pnpm install` now runs the workspace root's pnpmfile for every project, after the project's own pnpmfile. Before, it ran only the pnpmfile in the project's directory.
- `pnpm install` and `pnpm peers check` now detect peer dependency issues and report linked package versions in linked projects that use `package.json5` or `package.yaml` [pnpm/tasks#172](https://github.com/pnpm/tasks/issues/172).
- `pnpm install` and `pnpm peers check` no longer report an unmet peer when a workspace package's peer is provided by a remote tarball URL. pnpm now compares the peer range with the version in the tarball's manifest [#​17037](https://github.com/pnpm/pnpm/issues/17037).
- `pnpm prune` now removes extraneous direct packages from `node_modules` when `package.json` and `pnpm-lock.yaml` are already in sync. `pnpm prune` also honors `--filter`, `--recursive`, `sharedWorkspaceLockfile: false`, and the `trustLockfile` setting and `--trust-lockfile` flag. With the lockfile trusted, `pnpm prune --prod` works offline when every package is in the store [#​16999](https://github.com/pnpm/pnpm/issues/16999).
##### Injected workspace packages
- `pnpm install --frozen-lockfile` now fails with `ERR_PNPM_OUTDATED_LOCKFILE` when a local directory dependency or injected workspace package changes a dependency to a different tarball URL or git commit [#​17129](https://github.com/pnpm/pnpm/issues/17129). It also fails when an injected workspace package changes a dependency's named-registry range, such as `work:^2.0.0`, to one the locked version no longer satisfies.
- `pnpm install --frozen-lockfile` now accepts the lockfile it wrote for a `file:` dependency on a directory without a `package.json`. It also accepts the lockfile for an injected workspace package that bundles a dependency in `bundledDependencies`, lists a dependency in both `dependencies` and `optionalDependencies`, or publishes from a `publishConfig.directory` whose `package.json` lists other dependencies than the project's own. Before, these failed with `ERR_PNPM_OUTDATED_LOCKFILE`.
- The lockfile now records a `catalog:` peer dependency of an injected workspace package as written in its `package.json`. It recorded the catalog's range before, so editing the catalog changed the consumer's lockfile entry [pnpm/tasks#153](https://github.com/pnpm/tasks/issues/153).
- `pnpm install` now resolves a git, tarball, or tag dependency of an injected workspace package again when its spec changes. Before, it kept the old version.
- Repeat installs and `verifyDepsBeforeRun` now re-check projects that inject a modified workspace package, including when `sharedWorkspaceLockfile` is `false` [#​17007](https://github.com/pnpm/pnpm/issues/17007), and accept aliased `workspace:` ranges on linked dependencies.
- An injected workspace package that was linked now becomes a copy when the project that depends on it starts providing one of its peers at a version the package's own workspace context lacks. The link used to stay until that dependency was updated, so the package could not find the peer the project provides [#​17057](https://github.com/pnpm/pnpm/issues/17057).
- An injected workspace package now keeps only the files its manifest lists after a lifecycle script or a script named in `syncInjectedDepsAfterScripts` rebuilds it. Before, these refreshes copied every file of the package directory into the injected copy, including files that `files` or `.npmignore` leave out. With `deployAllFiles: true` the copy still gets every file.
- A script listed in `syncInjectedDepsAfterScripts` now keeps a package's links to its own files as links in the injected copies, the way `pnpm install` writes them, and updates those copies when `sharedWorkspaceLockfile` is `false`. Before, a directory link the script added became a real directory or went missing with `deployAllFiles`, and with `sharedWorkspaceLockfile: false` the copies kept the files from the last install.
##### Running scripts and checking dependencies
- Pressing Ctrl+C during `pnpm -r run` or `pnpm --filter <pkg> run` no longer reports `ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL`. pnpm now ends with the interrupted script's status, such as 130 for a script that SIGINT ended on Linux or macOS [#​16964](https://github.com/pnpm/pnpm/issues/16964).
- With `enableGlobalVirtualStore`, a Node.js resolve hook that a script registers now sees the importer as `context.parentURL` after pnpm's `NODE_PATH` fallback fails to find a bare specifier. Hooks that resolve tsconfig `paths` aliases from the importer failed with `ERR_MODULE_NOT_FOUND` [#​16979](https://github.com/pnpm/pnpm/issues/16979).
- `pnpm run`, `pnpm exec`, and `pnpm restart` now pass the install flags they were given, such as `--lockfile-dir`, `--modules-dir`, `--store-dir`, `--offline`, and `--ignore-scripts`, to the `pnpm install` that `verifyDepsBeforeRun: install` starts. When that install leaves the dependencies out of date, pnpm now prints a warning.
- A repeated `pnpm install --filter` now finishes without reinstalling when the selected projects are up to date, and so does `pnpm install` once filtered commands have installed every project. After a filtered install, `pnpm run` and `pnpm exec` now install a selected project whose dependencies changed in between [#​17011](https://github.com/pnpm/pnpm/issues/17011), require the workspace root when a filtered install with `pruneDirectDependencies: true` skipped it [pnpm/tasks#181](https://github.com/pnpm/tasks/issues/181), and preserve the recorded ignored build scripts of unselected projects.
- The check that runs before a script now holds the workspace projects that the selected project depends on, including with `sharedWorkspaceLockfile: false` and for workspace dependencies declared with `link:`. `--filter=<project>...` now selects `link:` dependencies as well. In a workspace that has no `package.json` at its root, `pnpm run` and `pnpm exec` no longer reinstall before every command when the dependencies are up to date.
- `verifyDepsBeforeRun` and repeat `pnpm install` runs now apply `overrides` before comparing a modified `package.json` with `pnpm-lock.yaml` [#​17127](https://github.com/pnpm/pnpm/issues/17127). `pnpm install` with `optimisticRepeatInstall` now re-runs when `configDependencies` changed, `verifyDepsBeforeRun` reports `node_modules` out of date when `useGitBranchLockfile` is enabled and the branch lockfile is missing, and in a single-project repository both checks record a successful lockfile check so later runs skip it until the lockfile changes [#​16993](https://github.com/pnpm/pnpm/issues/16993).
- `pnpm install` and `verifyDepsBeforeRun` now compare manifests, lockfiles, and patch files by content hash. They notice an edit that kept the file's modification time, as `cp -p`, `rsync -a`, or an archive extraction leave it, and a patch file that was copied or touched without changing its content no longer marks dependencies as outdated [#​16988](https://github.com/pnpm/pnpm/issues/16988).
##### Deploying, packing, and other commands
- `pnpm deploy` now deploys `file:` dependencies that live outside the workspace directory. It failed with "Refusing to deploy unsafe lockfile path" [#​16983](https://github.com/pnpm/pnpm/issues/16983).
- `pnpm deploy` now records the peer dependencies of the workspace packages it copies into the deployed lockfile. Before, pnpm rejected that lockfile with `--frozen-lockfile` when a deployed workspace package declared a peer and `injectWorkspacePackages` was off [#​17093](https://github.com/pnpm/pnpm/issues/17093).
- `pnpm install --frozen-lockfile` and `verifyDepsBeforeRun` now succeed inside a directory created by `pnpm deploy`. `pnpm deploy` writes self-contained workspace and lockfile settings, prunes unused `patchedDependencies`, and preserves workspace-level dependency resolutions on deployed directory dependencies.
- On macOS, `pnpm deploy` no longer writes a second, unused copy of every package to `node_modules/.pnpm/@` in the deploy directory [#​17116](https://github.com/pnpm/pnpm/issues/17116).
- `pnpm patch-commit` and `pnpm install` now apply a patch that renames or moves a file of the patched package. Such a patch failed with "rename/copy operations in patches are not yet supported".
- In workspaces with `sharedWorkspaceLockfile: false`, `pnpm patch`, `pnpm patch-commit`, and `pnpm patch-remove` now resolve patch files and `patchedDependencies` entries at the workspace root. `pnpm install` checks configured patches across all workspace projects before reporting unused patches.
- `pnpm pack` and `pnpm publish` no longer include editor swap files such as `.*.swp`, macOS `._*` files, `.lock-wscript`, `.wafpickle-*`, `build/config.gypi`, or `archived-packages/` in the tarball. Naming one of these files in `files` still includes it [#​16955](https://github.com/pnpm/pnpm/issues/16955).
- `pnpm pack` and `pnpm publish` now support extended glob patterns and brace ranges such as `part{1..3}.js` and `part{a..c}.js`, including descending ranges, steps, and zero padding, in `files`, `.npmignore`, and `.gitignore`. Explicitly listed internal directory symlinks are preserved below excluded directories, entry points honor nested ignore files, ignore negations can re-include default-excluded logs and backup files, and nested lockfiles follow the package's file selection rules.
- Trusted publishing with OIDC now works with registries whose URL has a path, such as `https://registry.example/npm/private/`. pnpm previously sent the token exchange request to the root of the registry host.
- `pnpm deprecate` and `pnpm unpublish` now work for packages whose registry metadata is larger than 10 MiB, such as `typescript`. They accept up to 50 MiB, the same limit as `pnpm owner`.
- `pnpm owner ls` now lists the owners of a package on the npm registry. It reported every package as not found.
- `pnpm licenses list --prod` now includes optional dependencies, including transitive ones. Pass `--no-optional` to leave them out. `pnpm licenses list` also reports no licenses for workspace projects not recorded in the lockfile, errors when `pnpm-lock.yaml` is missing, and formats empty results as the requested text or JSON [pnpm/tasks#174](https://github.com/pnpm/tasks/issues/174).
- `pnpm why` now reads each selected workspace project's lockfile and modules directory when `sharedWorkspaceLockfile` is `false` [pnpm/tasks#169](https://github.com/pnpm/tasks/issues/169).
- `pnpm pkg fix` now converts a `repository` string such as `github:pnpm/example` to the object form, as `npm pkg fix` does. It also normalizes a GitHub, GitLab, or Bitbucket repository URL the way `npm pkg fix` does [#​16980](https://github.com/pnpm/pnpm/issues/16980).
##### Configuration and setting up pnpm
- Registry credentials and TLS settings passed with `--config`, such as `--config.//registry.example.com/:_authToken=<token>`, are now applied. They take precedence over the same settings in `.npmrc` files.
- pnpm now reads only the settings it needs to decide whether to switch to the pnpm version a project pins. A setting outside them can no longer fail that decision or change its outcome. For example, `pnpm --version` no longer fails in a pinned project whose `pnpm-workspace.yaml` has a setting this pnpm cannot read. Projects that pin neither pnpm nor a runtime skip this check without reading any settings.
- When pnpm switches to the version a project pins, an option only the pinned pnpm knows now reaches that pnpm when it comes immediately before the command name, as in `pnpm --new-flag install`. When switching for `pnpm --version` or an unrecognized command line, pnpm also honors `--color`, `--no-color`, `--reporter`, and `--loglevel` wherever they appear on the command line.
- `pnpm self-update` now updates the project's pnpm pin when Homebrew installed pnpm or Corepack runs it, leaving the global pnpm alone [#​17001](https://github.com/pnpm/pnpm/issues/17001). Run inside a workspace package, `pnpm self-update` updates the pin in the workspace root's manifest, including in `package.yaml` or `package.json5`.
- `pnpm setup` now completes when Windows registry environment values cannot be read or written. It prints PowerShell commands to configure `PNPM_HOME` and `PATH` without registry access [#​17167](https://github.com/pnpm/pnpm/issues/17167).
- `pnpm setup` now succeeds when it cannot tell which shell configuration file to update, for example in a container where `SHELL` is not set. It installs pnpm and prints the `PNPM_HOME` and `PATH` lines to add yourself. Previously it failed with `ERR_PNPM_UNKNOWN_SHELL`, and so did the installer script at get.pnpm.io [#​16973](https://github.com/pnpm/pnpm/issues/16973).
- In StackBlitz WebContainers, `pnpm` no longer crashes intermittently with `Parking not supported on this platform`, and running a command that does not exist now reports that the command was not found. Previously it sometimes failed with a generic error.
<!-- sponsors -->
#### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
</td>
<td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
#### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
</td>
</tr>
</tbody>
</table>
<!-- sponsors end -->
</details>
---
### Configuration
📅 **Schedule**: (in timezone Europe/Berlin)
- Branch creation
- At any time (no schedule defined)
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNjguMyIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
12.14.0→12.21.0Release Notes
pnpm/pnpm (pnpm)
v12.21.0: pnpm 12.21Compare Source
pnpm 12.21.0 lets
pnpm store addprepare tarball and git dependencies for offline installs. It also makes repeated installs keep their peer dependency choices and fixes severallockfile.format: v13,nodeLinker: hoisted, andpnpm deployfailures. If a pnpr server refuses a setting, pnpm now resolves locally.Minor Changes
pnpm store addrun in a project now prepares downloaded tarballs for every lockfile entry that pins them. Besides registry packages,pnpm install --offline --frozen-lockfilecan then install dependencies on a tarball URL and dependencies on a git host such as GitHub whose lockfile entry records anintegrity.Patch Changes
Installs that failed
pnpm now reads a lockfile with a mapping key longer than 1,024 characters written as
'key':, without the?marker. Before,pnpm installand other commands failed on such a lockfile withERR_PNPM_BROKEN_LOCKFILE.With
lockfile.format: v13,pnpm installno longer fails to create or rewrite the lockfile when a package declares many of its dependencies as peers.Fixed
pnpm deployfailing withlockfile.format: v13when injected workspace packages have hashed peer bindings.Frozen installs with v13 lockfiles now accept valid peer dependencies of injected workspace packages that use catalogs.
Fixed injected workspace packages that depend on themselves linking to a nonexistent directory.
pnpm installwithfrozenStoreenabled no longer fails withERR_PNPM_FROZEN_STORE_NEEDS_BUILDwhennodeLinkerishoisted.pnpm fetchwithnodeLinker: hoistedno longer populates global virtual store links or modifies linked agent skills, and it preserves an existing hoistednode_modulesdirectory #18037.A
requirements.txtbeside apyproject.tomlthat declares[tool.uv.workspace]without a[project]table no longer makes that directory a Python project.pnpm installstopped there with an error when the directory had a.venvthat pnpm did not create #18023.Peer dependencies
Repeated installs no longer change the peer dependency providers that the previous install chose. This covers adding, updating, or removing a dependency, projects that use different ranges of one dependency, dependency cycles, and injected dependencies with
autoInstallPeers: falsepnpm/tasks#221.An unchanged install keeps a valid locked peer provider even when a direct dependency provides another compatible version. Explicit
pnpm addandpnpm updaterequests take precedence over it.Workspace projects that select different versions of a peer provider no longer share one copy of the package that depends on it. This affected peers reached through an aliased dependency or a peer dependency cycle.
A removed dependency no longer comes back as a peer provider. Before, a direct dependency removed with
autoInstallPeers: falsecould be restored from an old peer resolution, and a removed one could still supply its old peer context.With
nodeLinker: hoistedandautoInstallPeers: false,pnpm installno longer creates duplicate copies of a package whose resolved peers are identical. A package also no longer loads a copy of its dependency that was resolved with different peer versions #18003.pnpm deploynow binds optional peers declared only inpeerDependenciesMetafor linked workspace packages. The deployed manifest and lockfile also retain these peers when filtering dependency groups.Running scripts
Scripts now stop when pnpm's process group is killed while they are starting.
Bin shims in the global virtual store no longer include the hoisted modules directory of the project that installed them #18035.
pnpm pipelinenow rebuilds local packages and reruns build scripts after it restores a shared Cargo build cache with Cargo 1.100 or newer. Before, a worktree could reuse build-script output from the worktree that created the cache.pnpr
If the pnpr server refuses a setting the install uses, or cannot return the lockfile format pnpm reads,
pnpm installandpnpm updateprint a warning and resolve locally. Cargo and Python resolution also fall back to resolving locally. pnpm now rejects a pnpr resolution of npm dependencies that does not name its lockfile format.pnpm installwithpnprServernow limits the size of the server's resolve and lockfile verification responses. An oversized response ends the request with an error.pnpm now displays pnpr error codes and reasons when remote requests fail.
Other commands and settings
pnpm setupand the install script now support PowerShell as the login shell on Linux and macOS. They addPNPM_HOMEtoPATHinprofile.ps1under$XDG_CONFIG_HOME/powershellor~/.config/powershell#18026.A
lockfileDirsetting that points at the default lockfile directory now installs the same way as leaving it unset pnpm/tasks#275.Platinum Sponsors
Gold Sponsors
v12.20.0: pnpm 12.20Compare Source
pnpm 12.20.0 records the specifiers of local directory dependencies in the experimental v13 lockfile and fixes several
nodeLinker: hoisted, peer dependency, andoverridesbugs. The bundlednode-gypno longer ships the undici version that security scanners flag. Remote resolution and shared build caches no longer work with pnpr 0.1.0-alpha.19 or older.Minor Changes
lockfile.format: v13,pnpm installrecords the dependency specifiers of local directory packages. Frozen installs reject changed specifiers even when the locked versions still satisfy them.Patch Changes
Upgrading and security
Remote resolution, shared build caches, and release notes no longer work with pnpr 0.1.0-alpha.19 or older. pnpm now reads the capabilities a pnpr server advertises under
pnpr.protocols. Installs fail when the server does not confirm the requested resolution and verification policies.The
node-gypbundled with pnpm no longer ships undici 6, which security scanners flag for CVE-2026-84947. On Node.js 26,node-gypdownloads through a proxy or with a custom CA file no longer crash with "invalid onError method" #17941.Resolving dependencies
Version-selector
overridesentries such as"ms@^2.0.0": "2.1.1"now apply to dependencies declared with thecatalog:protocol when the catalog entry's range matches the selector #17922.A root
overridesentry that points a package at aworkspace:path, such asworkspace:./packages/foo, now also applies when a registry package depends on that package pnpm/tasks#270.Git dependencies now accept npm's
::separator between fragment parameters, such asgithub:owner/repo#v1.0.0::path:packages/foo. Before, pnpm read the whole fragment as a branch name and failed to resolve it #17827.pnpm dedupenow keeps a locked runtime version, fromdevEngines.runtimeor from a dependency'sengines.runtime, when the declared range still admits it.pnpm dedupe --checkno longer fails each time a newer Node.js release in the range comes out #17984.With
autoInstallPeersFromHighestMatch, conflicting non-semver peer dependencies now remain missing, and identical non-semver peer specifiers are preserved. Preferred registry versions no longer replace local paths or protocol-prefixed specifiers when pnpm installs missing peers pnpm/tasks#272.Hoisted node linker
nodeLinker: hoisted, a package now keeps its nested copy of a dependency that it resolved at a version other than the top-level one, including a peer dependency its parent supplies. Before, pnpm could remove that copy as a duplicate or give the top-level slot to a peer variant found deeper in the graph. The package then loaded the top-level version.Lockfile and peer dependency graphs
Fixed
pnpm installkeeping stale peer bindings after dependency changes. Required dependencies no longer remain marked optional when another workspace project removes a shared package pnpm/tasks#221.Repeated installs now keep the same dependency links when packages form cycles with several peer dependency variants pnpm/tasks#221.
Fixed writing
lockfile.format: v13for dependency cycles with missing, optional, or transitive peers. Frozen installs also accept unchanged injected packages whose peers use catalogs. With--no-optional, frozen installs reject required catalog children recorded only as optional dependencies pnpm/tasks#221.pnpm deploypreserves an injected workspace package's resolved dependencies when they differ from the workspace project's own dependencies. This also applies to packages withpublishConfig.directorypnpm/tasks#221.Running scripts and runtimes
Scripts that pnpm runs in a process group of their own are now ended when pnpm is killed right after starting them. A parallel run that was killed before pnpm registered its scripts left all of them running.
When a command name matches no script and pnpm falls back to running it as a command, the install that runs before scripts now runs once. Its errors and warnings print once #17977.
Failed downloads by project-aware global runtime commands now explain which configuration applies. Node.js failures also list the global mirror settings and environment variables to check.
Other commands and settings
Fixed
pnpmoccasionally crashing on the first HTTPS request, mostly on Windows virtual machines under load. pnpm now seeds TLS randomness from the operating system's random number generator pnpm/tasks#239.Fixed
pnpm deprecate,pnpm undeprecate, andpnpm unpublishfailing with revision conflicts when a registry cache serves stale package metadata.pnpm sbomnow reports malformed workspace manifests. Before, it omitted their packages pnpm/tasks#59.Fixed
pnpm store statusreporting approved builds of git dependencies as modified when the store contains legacy build metadata.pnpm now recognizes Capawesome Cloud and RWX as CI environments.
Platinum Sponsors
Gold Sponsors
v12.19.0: pnpm 12.19Compare Source
pnpm 12.19.0 adds
pnpm fund, lets theloadednode linker handle packages that need a build, and adds theprojectScopedOptionalPeerssetting and an experimental JSON lockfile format. It also includes a security fix: an offline install error no longer prints registry credentials. pnpm now checks theenginesand platform fields of every workspace project, and many hoisted-linker and frozen-lockfile bugs are fixed.Minor Changes
Added
pnpm fund, which lists the funding URLs declared by the installed dependencies in the same treenpm fundprints. Use--jsonfor thenpm fund --jsonreport and--recursiveor--filterto report on workspace projects.pnpm fund <pkg>opens the funding URL of an installed package, and--whichpicks one when it lists several #7354.With
nodeLinker.type: loaded, packages that need a build no longer have to be listed innodeLinker.excluded. A package with a matching side-effects cache entry loads from the store. If side-effects cache reads and writes are enabled, pnpm builds an approved package once, saves the result to the side-effects cache, and then loads it from the store. This includes a build that changes no files in its package, so its script does not run again in other projects that use the same store. List a package insideEffectsCache.excludeif its build must run in every project, such as a git hook installer. pnpm materializes other cache misses, packages with native.nodeaddons, and their dependencies automatically.pnpm also scans JavaScript sources for filesystem imports and for
__dirnameorimport.meta, and materializes matching packages. The scan does not detect computed imports. List such packages innodeLinker.excluded.Added the
projectScopedOptionalPeerssetting. When it istrue, a project gets a missing optional peer dependency only if the project's own dependencies install a version of it. Another workspace project's dependencies, such as itsdevDependencies, no longer supply one.dedupePeerDependentskeeps deduplicating everything else #16666.Added the experimental
lockfile.format: v13setting. With it, pnpm writespnpm-lock.yamlin a JSON-like syntax, indented with tabs, with a trailing comma after every entry. The file is still valid YAML. The file has onepackagesentry per package version in place of thepackagesandsnapshotssections, and each entry records the versions of its peer dependencies as its properties. Updating a peer dependency then changes only the lines that record its version. pnpm reads lockfiles in both formats whatever the setting is.pnpm store addnow accepts directories of tarballs, such aspnpm store add ./tarballs, and adds every.tgz,.tar.gz, and.tarfile inside them recursively.pnpm store addis now faster when it adds many packages or local tarballs #17875.With
supportedArchitecturesset,pnpm installandpnpm fetchalso store, without linking them, the dependencies of the archives kept for the other listed platforms. A platform added to the setting gets its archives and their dependencies on the next install. Optional dependencies a listed platform cannot run are not stored, and one that fails to download is skipped. Dependencies from git repositories are not stored for other platforms.When
supportedArchitecturesnames exactly one platform and notcurrent, pnpm links that platform's variant of a package published with platform variants, together with that variant's dependencies. This holds for the list form and for theos,cpu, andlibcform. A variant whose floor or ABI the listed platform does not state is not linked for it: pnpm links another variant that fits, or the version's own archive. Changing the setting, or the platform of the host, such as anode_modulesmounted into a musl container or a Node.js with another ABI, relinks the package on the next install, even from a frozen lockfile.pnpm now provides a prebuilt binary for NetBSD 10 on x64 #17803.
Patch Changes
Security
Installs that failed or hung
pnpm install,pnpm ci, andpnpm install-testoutside a workspace now fail withERR_PNPM_NO_PKG_MANIFESTwhen the directory has nopackage.json,package.json5, orpackage.yaml. They no longer create apackage.json, a lockfile, andnode_modulesthere #17727.Fixed
pnpm installhanging when a concurrent tarball download or manifest read is cancelled while other tasks are waiting on the same archive.Running a global command such as
nodein a project that pins its version no longer hangs while pnpm installs that version. The hang kept starting new processes until the machine ran out of memory.A global command such as
nodenow runs the version a project pins whenPNPM_CONFIG_LOCKFILE_DIR,PNPM_CONFIG_VIRTUAL_STORE_ONLY, orPNPM_CONFIG_SYMLINKis set in the environment. Before, the dispatch failed with "the installed node executable is not under" the store.pnpm installnow fetches fresh metadata for a package when a version allowed byminimumReleaseAgeExcludeis missing from the cached metadata. Before, it could fail withERR_PNPM_NO_MATCHING_VERSIONwithout contacting the registry #17723.A
${VAR}placeholder in a registry URL inpnpm-workspace.yamlor the project.npmrcnow fails the command. pnpm does not expand environment variables in these files. Before, pnpm ignored such a URL and resolved packages from another registry, such as npmjs.org. pnpm now warns when it ignores a placeholder in a proxy,pnprServer, oruserAgentsetting inpnpm-workspace.yaml#17762.Fixed local package installs failing while a workspace lockfile is being written.
pnpm self-updateand switching to thepackageManagerversion now work behind a proxy that ends a response by closing the TLS connection without aclose_notifyalert. The registry signature check failed there withERR_PNPM_PNPM_ENGINE_IDENTITY_UNVERIFIABLE#17763.A package tarball that keeps failing to download now fails the install after
fetchRetriesretries. pnpm used to download it again with a second full set of retries, which doubled the wait. The error now names the actual download failure.When the native binary of the pnpm version a project pins fails to download, pnpm now reports the download error. It used to report only that no native binary was found for the host.
POSIX bin shims and the
pnpm,pn,pnpx, andpnxlaunchers now run inside a Nix build on macOS with the sandbox enabled. Installing again replaces the shims already innode_modules#17750.Fixed pnpm leaving process pipes open after it exits on macOS pnpm/tasks#229.
Engines and platform checks
pnpm install,pnpm add,pnpm update, andpnpm removenow check theengines,os,cpu, andlibcfields of every workspace project, including the workspace root.pnpm run -randpnpm exec -rcheck them before running anything. An incompatibleengines.pnpmfails the command. An incompatibleengines.nodeprints a warning, or fails the command withengineStrictenabled. An unsupported platform prints a warning. A project that downloads its own Node.js throughdevEngines.runtimeis checked against that Node.js #17751 pnpm/tasks#281 pnpm/tasks#299.Fixed missing warnings when a required dependency does not support the current Node.js version.
An optional dependency that declares no
os,cpu, orlibcfield is no longer skipped because its name contains only an operating system word, such asget-windowson macOS. pnpm now infers its platform from the name only when the name also has a cpu or libc token, such as-win32-x64#17774.Peer dependencies
With
dedupePeerDependents: false, a missing optional peer is no longer resolved from a version that only another workspace project depends on. The workspace root's dependencies still count ifresolvePeersFromWorkspaceRootistrue. Before, a tool in one project'sdevDependencies, such aswebpack-cli, could become an optional peer of another project's production dependencies #16666.pnpm installno longer gives a project an optional peer dependency that it skipped because a required peer would conflict with the project's dependencies. Before,dedupePeerDependentsmerged the project's copy of the package that declares the peer with another project's copy that resolves it #17781.pnpm installno longer fills in a missing optional peer dependency if a required peer it brings in conflicts with a version the project depends on. Before, such a peer was installed along with it and reported as unmet #17718.pnpm install --filterin a sparse checkout now counts the dependencies of workspace projects that are missing from disk when it resolves peer dependencies and marks packages as optional. The lockfile it writes no longer differs from a full checkout in those entries #17791.Frozen lockfile and workspace links
pnpm install --frozen-lockfilenow succeeds when a workspace project recorded inpnpm-lock.yamlhas an empty directory, such as a git submodule that was not checked out #17712.pnpm install --frozen-lockfilenow fails withERR_PNPM_OUTDATED_LOCKFILEwhen a workspace package linked through a plain semver range, such as^7.9.5, has changed to a version outside that range #17806.pnpm install --frozen-lockfileandverifyDepsBeforeRunnow accept aworkspace:dependency on a project whose version is not valid semver, such asworkspace:1on a project at version1. Before, they reported the lockfile thatpnpm installhad just written as out of date.pnpm install --frozen-lockfilenow accepts a lockfile when an injected workspace package declares afile:orlink:dependency with backslashes, such asfile:..\vendor, or with a slash after the protocol, such asfile:/./vendor. Before, the install reported the lockfile as out of date right afterpnpm installhad written it #17720.When a package injected through a path, such as
file:../libor../lib, gives one of its dependencies acatalog:specifier,pnpm install --frozen-lockfilenow reports the lockfile as outdated. For a bare path such as../lib,pnpm installnow also fails the way a fresh resolution does. Before, these installs accepted the existing lockfile #17722.Dependencies declared as
workspace:entries in catalogs now remain in the lockfile whenexcludeLinksFromLockfileis enabled. Frozen installs can restore these links afternode_modulesis removed pnpm/tasks#260.With
dedupeDirectDeps,pnpm installnow compareslink:dependencies by the directory they point at. A project'slink:dependency is removed when the workspace root links the same directory under a different path. It is kept when the root'slink:dependency has the same text but points at another directory. pnpm reports a dependency the root provides as removed only once, when it removes the project's link. The summary shows the package version of a removedlink:dependency pnpm/tasks#293.Hoisted node linker and custom modulesDir
With
nodeLinker: hoisted, a package that runs a lifecycle script or has a patch is now cloned or copied intonode_modules, as with the isolated linker. A build that rewrites one of its files no longer changes the store copy shared with other projects.With
nodeLinker: hoisted, pnpm no longer deletes a directory outsidenode_moduleswhen it removes a package whose scope directory is a symlink.With
nodeLinker: hoisted,pnpm install --filterin a sparse checkout now drops previously installed workspace projects that are missing from disk from the hoistednode_modulestree. It no longer recreatesnode_modulesinside a missing project's directory. Packages that only the missing project used are also removed from the rootnode_modules.With
nodeLinker: hoistedanddedupeDirectDeps,pnpm installnow removes a project'slink:dependency that the workspace root provides, and reports eachlink:dependency it removes. Removing the last scopedlink:dependency of a scope also removes the empty@scopedirectory.With
nodeLinker: hoistedand a custommodulesDir, pnpm now installs a workspace project's dependencies that cannot be hoisted to the root into the project'smodulesDir. The next install that relinks the project removes the copies that earlier installs left in itsnode_modules. A later install restores the project'smodulesDirwhen it was removed. Package directories that pnpm did not install are now also moved to.ignoredin a custommodulesDir.Fixed installs in a workspace whose
modulesDiris an absolute path, including one that goes through a symlink such as/tmpon macOS, or a path that starts with... Dependencies of workspace projects no longer end up outside the workspace, and the root project's dependencies,link:dependencies, and commands are linked into the configured directory.pnpm bin,pnpm root,pnpm run,pnpm exec, andpnpm versionnow use that directory too pnpm/tasks#285.Store and builds
Concurrent installs into a global virtual store no longer wait on each other. A package that needs a build is built in a private directory and moved into the store once its build has finished, so another project never links a half-built package. An install with
--ignore-scriptslinks the packages it does not build from their own store directories, andpnpm store pruneremoves the build directories of installs that were interrupted #15568.Packages that an older pnpm version added to the store now run their install scripts. Before, pnpm could skip those scripts and hardlink the package's files to the store.
pnpm installnow keeps patches to bundled dependencies when it restores a package from the side-effects cache, including files a patch adds #17734.Local installs on macOS now keep cached clones separate from the global virtual store.
pnpm store pruneremoves this cache, so unused cached packages no longer accumulate #17907.pnpm store prunenow stops if a dependency link cannot be read. This keeps installed packages from being removed after an incomplete scan.A repeat
pnpm installnow runs a full install when theruntimeOnFailsetting changes. Before, it printed "Already up to date" and did not install the runtime a project declares indevEngines.runtimepnpm/tasks#303.The sync of an injected workspace dependency now copies a file whose source has reached the filesystem's limit on hard links.
pnpm patch-commitnow copies a file into its scratch directory when the filesystem refuses to hard link it, unless the path is missing or already occupied pnpm/tasks#283.Speed
pnpm installis faster when it clones files from the store, which it does by default on macOS. On a Mac with endpoint security software, a cold install of a project with about 1,350 packages took 29% less time pnpm/tasks#280.pnpm installunpacks packages that contain many files faster. Unpackingtypescripttook 30% less time in our measurements pnpm/tasks#288.Resolving against a registry that sends
Cache-Control: no-cache, such as Azure Artifacts, is fast again when the lockfile already decides the version. pnpm reads the cached metadata for a pinned version, or for a range the lockfile version is proven to win, without a registry request #17758.POSIX bin shims start fewer processes. Running a dependency's bin through its shim from Git Bash on Windows starts 7 processes where it started 15. Installing again replaces the shims already in
node_modules.Windows
pnpm now installs dependencies and runs lifecycle scripts from projects on mapped Windows network drives. When a network share refuses the links in
node_modules, the error now suggests settingnodeLinker: hoistedor moving the project to a local drive #17747.packageImportMethod: autonow tries hardlinking before cloning, as it does on Linux. Installs from a warm store on a Dev Drive are faster. An install no longer fails when the store refuses a hardlink with an access-denied error, and pnpm tries cloning or copying the file next #17809.pnpm runandpnpm setupno longer clear the visible terminal when a project path contains non-ASCII characters.A failed attempt to create a directory junction in
node_modulesno longer leaves a.pnpm-junction-*directory behind.pnpmstarts faster. It loads system libraries such asuser32.dllandshell32.dllthe first time a command uses them, sopnpm --versionloads 11 libraries where it loaded 25.pnpm deploy
pnpm deploynow runs the build scripts of a workspace project that it installs as afile:dependency, without a machine-specificallowBuildskey. AnallowBuildsentry that denies the project still applies #17740.pnpm deployno longer fails when the deployed project depends on a workspace package that setspublishConfig.directory. pnpm installs that package from its publish directory and runs its build scripts #17771.pnpm deploywithout a shared workspace lockfile now resolves a relativeworkspace:path, such asworkspace:../lib, from the source project's directory. It used to be resolved from the deploy target and fail #17804.pnpm deploy --offline --trust-lockfilenow reuses dependencies pinned in the source lockfile from a populated store when registry metadata is unavailable. This works with per-project lockfiles,--legacy, and npm aliases #17888.Other commands and settings
pnpm dist-tagandpnpm unpublishnow offer browser-based authentication when the account's two-factor authentication uses a security key. Before, they asked for a one-time password in that case #17832.pnpm publishwith provenance now downloads Sigstore's current signing configuration before signing. A failed or slow download is retried with the same retry policy and deadline as the signing requests.pnpm packandpnpm publishnow apply the first rule of a.npmignoreor.gitignorethat starts with a UTF-8 BOM.pnpm outdatednow checks dependencies when the project has no lockfile, for example withlockfile: false. TheCurrentcolumn shows the installed version, or the lowest version allowed by the declared range if the dependency is not installed #17811.pnpm self-updatenow updates the project'sengines.pnpmrange along with its pnpm pin, keeping the^or~operator #17732.On Linux and macOS,
pnpm runno longer sometimes reports a lifecycle failure afterCtrl+Cinterrupts a script.Config dependencies use the declared registry
serverTypewhen recording and installing packages pnpm/tasks#236.Relative directory selectors set on
config.filterorconfig.filterProdby anupdateConfighook now resolve from the workspace root even when--diris passed orpnpmruns from a subdirectory #17906.Commands that add settings to
pnpm-workspace.yamlnow fail with an error if the file contains onlynull, and leave the file unchanged. Before, they wrote invalid YAML.Shell tab-completion now completes directory and file paths for path options such as
-C,--dir,--prefix,--store-dir, and--env-file. Before, options without a fixed list of values offered command names #17884.Platinum Sponsors
Gold Sponsors
v12.18.0: pnpm 12.18Compare Source
pnpm 12.18.0 packs, publishes, and installs packages with platform variants on pnpr registries. It also adds per-skill approval of agent skills and
pnpm store addfor offline installs from downloaded tarballs. Repeat installs andverifyDepsBeforeRunno longer read thepackage.jsonof unchanged workspace projects. The release fixes several peer dependency resolution bugs too.Minor Changes
Agent skills
pnpm now names the link to a dependency's agent skill after the skill alone. A skill that the
@acme/kitpackage ships inskills/auth/is linked as.claude/skills/auth, not.claude/skills/pnpm-@acme+kit-auth. The next install replaces links with the old names. pnpm lists the linked skills in a# pnpmblock of each agent skill directory's.gitignore#17455.When two approved packages ship a skill of the same name, or the name is already taken in an agent skill directory, pnpm links the skill as
pnpm-<package>-<skill>. Before, the install failed.pnpm approvenow asks which agent skills to link when a package ships more than one. pnpm records the chosen skills as a list, such aspermissions.<pkg>.skills: [guide, migrate], and does not offer the other skills for approval again. The first time a project approves a skill,pnpm approvealso asks which agent directories to link skills into, and records the answer underskills.dirs.pnpm links agent skills nested in category directories, such as
skills/engineering/implement/SKILL.md, up to three levels belowskills/. Before, it linked only the skills directly underskills/.Platform variants
These features need a registry declared with
serverType: pnpr.pnpm packpacks one archive per entry ofpublishConfig.variants, each platform variant as<name>-<version>~<tag>.tgz.pnpm pack --variant <target>packs only the archive whose entry lists that target.pnpm pack --jsonprints theintegrityandsizeof every archive it writes.pnpm publishpublishes a package'spublishConfig.variants. pnpm uploads every archive before the publish request that references them. Publishing variants to any other registry is refused unless--no-variantsis given, which publishes only the archive that targetsany.pnpm publish --upload-variant <target>uploads the archive of onepublishConfig.variantsentry to the registry's staging area and prints<target>=<integrity>.pnpm publish --variant-integrity <target>=<integrity>then publishes the version from archives that other jobs uploaded. With--recursive, each value names its package as<name>~<target>=<integrity>.pnpm publish -r --batchnow uploads each package archive on its own request and skips archives the registry already holds, so the batch request no longer grows with the archives it publishes. A batch of more than 256 packages still carries every archive inline. Packages withpublishConfig.variantscan be published in a batch. A batch with variants that would reference more than 256 archives on one registry fails withERR_PNPM_BATCH_PUBLISH_TOO_MANY_ARCHIVESpnpm/tasks#244.pnpm publish --provenancesigns one statement that names every archive of a version withpublishConfig.variants. A platform variant's archive is named by the version's package URL with avariantqualifier.Rerunning
pnpm publishafter the version was already published now succeeds when the published version is the same release. pnpm compares the archives, the provenance statement when the rerun signs one, and the dist-tag. When the published version differs, the publish fails withERR_PNPM_PUBLISHED_RELEASE_DIFFERS, which names what differs.pnpm installs the platform variant of a package that fits the host, or the package's own archive when none does. The lockfile records every variant. A version published with variants only, and no archive for other hosts, installs on a host one of the variants fits. On any other host, an optional dependency is skipped, and any other dependency fails with an error that lists the platforms the version is published for.
supportedArchitecturesplatform lists accept platform tags, the same tagspublishConfig.variantsentries name. An entry can state floors and an ABI, such aslinux-x64-manylinux_2_28,darwin-arm64-macos_14_0,linux-x64-napi8orlinux-x64-node127, and any Node.js OS and CPU, such asfreebsd-x64. The spellings accepted before still work.With
supportedArchitecturesset, pnpm also fetches into the store the variants that the other listed platforms need, when it downloads a package with platform variants.pnpr registries
pnpm downloads less metadata from a registry declared with
serverType: pnpr. A large package document leaves out the manifests of rarely picked versions, and pnpm fetches one only when it picks that version. In a benchmark that resolves 787 packages, the package documents shrank from 30.3 MB to 2.5 MB gzipped. pnpm caches these documents inv12/metadata-pnpr, and thepnpm cachecommands cover them.pnpm warns when a registry that is not declared
serverType: pnprturns out to be pnpr. For a registry declaredserverType: pnpr, aminimumReleaseAgelonger than 30 days fails withERR_PNPM_UNSUPPORTED_MINIMUM_RELEASE_AGE.pnpm publishsends release notes to registries declared withserverType: pnpr. A package's notes are the section for its version inCHANGELOG.md, or the notes thatpnpm version -rcomposed from change intents.--release-notes <file>gives the notes from a file, and--no-release-notessends none.--publication-namenames a release published with--batch.In a workspace that uses pnpm's versioning,
pnpm version -r --release-notes <file>puts a summary above the composed notes of the release.pnpm view <pkg>@<version> releaseNotes,pnpm outdated --notes, andpnpm update --interactiveshow the release notes from these registries.Store and hooks
pnpm store addnow prepares the store for offline installs from package tarballs downloaded some other way. Afterpnpm store add ./tarballs/*.tgz,pnpm install --offline --frozen-lockfileinstalls each registry package whose lockfile entry pins one of those tarballs #2978.Custom pnpmfile fetchers can use
fetchers.gitHostedTarball,fetchers.git, andfetchers.binarypnpm/tasks#191.Patch Changes
Installing packages
Running
nodeorpnpm installin a project that pins a Node.js version pnpm has not downloaded yet no longer hangs when aglobalPnpmfileis configured #17530.pnpm installwithenableGlobalVirtualStoreno longer fails on Windows for a dependency from a named registry, such asgh:ornpmjs:#17665.Concurrent installs that share a global virtual store no longer fail with
ERR_PNPM_CMD_SHIM_SYMLINK_BINwhen they link the same executable at the same time #17587.pnpm installandpnpm cinow succeed when dependency skills are approved but no agent skill directory exists. The skills stay unlinked until a directory exists #17574.Commands run from a workspace package now use the same default store as the workspace root. Before,
pnpm addin a package could fail withERR_PNPM_UNEXPECTED_STOREwhen the workspace root was its own mount point and the home store was on another volume, as in a sandbox or a container.A workspace installed with the old behavior may need one
pnpm install --forcefrom the workspace root.pnpm deploynow keeps a symlink in the project whose target is missing from the source, such as a link into anode_modulesdirectory that was removed after the build. Deploy used to drop such a link silently #17571.pnpm installnow links the runtime that an earlierpnpm install --no-runtimeskipped, andpnpm install --no-runtimeremoves a runtime that an earlier install linked #17542.With
enableGlobalVirtualStore,pnpm installagain runs a dependency's build scripts in a project whose global virtual store slot another project already built, unless the side-effects cache has build output to restore for it. A build that writes only outside its own package, such as a git hook installer, now takes effect in every project #17526.Commands of a package whose
binpaths contain excess parent directory segments, such as../dist/cli.js, are no longer missing. Such paths now resolve inside the package #17586.Generated POSIX shell shims now quote their paths, so shell special characters in a path stay literal.
Lockfile and local paths
Packages from the default registry keep plain lockfile keys, even when a prefix such as
npmjspoints at the registry set asregistry. A dependency written with such a prefix shares the plain entry of the same package. The next install rewrites keys that earlier versions qualified this way #17575.pnpm install --frozen-lockfile,pnpm approve-builds, andpnpm rebuildnow accept a lockfile that resolves a*dependency to a prereleaselatestversion. pnpm wrote such a lockfile and then reported it as outdated #17594.pnpm install --frozen-lockfilenow accepts a lockfile written withexcludeLinksFromLockfileandlinkWorkspacePackageson, when a project depends on a workspace package through acatalog:entry. It used to fail withERR_PNPM_OUTDATED_LOCKFILE.pnpm install --frozen-lockfileno longer rejects a freshly generated lockfile whenaddMissingPeerTypesis enabled and an injected workspace package has peer dependencies #17668.Relative local paths in root
overridesnow resolve from the workspace root when each project has its own lockfile #17691.Installing a local directory dependency no longer fails when another project's install is writing a lockfile in that directory.
Relative local paths in root catalogs now resolve for dependencies and peers #17690.
pnpm installnow resolves auto-installed relativeworkspace:andfile:peers from the directory of the package that declares them #17676, #17689.pnpm dedupe --checkleavespnpm-lock.yamluntouched while it looks for deduplication changes. IfconfigDependencieschanged since the last install, the check keeps the lockfile they sync, aspnpm installdoes #17628.pnpm dedupe --checkno longer fails when the only difference is the integrity of a locked version that the registry now reports with a stronger algorithm, such as asha512integrity replacing thesha1shasum it reported when the lockfile was written #17692.Peer dependencies
Peer deduplication no longer gives a project different copies of a dependency across direct and transitive paths when an optional peer has no provider #17666.
Dependencies no longer bind to another project's peer variant when the provider has nested peers, including providers that finish resolving later #17593.
Re-resolving a lockfile no longer preserves optional peer bindings from other projects when no provider is in scope #17592.
pnpm peers checkwarns when a required peer is resolved without a provider declared by the project or its dependency ancestors, withautoInstallPeers: falseanddedupePeerDependents: true. These warnings do not change the command's exit code or causestrictPeerDependenciesfailures.Speed and memory
pnpm install, andpnpm runandpnpm execwithverifyDepsBeforeRun, no longer read thepackage.jsonof workspace projects whose files did not change since the last install. This also holds with a pnpmfile,configDependencies, orsharedWorkspaceLockfile: false. In an up-to-date workspace withsharedWorkspaceLockfile: false,pnpm installno longer runs the install of each project pnpm/tasks#256.A recursive
pnpm runorpnpm execwithverifyDepsBeforeRunset no longer reads everypackage.jsonin the workspace once per project whensharedWorkspaceLockfileisfalse. In a 300-project workspace,pnpm -r exec truewent from 490 ms to 42 ms pnpm/tasks#256.pnpm installmakes fewerstatcalls when it hardlinks files from the store, as few as 12.7.0 made #17543.Picking versions from registry metadata uses less temporary memory.
verifyDepsBeforeRun and repeat installs
With
verifyDepsBeforeRun,pnpm runandpnpm execnow report dependencies as out of date after a dependency is added to thepackage.jsonof a local directory dependency, such as"lib": "file:../lib". Before, the command ran without the new dependency installed.verifyDepsBeforeRunno longer reports afile:directory dependency as out of date after an edit topackage.jsonthat leaves its dependencies unchanged #17697.verifyDepsBeforeRunno longer reports dependencies as out of sync when only theversionfield of a single-project repository changed #17560. The same holds for a workspace project that no dependency can resolve to. A script run after such a change no longer starts an install first.A repeat
pnpm installnow rewrites the bin shims afterextendNodePathchanges. Before, it reported "Already up to date" and the shims kept theNODE_PATHof the previous setting.Adding and updating dependencies
pnpm add <pkg>without a version now saves the range that the other workspace projects declare for the package, or the one a matching override sets. Acatalog:reference still comes first, and thetagsetting is used only when none of these exists pnpm/tasks#191.pnpm updatewith only negated selectors, such aspnpm update '!foo', now leaves the dependencies listed inupdate.ignoreDepsunchanged. Negatedcrate:andpypi:selectors, such as!crate:sha2, now exclude that dependency and update the rest pnpm/tasks#243.pnpm update --latestkeeps three kinds of Cargo dependencies where they are, unless the crate is named on the command line. Before, it moved each one to the newest release and left a workspace that did not build.tower-0-4 = { package = "tower", version = "0.4" }, stays within its requirement if the workspace also declares the crate under its own name.[patch.crates-io]keeps its version, with a warning.pnpm update crate:foo@1, moves it back.Other new major versions are still selected and may need code changes.
pnpm updatenow keeps a Cargo dependency at its current version, with a warning, if the new version lacks a feature the workspace enables on it. If the crate is named on the command line, as inpnpm update --latest crate:sha2, the update fails with an error that names the missing features.pnpm updatenow keeps the operator of every existing Cargo requirement, so~1.0.0is updated to~1.1.0, and an exact=requirement stays exact unless the selector gives a range, such ascrate:foo@^2. ThesavePrefixandsaveExactsettings apply only to new Cargo dependencies. Saved Cargo requirements omit build metadata.pnpm updatenow updates a Cargo dependency whose inline table spans several lines, such as one with a multi-linefeaturesarray. It failed with "its Cargo.toml dependency declaration is not a string or single-line inline table".pnpm updateno longer applies thesavePrefixandsaveExactsettings to Python requirements. AsavePrefixsuch as^madepnpm updatefail in a project with Python dependencies.pnpm updatenow keeps the precision of a~=requirement, so~=1.0is updated to~=1.5and still allows any 1.x release. With--latest, a==1.*requirement is updated to==2.*.Store
pnpm store prunenow keeps packages linked from a configured modules directory pnpm/tasks#230.pnpm store prunenow removes aliases of pruned packages.pnpm store statusno longer reports untouched packages as modified when the global virtual store is enabled. If the installed global-store layout cannot be verified, the command reportsERR_PNPM_STORE_STATUS_UNVERIFIABLEand asks for a reinstall #17631.pnpm store addnow fails withERR_PNPM_FROZEN_STORE_WRITEwhenfrozenStoreis enabled. It used to write package files into the read-only store without recording them, so no install could use them.pnpm cat-index <name>@<version>no longer shows the index of a package whose name differs only in letter case.Other commands and settings
pnpm linknow fails without changingpackage.jsonorpnpm-workspace.yamlwhen the linked package's name is not a valid npm package name. It used to write that name to both files, which made every later install fail #17475.pnpm link <dir>now resolves a relative<dir>against the current directory. In a directory without apackage.json, such as a workspace'spackagesfolder,pnpm link .used to link the nearest project above it into itself #17475.A Node.js version range such as
>=26.13, for example indevEngines.runtime, now resolves to the newest stable release that satisfies it. pnpm picks a prerelease only when no stable release matches #17516.Switching to the pnpm version a project pins no longer writes a temporary
_tmp_*file into the project directory, which file watchers reported on every command #17681.pnpm now reads the
linkWorkspacePackages,injectWorkspacePackages,extendNodePath,frozenStore, andoptimisticRepeatInstallsettings fromPNPM_CONFIG_*environment variables, such asPNPM_CONFIG_LINK_WORKSPACE_PACKAGES=true.--config.extend-node-pathnow applies too.Recursive scripts run with
--sequentialor--workspace-concurrency=1print GitHub Actions log groups again #17629.When
pnpm docscannot open a browser, the URL it prints no longer includes the query string or the fragment.Platinum Sponsors
Gold Sponsors
v12.17.0: pnpm 12.17Compare Source
pnpm 12.17.0 adds
pnpm peers check --global, dependency-group selectors and wildcards inoverrides, and runtime, package manager, Cargo, and Python updates inpnpm outdatedandpnpm update. It also fixes files that other users could not read in Docker images, and repeat installs that missed changes to local dependencies.Minor Changes
pnpm peers checknow accepts--global(-g) to check globally installed packages. After a global install or update, the peer dependency warning now suggestspnpm peers check -g#17504.pnpm outdatedandpnpm updatenow inspect and update package manager and runtime versions indevEngines.packageManager,packageManager,devEngines.runtime,engines.runtime, andruntime:dependencies. Withcargo.enabledorpython.enabled,pnpm outdatedandpnpm updatealso inspect and update Cargo dependencies inCargo.tomlandCargo.lockand Python dependencies inpyproject.tomlandpylock.toml.overridesselectors now support:prod,:optional, and:peerpseudo-selectors that target a single dependency group. They also support*wildcard patterns on parent and target package names. An override with a non-range value, such asnpm:orfile:, no longer adds a peer dependency todependencies. Removing an optional dependency with"-"now also removes the duplicate entry fromdependencies#5391.Patch Changes
Installing packages
Files that pnpm creates in a project now get the permissions the umask gives any new file, such as
0644. Before, several of them were readable only by the user who ran pnpm, which broke Docker images that run as a different user #17435.The fix applies to:
node_modules/.pnpm-workspace-state-v1.json. A different user runningpnpm runreinstalled the dependencies because it could not read this file.pnpm-workspace.yamlpnpm deploypnpm patch-commitpnpm dedupe --checkWhen pnpm edits an existing file, the file keeps its permissions.
pnpm installno longer writes broken dependency links when the project'snode_modulesis a symlink to another directory, such as another project'snode_modules. The install reported success, but the links it wrote did not resolve #17448.Commands installed with
pnpm add --globalnow find the dependencies that pnpm hoists for their package. A package that loads a dependency it does not declare, such as a native addon's platform-specific package, failed with "Cannot find module". Reinstall such a package withpnpm add --globalto update its existing command #17503.When pnpm switches to the version a project pins, it now installs that version's native binary for the current host, even if the project's
supportedArchitecturesexcludes the host. Before, pnpm could not use the pinned version and kept running the installed one. pnpm also repairs a pinned version that an earlier install left without the host's binary.With the global virtual store, a change to a dependency of one package in a dependency cycle now gives every package in that cycle a new directory. Before, the other packages kept their directories and still linked the old copy of the changed package, so the project could load two copies of it #17466.
Packages in a dependency cycle, and packages that depend on one, move to new global virtual store directories once after this update. Those that run a build miss the side-effects cache once.
With
nodeLinker: hoisted, when two workspace projects need the same package version and it cannot be hoisted to the root, each project now keeps the copy installed in its ownnode_modules. Build scripts run in each of these copies. Before, the second project's copy was replaced with a symlink to the first project's, so every repeat install imported it again #17498.The Node.js
latestselector now chooses the newest stable release #17490.Hardlinking from the store now stats each store file once per install. Since pnpm 12.8.0, a store file was stat'ed again for every package that links it. On an offline install of a large workspace, that added up to 15% system CPU #17500.
Repeat installs and local dependencies
pnpm install --frozen-lockfileno longer reports an outdated lockfile right after the install that wrote it. This happened when a pnpmfilereadPackagehook orpackageExtensionschanged the dependencies or peer dependencies of a local directory dependency outside the workspace projects. It affected afile:dependency, an injectedworkspace:../dirdependency outside the workspace patterns, and an injected workspace package left out by--filter#17447 #17473.A repeat
pnpm installnow takes the fast path whenignoredOptionalDependenciesremoves an optional dependency of afile:directory dependency. It used to resolve again on every run.pnpm installnow resolves again after an edit to an injectedworkspace:../dirdependency outside the workspace patterns under a shared lockfile. It used to keep the lockfile unchanged. The nextpnpm install --frozen-lockfilethen failed #17476.pnpm installnow resolves a local directory again after itspackage.jsonchanges when an override or a package extension adds it to the dependencies of a registry package.pnpm install --frozen-lockfilefails on a lockfile that still records the old dependencies of such a directory #17486.With
injectWorkspacePackagesand per-project lockfiles,pnpm installnow updates a project's lockfile when a local tarball that an injected workspace project depends on is replaced. The project's lockfile kept the old version and integrity before.pnpm installnow detects a change to a local tarball or directory that only a pnpmfilereadPackagehook depends on. A repeat install reported "Already up to date" and kept the old contents before pnpm/tasks#227.pnpm installnow relinks aworkspace:orlink:dependency whose link was deleted fromnode_modules. It used to report "Already up to date" and leave the link missing #17485.A repeat
pnpm installreports "Already up to date" again when a pnpmfilereadPackagehook changes the dependencies of a workspace project. Since 12.15.0, every such install ran in full #17468.After an edit to a project's
package.json,pnpm installandverifyDepsBeforeRunnow run the pnpmfile'sreadPackagehook on the edited manifest before comparing it with the lockfile. They could report the project up to date when the hook rewrote the edited dependency to a specifier the lockfile did not record.Adding and updating dependencies
pnpm update --latestwith package selectors now updates the dependencies of the selected packages within their declared ranges. Excluded packages and their dependencies keep their locked versions #17444.pnpm add <pkg>@<tag>now uses a catalog entry set to that same dist-tag. The dependency is saved ascatalog:and the entry stays as written pnpm/tasks#225.When
pnpm addadds a new dist-tag such asvue@legacyto a catalog, the catalog entry records the exact version the tag points to. The same applies to a dependency added without a version when thetagsetting names a dist-tag other thanlatest.pnpm addnow saves the resolved version range of an npm alias. For example,pnpm add v2@npm:vueandpnpm add v2@npm:vue@^3.0.0both savenpm:vue@^3.5.13.Running scripts and commands
Programs that a script or
pnpm execcommand leaves running, such as a browser opened by theopenpackage, now outlive pnpm exactly when they would outlive the command run without pnpm. Before, on Windows, a failed command,Ctrl+C, or a closed terminal ended all of them. pnpm still ends them when it is killed or crashes.When a recursive or parallel run bails, the scripts still running now receive
SIGTERMon Unix and are killed only if they are still running two seconds later. On Windows, everything those scripts started is ended, including detached processes whose parent has already exited. Before, a bail killed them at once #17465.On Windows, the shell shim of a
.cmdor.batbin now runs it under Git Bash when MSYS argument conversion is off, such as withMSYS_NO_PATHCONV=1orMSYS2_ARG_CONV_EXCL='*'. The shim used to start an interactive cmd.exe prompt #17480.pnxandpnpm createnow run the command in the directory selected by--diror--workspace-root. Without either flag, the command still runs in the directory pnpm was started in.pnpm --env-filenow reads files the waynode --env-filedoes. Values are taken as written, so$VARis no longer expanded and Windows paths such asC:\Users\meload unchanged. A file is no longer rejected for its contents.Settings and messages
pnpm versionno longer creates a git commit and tag whengitTagVersionis set tofalse#17460.pnpm publishnow reads thepublishBranchsetting frompnpm-workspace.yamland fromPNPM_CONFIG_PUBLISH_BRANCH. The--publish-branchflag overrides it.pnpmnow accepts--strict-ssland--local-address <ip>on the command line.pnpm doctoruses a 15-second timeout when checking registry connectivity.pnpm-workspace.yamlparse errors now reportERR_PNPM_INVALID_SETTING.The error for a dependency with an invalid name in a project's manifest now names the project's directory. It used to say only "The current package", which did not tell which workspace project to fix #17475.
Platinum Sponsors
Gold Sponsors
v12.16.1: pnpm 12.16.1Compare Source
This release fixes
pnpm installhanging on a cold store in workspaces that install Cargo crates, andpnpm packshipping a file thatfilesexcludes by name.Patch Changes
pnpm installno longer hangs on a cold store in a workspace that also installs Cargo crates or a Rust toolchain.pnpm packandpnpm publishnow apply afilesentry that names a file after the glob and directory entries, as npm does. A file excluded by name, such as!dist/index.js, stays out even when a laterdist/**matches it. A file named by its path, such aslib/secret.js, ships even when a later!lib/*.jsmatches it.pnpm installno longer leaves a broken symlink in an injected workspace dependency when the package links to a file outside its published files and pnpm imports by hardlink. Installing a git dependency now skips internal directory symlinks when importing its files into the store.pnpm installnow relinks a command that a workspace project renames into the projects that depend on it whensharedWorkspaceLockfileisfalsepnpm/tasks#224.pnpm installandpnpm rebuildnow refresh privately hoisted.binshims innode_modules/.pnpm/node_modules/.binafter a dependency build replaces a script target with a native executable #17402.pnpm installnow reads a package's manifest to decide its peer dependencies when it updates an existing lockfile, as it does when it resolves from scratch.Commands,
pnpm --version,pnpm self-update, and invocations with unknown flags now apply the samepackageManageranddevEngines.packageManagersettings when switching to the pinned pnpm version or recording it inpnpm-lock.yaml.--config.<key>flags andlockfileDirnow reach the version switch and lockfile sync on every entry point. Unreadable settings inpnpm-workspace.yamlor the globalconfig.yamlthat do not affect the pin decision no longer block the version switch pnpm/tasks#222.pnpm now accepts the
--cache-dir <dir>flag, as inpnpm install --cache-dir /tmp/pnpm-cache#17422.When the version or range given to
pnpm unpublishmatches every published version, the error now says so and shows the same command with--force. Before, the error suggested runningpnpm unpublish <pkg>@<version>, the command that had just failed.Platinum Sponsors
Gold Sponsors
v12.16.0: pnpm 12.16Compare Source
This release adds a global
--env-fileflag, updates to a symlinkedpnpm-lock.yaml, andpnpm setup --no-modify-path. It also fixes two security issues, in zstd decompression and in signing.Minor Changes
Added a repeatable global
--env-file <path>flag to load environment variables from dotenv-style files before running a command. Later files override earlier files, variables already in the environment are preserved, and loaded variables are visible to user-level.npmrcinterpolation and lifecycle scripts #7111.pnpm can now update a
pnpm-lock.yamlthat is a symlink. List the directories the lockfile may link into in thesymlinkedLockfileTargetDirssetting, in the global config or withPNPM_CONFIG_SYMLINKED_LOCKFILE_TARGET_DIRS. pnpm writes the update to the file the symlink points to if that file is inside one of these directories. The symlink stays in place. pnpm ignores this setting inpnpm-workspace.yaml#17222.Added a
--no-modify-pathoption topnpm setup. It installs pnpm without adding it toPATH, leaving the shell config file, the Windows registry, and the GitHub Actions environment files unchanged.pnpm setupthen prints the lines to add yourself get.pnpm.io#37.Patch Changes
Security
Fixed memory exposure and allocation handling vulnerabilities when processing zstd-compressed data #17388.
Signing in pnpm and pnpr no longer uses arithmetic that may leak the private key through timing. This covers shared artifacts, OCI registry tokens, and OIDC login state advisory.
Installing packages
A dependency symlink that pnpm cannot point at the wanted target now fails the install with an error that names the link. This happens when the filesystem still serves the old link after pnpm removed it, as a
node_modulesserved by a virtual filesystem does. pnpm used to remove the link again without end and crashed with a segmentation fault once the thread ran out of stack.Concurrent workspace installs no longer lose store-index rows when initializing the shared SQLite index #17388.
Agent skill links now keep the same target across installs when a package version is installed with several sets of peer dependencies. An install no longer fails with
ERR_PNPM_AGENT_SKILL_PATH_OCCUPIEDon a skill link that pnpm created for another of those copies #17319.pnpm now fails at once, without retrying, when a downloaded package archive contains a rejected entry path #17205.
pnpm now builds a git-hosted dependency in every new location it links the dependency into, such as a new global virtual store slot or a fresh
node_modules. When the side-effects cache holds the build output, pnpm restores it from there. Before, only the install that fetched the dependency built it. This also fixes dependencies that are already in the store #17224.Changes a
preResolutionhook makes to the lockfiles now take effect. The hook now also runs when pnpm installs from an up-to-date lockfile. An error thrown by the hook now fails the install.A custom fetcher in the pnpmfile can now call
fetchers.directoryto fetch a package from a local directory. The call rejects withERR_PNPM_TARBALL_INTEGRITYif the lockfile pins an archive integrity for the package. Previously, callingfetchers.directoryfailed with aTypeError.packageImportMethod: copynow also applies to packages that have lifecycle scripts or patches. On a filesystem that supports block cloning, such as ReFS or a Dev Drive on Windows, these packages were cloned #17195.With
nodeLinker: hoistedandautoInstallPeers: false, a package that workspace projects use with different peer versions is now installed once per peer variant, so each project's copy resolves that project's peer #17395.Under
nodeLinker: hoisted,pnpm installnow leaves a patched package that is already in place alone. The same holds for a package whose peers include a patched package, such as every package peering on a patchedreact-native#17188.With
nodeLinker: hoisted, an install that stops partway no longer leaves the next install trusting the packages it was replacing. Before, reverting the change that started the stopped install, such as a patch edit, kept the half-replaced package innode_modules.Repeat installs and changed settings
A repeat
pnpm installnow acts on a change to these settings. Before, it reported "Already up to date".storeDirorvirtualStoreDir: it recreatesnode_modules.globalVirtualStoreDir: it links the packages from the new directory.virtualStoreDirMaxLength: it renames the virtual store directories.dangerouslyAllowAllBuildsturned on: it runs the builds it skipped.trustLockfileturned off: it verifies the lockfile.pnpm add,pnpm remove, andpnpm updatenow fail ifnode_modulesdoes not match the current settings. Runpnpm installto recreate it. Previously, these commands removed and reinstallednode_moduleswithout asking. They report:ERR_PNPM_UNEXPECTED_STOREifnode_moduleswas linked from a different store.ERR_PNPM_UNEXPECTED_VIRTUAL_STOREif it was linked from a different virtual store directory.ERR_PNPM_MODULES_BREAKING_CHANGEif it was installed by an incompatible pnpm version, or ifnode_modules/.modules.yamlcannot be read.ERR_PNPM_NODE_LINKER_DIFFif it was installed with a differentnodeLinker.pnpm updatenow also fails withERR_PNPM_HOIST_PATTERN_DIFFand the other errorspnpm addreports for a changed hoist pattern orvirtualStoreDirMaxLength.An install filtered to some workspace projects now fails if
node_moduleswas installed with a differentnodeLinker,hoistPattern,publicHoistPattern, store, or virtual store. Before, it recreatednode_modulesand left the projects it skipped without their dependencies. Apnpm installof the whole workspace still recreatesnode_modulespnpm/tasks#217.pnpm installand theverifyDepsBeforeRuncheck now notice an edited patch file whensharedWorkspaceLockfileisfalse.pnpm installnow takes its fast path in a workspace withpatchedDependencieswhen the previous install ran with another major version of pnpm.pnpm installnow relinks the bins of a workspace package when itsbinfield changes, including with--frozen-lockfileand an unchanged lockfile. A filtered install relinks them in the selected projects, and the next install that covers the remaining projects relinks them there #17324.pnpm installnow removes command shims fromnode_modules/.binwhen a workspace dependency renames or removes an entry from itsbinfield pnpm/tasks#211.Resolving dependencies and the lockfile
A package that a plain range and a
<prefix>:specifier both resolve from one registry is now recorded once inpnpm-lock.yamland installed once. The lockfile key names the registry a package resolved from. When that registry declares a prefix, throughprefixinregistriesor throughnamedRegistries, the package is keyed<name>@<prefix>:<version>however its dependency was written: with the prefix, as a plain range its scope routes to that registry, or through the default registry. Before, the plain range was keyed<name>@<version>, so one tarball was installed twice andinstanceofchecks and module singletons broke between the two copies. The same name and version served by two registries still get separate entries. When several prefixes declare one registry, its packages are keyed by the lexicographically smallest prefix.If a scope you route reaches a registry that also declares a prefix, your next
pnpm installre-keys those entries, which shows up as a lockfile diff. Commit it.pnpm install --frozen-lockfileinstalls the lockfile as recorded.pnpm installnow resolves a scope's packages again when the scope is routed to another registry inregistries. Before, the lockfile kept the versions and integrity resolved from the old registry, so the install failed when the new registry did not serve a locked version or served different content. pnpm records in the workspace state which registry each scope routed to, so a fresh clone without that record installs the lockfile as recorded. Changing the default registry resolves nothing again, andpnpm install --frozen-lockfileis unchanged.When
autoDedupeis off, a workspace project's dependencies now resolve from its own ranges, like they do withsharedWorkspaceLockfile: false. Previously, another project's narrower range could hold them back. For example,ajv: "*"now resolves to the latest Ajv even if another project depends onajv@^6. Packages that a project lists inpeerDependenciesstill follow the versions other projects use.pnpm dedupeand installs withautoDedupe: truestill pick one version that satisfies every range. SetautoDedupe: trueif CI runspnpm dedupe --check#17235.An optional dependency written with a named-registry prefix, such as
work:^1.0.0, now fails the install when it cannot be resolved but the lockfile already has a matching entry from that registry. Such a dependency was skipped, which removed its entries from the lockfile.With
injectWorkspacePackages: true, aworkspace:dependency written as a relative path, such asworkspace:../lib-a, in a workspace package now resolves from that package's directory #17284.Fixed
pnpm installfailing withERR_PNPM_UNSUPPORTED_PROTOCOLwhen a workspace package injected through a relative path, such asworkspace:../lib, hascatalog:dependencies. Their catalog entries now resolve the way they do for a package injected by name #17280.pnpm dedupenow refreshes cached registry metadata while re-resolving locked versions #17208.pnpm dedupe --checkno longer fails when the only difference is adeprecatednotice that the registry added or removed after the lockfile was written #17198.Installs delegated to a pnpr server now resolve every prefix declared for a registry URL. A dependency or lockfile entry that used the second of two prefixes for the same registry, such as
zeta:next towork:innamedRegistries, failed on the server pnpm/tasks#204.Registry revisions are now addressed at
<registry>/<name>@<version>+r<revision>pnpm/tasks#208.Adding packages and global packages
pnpm add <pkg>@<tag>andpnpm add <pkg>@<range>now install the version the tag or range resolves to, even when the saved range allows a newer one #17234.pnpm add <pkg>without a version now installs the version under the dist-tag set by thetagsetting. Annpm:alias or ajsr:dependency without a version resolves that tag too. The setting is read frompnpm-workspace.yaml, the global config,PNPM_CONFIG_TAG, and--config.tag, and defaults tolatest.pnpm addnow accepts the lowercase short options-p,-d,-o, and-eas aliases of--save-prod,--save-dev,--save-optional, and--save-exact.pnpm -D install <pkg>now saves the package to devDependencies. Anaddoption such as-Dor-Ewritten beforeinstall <pkg>was rejected as an unexpected argument.pnpm add -Tnow reports that the short option is ambiguous and points to--save-typesand--tilde.Global packages installed with
pnpm add -gare now linked from the global virtual store, so global packages that share dependencies share one copy. SetvirtualStoreType: projectto give each global install its own virtual store.pnpm add -gand the other--globalcommands now fail withERR_PNPM_CONFIG_CONFLICT_VIRTUAL_STORE_DIR_WITH_GLOBALwhen--virtual-store-diris passed. A custom--hoist-patternfails withERR_PNPM_CONFIG_CONFLICT_HOIST_PATTERN_WITH_GLOBAL. Passing--link-workspace-packages,--shared-workspace-lockfile, or--config.lockfile-dirwith--globalalso fails, with the matchingERR_PNPM_CONFIG_CONFLICT_*_WITH_GLOBALcode.Registries, proxies, and login
pnpm now reads the
strictSslandlocalAddresssettings frompnpm-workspace.yaml, the globalconfig.yaml,PNPM_CONFIG_*environment variables, and--config.*options. This includespnpm self-updateand the download of the pnpm version pinned inpackageManager. Before, pnpm read them only from.npmrcasstrict-sslandlocal-addressand ignored the other sources pnpm/tasks#201.When Corepack runs pnpm and the native binary has to be downloaded, the download now uses the proxy from pnpm's config. That proxy comes from
PNPM_CONFIG_HTTPS_PROXYand the matching variables, the globalconfig.yaml, and the user.npmrc. Previously, the download read the proxy only fromHTTPS_PROXY,HTTP_PROXY, andNO_PROXYpnpm/tasks#215.When the
pnpmpackage downloads its native binary on first run, as it does under Corepack, it now trusts the CA certificates from theca,ca[], andcafilesettings of.npmrc, including the ones scoped to the registry. A registry behind a private CA failed withfetch failedbefore, unlessNODE_EXTRA_CA_CERTSnamed the CA. A project.npmrcis used only while the download is checked against npm's signature. Node.js versions that cannot add CA certificates after startup still needNODE_EXTRA_CA_CERTS.pnpm loginsaves the token in<pnpm config>/auth.iniagain. Since v12.1.0, an unscoped login had made its registry the default for every project that did not name a registry. A login now also removes the token an earlier login saved for that registry or scope under_authin the globalconfig.yaml.pnpm login --scopestill routes the scope through the globalregistriessetting.pnpm no longer warns that a
registriesentry routed through the@scope matches no configured registry. pnpm applied such an entry and its options such asserverTypewhile reporting it as ignored pnpm/tasks#184.Running scripts and other commands
pnpm ci --lockfileandpnpm ci --config.lockfile=trueno longer deletepnpm-lock.yaml.pnpm cinow always keeps the lockfile and runs a frozen install from it.pnpm deploy --legacynow checks the workspace lockfile againstminimumReleaseAgeand the other resolution policies, aspnpm installdoes, and fails withERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATIONwhen a locked version is too new. It used to deploy an older version that is not in the lockfile without a warning #17209.pnpm deploynow keeps a deployed symlink to a directory inside the project even if the directory is not among the deployed files, such as a link intonode_modules#17288.pnpm packandpnpm publishnow keeppnpm.configin the publishedpackage.json. They also always include the filepnpm.configpoints to in the tarball #17210.pnpm -r publish --batchnow sendsPUT /-/pnpr/v0/publish, the batch publish endpoint that pnpr serves.pnpm audit --ignoreandpnpm audit --ignore-unfixablenow exit with a non-zero code when vulnerabilities at or above the audit level remain after ignoring. Before, these commands always exited with code 0.pnpm audit --fixandpnpm audit --interactivenow fail withERR_PNPM_AUDIT_FIX_WITH_IGNOREwhen combined with--ignoreor--ignore-unfixable. Before, the fix ran and the ignore flags had no effect.pnpm -r run <script>now honors therequiredScriptssetting frompnpm-workspace.yaml. If the script is listed there and a selected project does not define it, the run fails withERR_PNPM_RECURSIVE_RUN_NO_SCRIPTand names the projects that lack it.pnpm runandpnpm execno longer report the dependencies as out of date after a lockfile change whendedupePeersistrue#17322.On macOS, killing pnpm while it runs scripts in several projects at once now ends every one of those scripts. Before, a script could keep running after pnpm died.
pnpm run,pnpm exec, andpnpm dlxno longer dump a core file forpnpmitself when a command they started dies from a signal #17204.The
runtimesetting is now read. Settingruntime: falseinpnpm-workspace.yaml,pnpm_config_runtime=false, or--config.runtime=falsestopspnpm install,pnpm add,pnpm dedupe, and the other installing commands from installing the runtimes indevEngines.runtimeandengines.runtime.pnpm dedupenow also accepts--no-runtime.Directory selectors with
legacyDirFiltering: truenow include the project in the named directory along with its descendants. Excluding a directory also excludes that project pnpm/tasks#196.pnpm help --allandpnpm help -anow print the full list of commands. They used to fail with an "unrecognized subcommand" error.Reading the file-creation mask on Linux no longer sets it. pnpm had to replace the mask to learn what it was, and a file another thread created in the window between the two calls was created unmasked.
pnpm now passes an interrupt on to the handler it replaced, with the arguments that handler expects. A handler that asked for the signal's details was called without them. Only a program that embeds pnpm and installs its own
SIGINT,SIGTERMorSIGHUPhandler was affected.Store
pnpm store prunenow keeps the packages that a project still uses when pnpm copied or cloned them intonode_modules. These include patched packages, built packages, and every package installed withpackageImportMethod: copy. Before, the prune removed them, and the next install downloaded them again #7192.pnpm store prunenow keeps the packages of a project when the store path reaches its directory through a symlink. Previously, prune dropped such a project from its list and removed the packages only that project used from the global virtual store.pnpm store prunenow removes the package metadata cache, themetadata*directories in the cache directory. This clears the outdated integrity checksums that causeERR_PNPM_TARBALL_INTEGRITYwhen a registry republishes a version.Speed
pnpm installresolves dependencies faster in large workspaces on Linux, macOS, and Windows on x64 and arm64.Sped up cold installs and
pnpm fetchon macOS. pnpm now links downloaded packages into the virtual store on a separate thread, so a slow link pass no longer pauses the downloads that are still in flight #17271.Sped up installs that add new projects to a workspace with a peer-heavy lockfile. pnpm now reads the lockfile's locked peer versions once for all new projects #17311.
Warm installs no longer read the
package.jsonof every git-hosted dependency. pnpm now stores the manifest of a git-hosted package in the store index when it fetches the package.pnpm update --depth <n>with a largen, such as the--depth=9999thatupdate-browserslist-dbruns, now finishes as fast as--depth Infinity. It used memory and stack in proportion tonon lockfiles with dependency cycles, and could run out of memory or crash #17329.Output and warnings
Output that fills the terminal, such as
pnpm run --streamscript output, is now written once. Before, every new line also rewrote all the lines already on screen #17387.pnpm now warns when a pnpmfile defines the
importPackagehook. pnpm does not run this hook. Use thepackageImportMethodsetting to choose how packages are written tonode_modules.pnpmnow warns when a project'spnpm-workspace.yamlsetsci,globalShims, ortools, and names where to set them instead. These settings were already ignored there without a warning.pnpm config setalso refuses to write them to a project'spnpm-workspace.yaml.pnpm no longer documents the
scriptsPrependNodePathsetting, which has no effect. Apnpm-workspace.yamlthat sets it still loads.Platinum Sponsors
Gold Sponsors
v12.15.0: pnpm 12.15Compare Source
This release lets
pnpm-workspace.yamldelegate settings to other files and config dependencies withinclude, addslockfile.integrityTarget: tarand tar-registry support, accepts zstd-compressed registry responses, and honorsSOURCE_DATE_EPOCHinpnpm deployandpnpm install. It also rejects registry metadata that names a different package than the one requested and speeds up workspace installs and macOS file linking.Minor Changes
pnpm-workspace.yamlcan now delegate settings to other YAML files and to config dependencies through a newincludefield. Each source may define only the settings the root manifest delegates to it. Every setting has one owner. Commands that change settings write each one to the file that owns it. A relative path in an included file is relative to that file. See Splitting Settings Across Files.A config dependency supplies its settings through the YAML file named in the
pnpm.configfield of itspackage.json. The newbootConfigsetting sets the release-age and trust policy pnpm uses to install config dependencies and the pnpm version frompackageManager.Added the
lockfile.integrityTargetsetting. WithintegrityTarget: tar,pnpm-lock.yamlpins the hash of every package's uncompressed tar, so the lockfile no longer changes when a registry recompresses its tarballs or serves them as tars. pnpm learns a version's tar hash from the store or by downloading it once.pnpm audit signaturesties the tar hash to the signed.tgzintegrity.pnpm can now install from a registry that serves uncompressed tars with zstd or gzip content coding.
pnpm-lock.yamlrecords the hash of each tar. Declare such a registry withserverType: pnprinregistriesto keep tarball URLs out of the lockfile. See Tar registries.pnpm now decodes the content coding of tarball downloads itself. It rejects a zstd response whose window is larger than 8 MiB.
Added the
maxTarballUnpackedSizesetting. It caps the bytes the files of one package may unpack to, 4 GiB by default.Registry revisions now always pin the hash of the uncompressed tar, the original included. pnpm records an original selected through the revision protocol, for example with a
+r0specifier, asrevision: 0in the lockfile and fetches it from the registry's digest route. pnpm checks a revision's tar whether the registry sends it as a tar, gzip, or zstd. Revision metadata must list revision 0 and mark the selected revision. pnpm rejects incomplete revision metadata withERR_PNPM_MALFORMED_METADATA.pnpm now accepts zstd-compressed responses. Registries that serve zstd send package metadata in fewer bytes than with gzip, most of all the full metadata that settings such as
minimumReleaseAgeandtrustPolicyread.pnpm deployandpnpm installnow use theSOURCE_DATE_EPOCHenvironment variable as an upper bound for timestamps innode_modules/.modules.yamlandnode_modules/.pnpm-workspace-state-v1.json. With an equivalently prepared deploy target and an epoch no later than the timestamps that would otherwise be recorded, deploying the same project twice produces identical files #17171.pnpm update --interactivenow highlights the row under the cursor in cyan while keeping the colors of its version changes.Patch Changes
Security
pnpm now fails with
ERR_PNPM_REGISTRY_NAME_MISMATCHif a registry returns metadata for a package other than the one requested. Before, pnpm installed the package under the name in the metadata, soallowBuildsrules for the requested package did not apply to it.minimumReleaseAgeExcludePruneandtrustPolicyExcludePrunenow keep exclusions for resolved configuration dependencies and their transitive dependencies #17142.Resolving dependencies
When
pnpm installresolves a dependency again, it now reuses a version that the install already resolved for the same package, as a fresh install does. Before, it kept the version the lockfile pinned and added a second copy of the package. A locked version still stays when nothing else in the install prefers another version. To pin a transitive dependency on purpose, useoverrides#17084.When another workspace project adds a different version of a package, a project's auto-installed peer on that package now moves to the version a fresh install picks. It used to stay on its locked version while any other project still accepted that version #17058.
A package that lists the same dependency in
dependenciesand as an optional peer now gets the peer bound when a project adds a provider for it later. The lockfile now records every peer a package declares, including one its own dependency supplies #17056.pnpm install --prodandpnpm deploy --prodno longer drop a dependency that a package declares both as an optional peer and as its own dependency, when the package resolved it as its own dependency and a dev dependency provides the same package under another alias.pnpm installwith an existing lockfile and a secondpnpm dedupenow keep optional peer bindings that point into a dependency cycle or back into the dependent package. Before, the second run dropped the optional peer binding from the lockfile snapshot key.pnpm installandpnpm dedupenow preserve own-dependency and peer-dependency bindings when reusing a lockfile whose peer suffixes were hashed bypeersSuffixMaxLength.Upgrading a direct dependency in one workspace project now refreshes matching transitive pins in sibling projects during the same
pnpm installpass.With
resolvePeersFromWorkspaceRoot: false, a workspace project no longer binds a peer to a version that only another project's dependencies provide. pnpm now auto-installs a version that satisfies the peer range for that project. Before, the project got a version outside the range, with no peer warning.pnpm install,pnpm add, andpnpm updatenow reuse the lockfile's resolution for dependencies that take part in a dependency cycle, such asmllyandpkg-types. They re-resolved those packages and everything that depends on them from the registry before pnpm/tasks#130.pnpm now measures a
pnpm.overridesentry written as aworkspace:path, such asworkspace:./packages/foo, from the directory holdingpnpm-workspace.yaml. It used to be measured from each package the override rewrote. The install then linked a directory that does not exist, or failed if workspace packages were injected #17010.pnpm installnow removes config dependencies that are no longer declared, including when the entireconfigDependenciessetting is removed. Frozen installs reject a lockfile that still records removed config dependencies.pnpm install --update-checksumsnow re-resolves every locked package and records the integrity the registry reports now.pnpm addandpnpm installnow acceptgist:<id>dependencies and GitHub Gist URLs, and install them from the gist's archive.pnpm pkg fixnormalizes agist:repository the waynpm pkg fixdoes,pnpm licenseslinks a gist package to its gist page, andpnpm sbomreports the repository of a package whoserepositoryfield is agist:shorthand.pnpm addnow reads the package name correctly from a tarball URL under a registry URL that has a path, such ashttps://example.com/npm/, and installs a registry tarball URL with a malformed percent escape as a plain tarball URL. Before, the registry path became part of the name, so a scoped package failed withERR_PNPM_INVALID_PACKAGE_NAME.With
minimumReleaseAgeset, pnpm now revalidates a package's cached full metadata with a single ETag request so an unchanged registry answers with304, even when the registry does not list a publish time for every version. Previously, pnpm downloaded that metadata again whenever the cached copy was older thanminimumReleaseAge. WithresolutionModeset tolowest-directortime-based, pnpm also reuses that metadata across every workspace project that depends on the package.When pnpm revalidates cached registry metadata, it now sends
If-Modified-Sincewhen the registry's modification time is a date without a time, and no longer crashes when the modification time is before 1970.Added protocol versioning between the pnpm client and pnpr server, verified applied resolution policies in resolution responses, and preserved structured error codes across the wire.
Performance
Sped up
pnpm installon macOS. On a 12-core Mac, installing 1352 packages from a warm store took 1.3 seconds, down from 2.2. pnpm now writes package files intonode_moduleswith 4 threads on macOS, whatever the number of CPU cores. Set thePNPM_MACOS_LINK_THREADSenvironment variable to use a different number of threads, or to0to write files with the threads pnpm uses for the rest of the install.pnpm installis faster and uses less memory in large workspaces withsharedWorkspaceLockfile: false. Each project's install no longer reads the manifests of every other workspace project again. Installs that wait for their workspace dependencies now count towardworkspaceConcurrency#16966.Sped up workspace project discovery, dependency resolution, lockfile up-to-date checks, and peer dependency checks in large workspaces #16839 pnpm/tasks#9. On a workspace with 6,833 projects, the lockfile up-to-date check uses about 1 second less CPU time. The peer dependency check at the end of an install now checks linked workspace projects against the manifests already in memory, without reading each
package.jsonagain.Sped up bin linking and build planning during
pnpm install. Package binary targets and shebang runtimes are now precalculated during tarball extraction and served inpnprregistry metadata alongside verifiedrequiresBuild, tarball size, and file-count metadata.Lowered peak memory when pnpm downloads many packuments, such as during lockfile verification with
trustPolicyon Linux. In one 1,800-entry workspace, a lockfile update now peaks at 1.8 to 2.0 GB. It peaked at 2.6 to 3.7 GB before #17020.pnpm installin a Cargo workspace skips crates that an earlier install already unpacked into the store. Before, a repeat install processed every crate inCargo.lockagain.pnpm install --forceunpacks every crate again pnpm/tasks#69.Linking node_modules and workspaces
Concurrent installs that import the same package into one project now all complete. One of them used to fail with
ENOTEMPTYwhen its copy of the package collided with the copy another install had already placed pnpm/tasks#48.pnpm installnow succeeds whennode_modulesis a symlink to an existing directory. Dependency hoisting previously rejected a symlinkednode_modulesas an invalid destination #17157.A filtered first install under the isolated linker now links every workspace project by name into
node_modules/.pnpm/node_modules, not only the selected ones pnpm/tasks#155.With
nodeLinker: hoisted, a filtered install such aspnpm --filter app add <pkg>keeps the rootnode_moduleslinks and bins of the workspace projects it did not select. A project with no dependencies of its own lost them until the next full install.pnpm install --filterwithnodeLinker: hoistedand--prodor--devnow preserves previously installed dependency groups for unselected workspace projects pnpm/tasks#164. Repeat filtered installs also re-resolve when a transitive injected workspace dependency or a linked dependency's version changes.With
sharedWorkspaceLockfile: false,pnpm installnow runs the workspace root's pnpmfile for every project, after the project's own pnpmfile. Before, it ran only the pnpmfile in the project's directory.pnpm installandpnpm peers checknow detect peer dependency issues and report linked package versions in linked projects that usepackage.json5orpackage.yamlpnpm/tasks#172.pnpm installandpnpm peers checkno longer report an unmet peer when a workspace package's peer is provided by a remote tarball URL. pnpm now compares the peer range with the version in the tarball's manifest #17037.pnpm prunenow removes extraneous direct packages fromnode_moduleswhenpackage.jsonandpnpm-lock.yamlare already in sync.pnpm prunealso honors--filter,--recursive,sharedWorkspaceLockfile: false, and thetrustLockfilesetting and--trust-lockfileflag. With the lockfile trusted,pnpm prune --prodworks offline when every package is in the store #16999.Injected workspace packages
pnpm install --frozen-lockfilenow fails withERR_PNPM_OUTDATED_LOCKFILEwhen a local directory dependency or injected workspace package changes a dependency to a different tarball URL or git commit #17129. It also fails when an injected workspace package changes a dependency's named-registry range, such aswork:^2.0.0, to one the locked version no longer satisfies.pnpm install --frozen-lockfilenow accepts the lockfile it wrote for afile:dependency on a directory without apackage.json. It also accepts the lockfile for an injected workspace package that bundles a dependency inbundledDependencies, lists a dependency in bothdependenciesandoptionalDependencies, or publishes from apublishConfig.directorywhosepackage.jsonlists other dependencies than the project's own. Before, these failed withERR_PNPM_OUTDATED_LOCKFILE.The lockfile now records a
catalog:peer dependency of an injected workspace package as written in itspackage.json. It recorded the catalog's range before, so editing the catalog changed the consumer's lockfile entry pnpm/tasks#153.pnpm installnow resolves a git, tarball, or tag dependency of an injected workspace package again when its spec changes. Before, it kept the old version.Repeat installs and
verifyDepsBeforeRunnow re-check projects that inject a modified workspace package, including whensharedWorkspaceLockfileisfalse#17007, and accept aliasedworkspace:ranges on linked dependencies.An injected workspace package that was linked now becomes a copy when the project that depends on it starts providing one of its peers at a version the package's own workspace context lacks. The link used to stay until that dependency was updated, so the package could not find the peer the project provides #17057.
An injected workspace package now keeps only the files its manifest lists after a lifecycle script or a script named in
syncInjectedDepsAfterScriptsrebuilds it. Before, these refreshes copied every file of the package directory into the injected copy, including files thatfilesor.npmignoreleave out. WithdeployAllFiles: truethe copy still gets every file.A script listed in
syncInjectedDepsAfterScriptsnow keeps a package's links to its own files as links in the injected copies, the waypnpm installwrites them, and updates those copies whensharedWorkspaceLockfileisfalse. Before, a directory link the script added became a real directory or went missing withdeployAllFiles, and withsharedWorkspaceLockfile: falsethe copies kept the files from the last install.Running scripts and checking dependencies
Pressing Ctrl+C during
pnpm -r runorpnpm --filter <pkg> runno longer reportsERR_PNPM_RECURSIVE_RUN_FIRST_FAIL. pnpm now ends with the interrupted script's status, such as 130 for a script that SIGINT ended on Linux or macOS #16964.With
enableGlobalVirtualStore, a Node.js resolve hook that a script registers now sees the importer ascontext.parentURLafter pnpm'sNODE_PATHfallback fails to find a bare specifier. Hooks that resolve tsconfigpathsaliases from the importer failed withERR_MODULE_NOT_FOUND#16979.pnpm run,pnpm exec, andpnpm restartnow pass the install flags they were given, such as--lockfile-dir,--modules-dir,--store-dir,--offline, and--ignore-scripts, to thepnpm installthatverifyDepsBeforeRun: installstarts. When that install leaves the dependencies out of date, pnpm now prints a warning.A repeated
pnpm install --filternow finishes without reinstalling when the selected projects are up to date, and so doespnpm installonce filtered commands have installed every project. After a filtered install,pnpm runandpnpm execnow install a selected project whose dependencies changed in between #17011, require the workspace root when a filtered install withpruneDirectDependencies: trueskipped it pnpm/tasks#181, and preserve the recorded ignored build scripts of unselected projects.The check that runs before a script now holds the workspace projects that the selected project depends on, including with
sharedWorkspaceLockfile: falseand for workspace dependencies declared withlink:.--filter=<project>...now selectslink:dependencies as well. In a workspace that has nopackage.jsonat its root,pnpm runandpnpm execno longer reinstall before every command when the dependencies are up to date.verifyDepsBeforeRunand repeatpnpm installruns now applyoverridesbefore comparing a modifiedpackage.jsonwithpnpm-lock.yaml#17127.pnpm installwithoptimisticRepeatInstallnow re-runs whenconfigDependencieschanged,verifyDepsBeforeRunreportsnode_modulesout of date whenuseGitBranchLockfileis enabled and the branch lockfile is missing, and in a single-project repository both checks record a successful lockfile check so later runs skip it until the lockfile changes #16993.pnpm installandverifyDepsBeforeRunnow compare manifests, lockfiles, and patch files by content hash. They notice an edit that kept the file's modification time, ascp -p,rsync -a, or an archive extraction leave it, and a patch file that was copied or touched without changing its content no longer marks dependencies as outdated #16988.Deploying, packing, and other commands
pnpm deploynow deploysfile:dependencies that live outside the workspace directory. It failed with "Refusing to deploy unsafe lockfile path" #16983.pnpm deploynow records the peer dependencies of the workspace packages it copies into the deployed lockfile. Before, pnpm rejected that lockfile with--frozen-lockfilewhen a deployed workspace package declared a peer andinjectWorkspacePackageswas off #17093.pnpm install --frozen-lockfileandverifyDepsBeforeRunnow succeed inside a directory created bypnpm deploy.pnpm deploywrites self-contained workspace and lockfile settings, prunes unusedpatchedDependencies, and preserves workspace-level dependency resolutions on deployed directory dependencies.On macOS,
pnpm deployno longer writes a second, unused copy of every package tonode_modules/.pnpm/@in the deploy directory #17116.pnpm patch-commitandpnpm installnow apply a patch that renames or moves a file of the patched package. Such a patch failed with "rename/copy operations in patches are not yet supported".In workspaces with
sharedWorkspaceLockfile: false,pnpm patch,pnpm patch-commit, andpnpm patch-removenow resolve patch files andpatchedDependenciesentries at the workspace root.pnpm installchecks configured patches across all workspace projects before reporting unused patches.pnpm packandpnpm publishno longer include editor swap files such as.*.swp, macOS._*files,.lock-wscript,.wafpickle-*,build/config.gypi, orarchived-packages/in the tarball. Naming one of these files infilesstill includes it #16955.pnpm packandpnpm publishnow support extended glob patterns and brace ranges such aspart{1..3}.jsandpart{a..c}.js, including descending ranges, steps, and zero padding, infiles,.npmignore, and.gitignore. Explicitly listed internal directory symlinks are preserved below excluded directories, entry points honor nested ignore files, ignore negations can re-include default-excluded logs and backup files, and nested lockfiles follow the package's file selection rules.Trusted publishing with OIDC now works with registries whose URL has a path, such as
https://registry.example/npm/private/. pnpm previously sent the token exchange request to the root of the registry host.pnpm deprecateandpnpm unpublishnow work for packages whose registry metadata is larger than 10 MiB, such astypescript. They accept up to 50 MiB, the same limit aspnpm owner.pnpm owner lsnow lists the owners of a package on the npm registry. It reported every package as not found.pnpm licenses list --prodnow includes optional dependencies, including transitive ones. Pass--no-optionalto leave them out.pnpm licenses listalso reports no licenses for workspace projects not recorded in the lockfile, errors whenpnpm-lock.yamlis missing, and formats empty results as the requested text or JSON pnpm/tasks#174.pnpm whynow reads each selected workspace project's lockfile and modules directory whensharedWorkspaceLockfileisfalsepnpm/tasks#169.pnpm pkg fixnow converts arepositorystring such asgithub:pnpm/exampleto the object form, asnpm pkg fixdoes. It also normalizes a GitHub, GitLab, or Bitbucket repository URL the waynpm pkg fixdoes #16980.Configuration and setting up pnpm
Registry credentials and TLS settings passed with
--config, such as--config.//registry.example.com/:_authToken=<token>, are now applied. They take precedence over the same settings in.npmrcfiles.pnpm now reads only the settings it needs to decide whether to switch to the pnpm version a project pins. A setting outside them can no longer fail that decision or change its outcome. For example,
pnpm --versionno longer fails in a pinned project whosepnpm-workspace.yamlhas a setting this pnpm cannot read. Projects that pin neither pnpm nor a runtime skip this check without reading any settings.When pnpm switches to the version a project pins, an option only the pinned pnpm knows now reaches that pnpm when it comes immediately before the command name, as in
pnpm --new-flag install. When switching forpnpm --versionor an unrecognized command line, pnpm also honors--color,--no-color,--reporter, and--loglevelwherever they appear on the command line.pnpm self-updatenow updates the project's pnpm pin when Homebrew installed pnpm or Corepack runs it, leaving the global pnpm alone #17001. Run inside a workspace package,pnpm self-updateupdates the pin in the workspace root's manifest, including inpackage.yamlorpackage.json5.pnpm setupnow completes when Windows registry environment values cannot be read or written. It prints PowerShell commands to configurePNPM_HOMEandPATHwithout registry access #17167.pnpm setupnow succeeds when it cannot tell which shell configuration file to update, for example in a container whereSHELLis not set. It installs pnpm and prints thePNPM_HOMEandPATHlines to add yourself. Previously it failed withERR_PNPM_UNKNOWN_SHELL, and so did the installer script at get.pnpm.io #16973.In StackBlitz WebContainers,
pnpmno longer crashes intermittently withParking not supported on this platform, and running a command that does not exist now reports that the command was not found. Previously it sometimes failed with a generic error.Platinum Sponsors
Gold Sponsors
Configuration
📅 Schedule: (in timezone Europe/Berlin)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.
427eb9e1c1to155a0f5ca3Update pnpm to v12.15.0to Update pnpm to v12.16.0155a0f5ca3to6ec62d035aUpdate pnpm to v12.16.0to Update pnpm to v12.16.16ec62d035atoc621301701Update pnpm to v12.16.1to Update pnpm to v12.17.0c621301701toaa1117738bUpdate pnpm to v12.17.0to Update pnpm to v12.18.0aa1117738btod310a844b6Update pnpm to v12.18.0to Update pnpm to v12.20.0d310a844b6toac9de789b0Update pnpm to v12.20.0to Update pnpm to v12.21.0View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.