pnpm 11.26
pnpm 11.26 brings the JavaScript CLI level with what pnpm 12 gained over the
past two weeks: workspace: ranges in catalogs, the supply-chain flags on
remove and update, pnpm change check for CI, and pnpm deploy without
injected dependencies.
Minor Changes
Catalogs can hold a workspace: range
A catalog entry may now be a
workspace: range, so the version a workspace dependency is linked by lives in
pnpm-workspace.yaml with every other version:
catalog:
'@example/utils': workspace:^
Both protocols are replaced on publish.
Supply-chain flags on remove and update
pnpm remove and
pnpm update accept
--trust-lockfile, --no-trust-lockfile, --trust-policy,
--trust-policy-exclude, and --trust-policy-ignore-after. pnpm remove
checks the whole lockfile against the active policies unless --trust-lockfile
is set, because removing a package rewrites it.
pnpm change check
pnpm change check validates the versions already
committed in the workspace against the versioning.epics bands and
versioning.fixed groups, without reading any change intent. That makes it the
step to run on every pull request: a version that drifted out of its band is
caught where it was introduced rather than at release time, and every violation
is listed at once.
pnpm deploy without injected dependencies
pnpm deploy no longer requires injectWorkspacePackages. Where
a workspace dependency's peer has more than one possible version in the deployed
graph the binding is ambiguous, and the deploy fails with
ERR_PNPM_DEPLOY_AMBIGUOUS_PEER naming the conflicting versions. Pin the peer
with overrides to deploy without injection
(#9386).
Build approval before the package is installed
pnpm add --allow-build=!<pkg> now denies a build rather than dropping the
decision, global installs included. Previously pnpm add -g left the package
undecided, so the post-install prompt offered the very build you had just
rejected.
pnpm approve-builds <pkg> and
pnpm approve-builds !<pkg> also save a decision when nothing is awaiting
approval, warning about a package that is not awaiting one instead of erroring
out (#14067).
Other changes
- Fetch and tarball errors and retry logs hide URL credentials, query strings, and fragments that could expose secrets.
pnpm auditexcludes ignored advisories from the vulnerability totals and severity counts, and reports them separately (#14535).--fixworks without a value and when another flag follows it, and--fix=overriderespectssaveExactandsavePrefix(#13261, #11523).pnpm installaccepts a symlinked lockfile again when config dependencies are unchanged, the arrangement Bazel and Nix use. Writes through a symlinked lockfile stay blocked, and a lockfile with a byte order mark survives a config dependency update (#14372).pnpm installrelinks workspace packages whenpublishConfig.linkDirectorychanges; a frozen install asks for the lockfile to be regenerated (#14488).pnpm install --node-linker=hoistedno longer downloads skipped optional dependencies whennode_modulesalready exists (#14139).- An auto-installed optional peer satisfies its declared range even when the workspace root uses a version outside it (#13867).
- The JavaScript pnpm can again switch to a project's pinned pnpm version on a host with no matching native binary. Where a version requires an unavailable binary, the error names the unsupported host (#13622).
pnpm self-update,pnpm with, and automatic version switching no longer wait through registry retries when a configured registry has no signatures andregistry.npmjs.orgis unavailable (#14483).- Node.js downloads from
nodeDownloadMirrorscarry the URL-scoped npm credentials, bearer tokens, basic auth, andtokenHelperincluded (#14334). - Relative
scriptShellpaths resolve from the workspace root; a bare command name such asbashstill goes throughPATH(#14422). - Argument forwarding on Windows with
shellEmulatorpreserves trailing backslashes, line breaks, and literal shell expressions (#14548). pnpm importpreserves the project-local lockfile whenlockfileDirpoints elsewhere, and restores the destination lockfile on failure (#14563).catalogModeand--save-catalogno longer move local paths, tarballs, orworkspace:<path>specifiers into catalogs (#14437).--side-effects-cache,--no-side-effects-cache, andPNPM_CONFIG_SIDE_EFFECTS_CACHEtoggle only the local cache, leaving a remote cache configured insideEffectsCachein place.pnpm unpublishhandles a registry's two-factor challenge through web authentication or a one-time password prompt (#14464).pnpm outdatedandpnpm updatefollow GitHub Actions referenced with the self-repository syntax,uses: $/.github/actions/setup.pnpm removeaccepts--unsafe-perm.
For the complete list of changes, see the v11.26.0 release notes.
