pnpm 12.13.0
- Added the `pnpm profile` command to view and update registry user profile settings
- Added `pnpm token` to list, create, and revoke authentication tokens on the registry
- Added the `storeIndexFormat` setting; set it to `files` to keep a store's package index as one file per package instead of the SQLite `index.db` for stores on a network filesystem used by several machines at once
- Added the `nodePackageMap` setting grouping the package-map settings, with `mode: write-only` (writes `node_modules/.package-map.json` without Node.js loading it) and `mode: load` (also makes Node.js load the map) plus `type`, which replaces `nodePackageMapType` deprecated · inferred, marked in the notes below
- `pnpm install` resolves Python dependencies faster; with `--lockfile-only`, a 10-dependency project resolves in about 4 seconds instead of about 40
- When the index publishes a PEP 658 metadata file beside each wheel, pnpm downloads only the wheels of the releases it selects
- A repeat install against an existing lockfile no longer reads registry metadata for the dependencies it takes from that lockfile
- `pnpm install` with `enableModulesDir: false` verifies packages already in the store during dependency resolution and checks package files in parallel, removing a 19-second pause on a 5,100-package install with the store on a network filesystem behavior changed · inferred, marked in the notes below
- `pnpm setup` now works when pnpm was installed with npm on macOS instead of leaving a `$PNPM_HOME/bin/pnpm` that could not run
- pnpm runs again after `pnpm setup` when `globalShims` enables pnpm, instead of failing every command with a shim-pointing-back error
- A pnpm built for the MinGW target on Windows now installs the MinGW Rust toolchain named in `rust-toolchain.toml` instead of the MSVC toolchain
- On macOS, `pnpm install` no longer fails with `ERR_PNPM_LOCKFILE_WRITE_FILE` on virtiofs or SMB shares, falling back to a regular `fsync` when a full sync is rejected
- On macOS, `pnpm install`, `pnpm patch-commit`, and other commands that load a pnpmfile no longer hang at random
- `pnpm install` puts the executables of a Python build backend's requirements on the `PATH` while the backend runs, so projects built with `uv_build` install
- Removing a `link:` dependency now also removes its symlink from `node_modules` when `nodeLinker` is `hoisted`
- `pnpm-lock.yaml` no longer records the tarball URL of a package installed from a scoped registry when pnpm can rebuild that URL from the registry
- `pnpm pack` and `pnpm publish` pack only `package.json`, the README, the license, and the files named in `main` and `bin` when `files` is an empty array, instead of every file in the package
- `pnpm audit` and `pnpm audit signatures` no longer check runtimes installed through `devEngines.runtime` against the npm package of the same name, which had been reported as having an invalid registry signature
- `pnpm pipeline` runs the root's tasks when `pnpm-workspace.yaml` lists only the root in `packages` or omits `packages`, and reports when a full run has no projects to run
2 changes to check, marked in the notes below
From pnpm
This release adds the pnpm profile and pnpm token commands, the storeIndexFormat: files setting for stores shared over a network filesystem, and faster Python dependency resolution.
Minor Changes
-
Added the
pnpm profilecommand to view and update registry user profile settings. -
Added
pnpm tokento list, create, and revoke authentication tokens on the registry. -
Added the
storeIndexFormatsetting. Set it tofilesto keep a store's package index as one file per package instead of the SQLiteindex.db, for a store on a network filesystem that several machines use at once. SQLite's locking does not work across machines, so concurrent installs on such a store could corruptindex.db. -
Added the
nodePackageMapsetting, which groups the package-map settings.nodePackageMap.mode: write-onlywritesnode_modules/.package-map.jsonfor other tools without making Node.js load it.mode: loadalso makes Node.js load the map, likenodeExperimentalPackageMap: true.nodePackageMap.typereplacesnodePackageMapType. The old settings still work #14937. deprecated · inferrednodePackageMap: mode: write-only type: loose
Patch Changes
Setting up pnpm
-
pnpm setupnow works when pnpm was installed with npm on macOS. It installed pnpm from npm'sbindirectory and left a$PNPM_HOME/bin/pnpmthat could not run #16855. -
pnpm runs again after
pnpm setupwhenglobalShimsenables pnpm. Every command failed with "the global target of the pnpm shim points back at the shim" #16874. -
A pnpm built for the MinGW target on Windows, such as the MSYS2 package, now installs the MinGW Rust toolchain that
rust-toolchain.tomlnames. It used to install the MSVC toolchain.
Installing packages
-
On macOS,
pnpm installno longer fails withERR_PNPM_LOCKFILE_WRITE_FILEwhen the project is on a virtiofs or SMB share. pnpm now falls back to a regularfsyncwhen the file system rejects a full sync #16846. -
On macOS,
pnpm install,pnpm patch-commit, and other commands that load a pnpmfile no longer hang at random. -
pnpm installnow puts the executables of a Python build backend's requirements on thePATHwhile the backend runs. Projects built withuv_buildnow install. Before, they failed with "uv-build was not properly installed". -
Removing a
link:dependency now also removes its symlink fromnode_moduleswhennodeLinkerishoisted#16884. -
pnpm-lock.yamlno longer records the tarball URL of a package installed from a scoped registry, such as one set by@types:registry=, when pnpm can rebuild the URL from that registry #16866.
Packing, auditing, and pipelines
-
pnpm packandpnpm publishnow pack onlypackage.json, the README, the license, and the files named inmainandbinwhenfilesis an empty array. They used to pack every file in the package #16889. behavior changed · inferred -
pnpm auditandpnpm audit signaturesno longer check runtimes installed throughdevEngines.runtime, such asnode@runtime:24.21.0, against the npm package of the same name.pnpm audit signaturesreported these runtimes as having an invalid registry signature #16869. -
pnpm pipelinenow runs the root's tasks whenpnpm-workspace.yamllists only the root inpackagesor omitspackages, aspnpm -r rundoes. A change to a root file in such a workspace no longer triggers a full-run warning. When a full run has no projects to run,pnpm pipelinenow reports that no projects are selected #16849.
Performance
-
pnpm installresolves Python dependencies faster. With--lockfile-only, a project with 10 dependencies now resolves in about 4 seconds, down from about 40. When the index publishes a metadata file beside each wheel (PEP 658), as PyPI does, pnpm downloads only the wheels of the releases it selects. -
A repeat install against an existing lockfile no longer reads registry metadata for the dependencies it takes from that lockfile. On a warm store this removes thousands of metadata lookups from a repeat install of a large workspace.
-
pnpm installwithenableModulesDir: falsenow verifies the packages already in the store while the dependencies resolve, and checks a package's files in parallel. On a 5,100-package install with the store on a network filesystem, this removed a 19-second pause between resolution and fetching.