pnpm 11.28.13 includes a security fix. After the default or a scoped registry changed, pnpm install could skip the minimumReleaseAge and trustPolicy checks against the new registry. It also fixes pnpm audit dropping advisories with string ids, offline installs failing the minimumReleaseAge check, and peer and injected-package resolution bugs.
Patch Changes
Security
-
pnpm installnow re-verifies lockfile resolutions when the default registry or a scoped registry changes. Before, it reused the result cached for the previous registry and skipped theminimumReleaseAgeandtrustPolicychecks against the new one #18070. -
pnpm dlxnow keys its cache on activeoverrides,packageExtensions,minimumReleaseAge,trustPolicy,trustLockfile, andblockExoticSubdepssettings. Cached installs created under looser settings are no longer reused when stricter policies apply #18075.pnpm dlx --allow-build=!<pkg>now denies build scripts for<pkg>, including the executed package itself. Denied packages also skip interactive build approval. -
pnpm auditnow reports advisories whoseidis a string. Such advisories were dropped, andpnpm auditreported no known vulnerabilities #18184.
Installs that failed
-
Fixed an offline install failing the
minimumReleaseAgelockfile check withERR_PNPM_NO_OFFLINE_METAafter an online install resolved the same packages with the same cache directory. The check now reads publish times from the metadata that the resolution cached #18063. -
pnpm no longer stalls on a patch file whose
diff --gitline contains a long run of spaces. -
Installing an injected local package no longer fails with a "no such file or directory" error when another process renames or removes files in that package while pnpm lists them. This happened most often on macOS in workspaces with
sharedWorkspaceLockfile: false, where the install of the package itself writes its lockfile at the same time. -
Fixed
pnpm install --merge-git-branch-lockfiles --frozen-lockfilefailing withERR_PNPM_OUTDATED_LOCKFILEwhen a project sets or removespublishConfig.directory,publishConfig.linkDirectory, ordependenciesMeta. Lockfile merging now preserves and reconcilespublishDirectory,linkDirectory, anddependenciesMetaon importers. -
Tarball URLs that reject HEAD requests with 405 Method Not Allowed now fall back to a GET request during resolution.
Resolving and linking dependencies
-
With
autoInstallPeers, an optional peer is no longer bound to a version outside its range that only another dependency's subtree brings in. Before, adding an unrelated dependency could flip that binding and rewrite the peer suffixes of other projects in the lockfile #18162. -
pnpm installnow updates a peer that it auto-installs for a localfile:dependency when the peer'scatalog:entry changes. Before, the old peer version stayed locked. -
pnpm installresolves thelink:and bare relative path dependencies of an injected workspace package from that package's directory. They were resolved from the lockfile directory, so the installed link could point outside the workspace. Frozen installs now accept such dependencies pnpm/tasks#274. -
When multiple
overridesselectors match a dependency, pnpm now picks the selector with the narrower version range regardless of the order in which the overrides are declared #18071. -
Patches that add lines to the end of a file without a final newline now install the whole file. pnpm dropped the last added line when the patch also marked it with
\ No newline at end of file#18156. -
Project
engines.nodechecks now use the Node.js runtime that pnpm links for the dependency groups being installed. If the lockfile records that runtime, the check uses its resolved version. Production installs ignore a runtime declared only indevEngines.runtimepnpm/tasks#302.
Scripts and builds
-
pnpm --if-present start,pnpm run --if-present start, andpnpm restart --if-presentnow exit with code 0 when a project has neither astartscript nor aserver.jsfile #18073. -
pnpm approve-buildswithout package arguments or--allnow fails withERR_PNPM_APPROVE_BUILDS_NON_INTERACTIVEwhen packages are awaiting approval in CI or without an interactive terminal.pnpm dlxand global installs also skip automatic build-approval prompts in CI, leaving pending builds unapproved.
Workspaces and lockfiles
-
Combining
--filterand--filter-prodwith exclusion selectors such as!pkgnow evaluates all selectors together in command-line order. An exclusion passed on one flag while inclusions were passed on the other no longer selects every workspace project. -
pnpm -r fetchnow fetches each selected project's lockfile whensharedWorkspaceLockfileisfalse. Use--filterto limit which projects are fetched #18152. -
pnpm peersin workspaces withsharedWorkspaceLockfile: falsenow checks each selected project'spnpm-lock.yaml. -
pnpm cinow validates thatpnpm-lock.yamlexists and matchespackage.jsonbefore removingnode_modules.pnpm cleanandpnpm cinow honor--filter,--filter-prod, and--workspace-root.pnpm cleanandpnpm cialso clean rootnode_modulesin workspaces without a rootpackage.json.pnpm clean --lockfilenow removes per-project lockfiles and lockfiles inside a customlockfileDir. -
pnpm clean,pnpm purge, andpnpm cikeep files outside the project untouched whenmodulesDirpoints outside the project root. Whennode_modulesis a symlink,pnpmnow unlinks the symlink without modifying its target #18072. -
pnpm importnow preserves locked versions fornpm:aliased dependencies when importing frompackage-lock.json,npm-shrinkwrap.json, oryarn.lock.pnpm importalso parses Yarn Classicyarn.lockfiles that reference__metadatapackage names without treating them as Yarn Berry lockfiles.
Updating, packing, and publishing
-
Fixed GitHub Actions support in
pnpm updateandpnpm outdated. Updating a workflow step with a major or minor version comment such as# v4or a prose comment now formats the updated version comment cleanly. Negated action selectors such as!actions/cache/savenow exclude only the targeted subpath actions. Passing only negated action selectors still updates packages. Previously, negated action selectors skipped package updates.pnpm outdatednow reports every distinct outdated version when several workflows pin the same action at different versions. -
pnpm update -g --latestnow upgrades global runtimes (node,deno, andbun) andnpm:-aliased global packages across major versions. -
pnpm update --changesetnow generates a changeset when a.changesetdirectory exists orversioningis configured inpnpm-workspace.yaml, without requiring.changeset/config.json. It also respectsversioning.ignorealongside.changeset/config.json. -
pnpm version -rnow runs each bumped package'spreversion,version, andpostversionscripts unless--ignore-scriptsor--dry-runis set.pnpm version -r --dry-run --jsonnow prints the planned releases as a JSON array. -
pnpm lane <lane> --filter <selector>now rejects partial moves of aversioning.fixedgroup withERR_PNPM_VERSIONING_CONFLICTING_CONFIGbefore writingpnpm-workspace.yaml. -
pnpm packnow accepts--ignore-pnpmfileand--ignore-scripts, andpnpm publishaccepts--ignore-pnpmfile. With these flags, a package can be packed without running the project's pnpmfile or lifecycle scripts #18132. -
pnpm packandpnpm publishin a workspace now keep the workspace's ignore rules when a package's.npmignoreis removed while pnpm lists the package's files. -
pnpm -r pack --outnow expands%sand%vplaceholders only in the--outtemplate. Literal%sand%vsegments in the working directory path stay unchanged. -
pnpm -C <dir> publish <tarball|folder>andpnpm --dir <dir> publish <tarball|folder>now resolve relative tarball and directory arguments against<dir>. Git checks duringpnpm publishalso inspect the target directory.
Other commands and settings
-
updateConfigandafterAllResolvedhooks in.pnpmfile.cjsthat returnundefined,null, or a non-object value now fail withERR_PNPM_CONFIG_IS_UNDEFINEDandERR_PNPM_BAD_AFTER_ALL_RESOLVED_RETURN. -
pnpm list --parseable --longnow keeps<name>@onlink:andfile:dependencies whose path or peer suffix contains@, such aslink:../@scope/pkg. Aliased scopedfile:dependencies whose path contains@also keep<name>@inpnpm list. -
pnpm whyno longer merges distinct localfile:directory dependencies that share the same package name across projects with dedicated lockfiles (sharedWorkspaceLockfile: false). -
pnpm pkgnow reads and writes the project manifest as written on disk.pnpm pkg getno longer reports syntheticruntime:dependency entries fromdevEngines.runtimeorengines.runtime.pnpm pkg setandpnpm pkg deletenow preservedevEngines.runtime,engines.runtime, and empty dependency objects set with--json. -
pnpm pmnow works after CLI flags such as--dirand afterpnpm with current.pnpm with currentalso accepts subcommand boolean flags such aspnpm --bare with current initahead ofwith. -
pnpm envcommands (use,list, andremove) now accept Node.js version specifiers with a leadingv, including prerelease versions such asv22.0.0-rc.1. -
pnpm doctornow checks write access for the cache, store, and global bin directories before they have been created. Previously,pnpm doctorreportedno write accesson fresh environments.pnpm doctornow probes whether reflinks or hardlinks work from the store into the project's link target and warns when neither does.
Output and error messages
-
pnpm installwithnodeLinker: hoistedno longer counts missing packages as removed. This fixes inflated removal counts for skipped optional dependencies #18178. -
pnpm outdated --jsonandpnpm outdated --format=jsonnow write reporter warnings tostderr. Warnings previously appeared onstdoutbefore the JSON output. -
pnpm now reports
globalPackagesConfigin the globalconfig.yamlas a setting of a newer pnpm version. It no longer suggests a similarly named setting. -
pnpmwarns when anupdateConfighook changesregistriesand some routes still use their configured registry. The warning names those routes and points toregistriesByScope. -
pnpm cat-filenow reportsERR_PNPM_INVALID_HASHwhen given an empty, malformed, or truncated digest such assha512-.
Platinum Sponsors
|
|
|
|
|
|
|
Gold Sponsors
|
|
|
|
|
|
|
|
|
|
|
|