pnpm 11.28.10
pnpm 11.28.10 stops pnpm store prune from deleting other stores when cacheDir points to their parent directory. It also fixes globally installed commands that load hoisted dependencies, and repeat installs that missed changes to local dependencies.
Patch Changes#
Installing packages#
-
pnpm store prunepreserves other stores and global package data whencacheDirpoints to their parent directory. -
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. -
pnpm prune --prodno longer fails withERR_PNPM_EXDEVwhennode_moduleswas copied from an earlier Docker build stage #17424. -
pnpm installnow retries a Node.js runtime zip download when the connection drops partway through. A download that still fails names its URL. Before, a single dropped connection ended the install withterminated#17411. -
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.
-
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. -
The Node.js
latestselector now chooses the newest stable release #17490. -
The standalone
@pnpm/exebuilds now embed Node.js 26.13.0.
Repeat installs and lockfiles#
-
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. -
Merging git branch lockfiles now keeps a workspace project whose directory is named
__proto__. It was dropped from the merged lockfile before pnpm/tasks#59.
Adding and publishing packages#
-
pnpm addno longer rewrites a catalog entry set to the dist-tag that the dependency resolves through. For example, an entrybetastaysbetaafterpnpm add foo@betaorpnpm add foo. Before, the entry was replaced with the version the tag pointed to pnpm/tasks#225. -
pnpm packandpnpm publishnow always include the binary file declared by a stringbinfield inpackage.json, even whenfilesor.npmignorewould otherwise exclude it. -
When the version or range given to
pnpm unpublishmatches every published version, the error now says so and shows the same command with--force. It suggested runningpnpm unpublish <pkg>@<version>, the command that had just failed.
Running commands#
-
Every command, including
pnpm --version,pnpm self-update, and invocations with unknown flags, now applies 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. -
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. -
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.