Minor Changes
-
Experimental. Added support for global virtual stores. When enabled,
node_modules
contains only symlinks to a central virtual store, rather tonode_modules/.pnpm
. By default, this central store is located at<store-path>/links
(you can find the store path by runningpnpm store path
).In the central virtual store, each package is hard linked into a directory whose name is the hash of its dependency graph. This allows multiple projects on the system to symlink shared dependencies from this central location, significantly improving installation speed when a warm cache is available.
This is conceptually similar to how NixOS manages packages, using dependency graph hashes to create isolated and reusable package directories.
To enable the global virtual store, set
enableGlobalVirtualStore: true
in your rootpnpm-workspace.yaml
, or globally via:pnpm config -g set enable-global-virtual-store true
NOTE: In CI environments, where caches are typically cold, this setting may slow down installation. pnpm automatically disables the global virtual store when running in CI.
Related PR: #8190
-
The
pnpm update
command now supports updatingcatalog:
protocol dependencies and writes new specifiers topnpm-workspace.yaml
. -
A new
catalogMode
setting is available for controlling if and how dependencies are added to the default catalog. It can be configured to several modes:strict
: Only allows dependency versions from the catalog. Adding a dependency outside the catalog's version range will cause an error.prefer
: Prefers catalog versions, but will fall back to direct dependencies if no compatible version is found.manual
(default): Does not automatically add dependencies to the catalog.
-
Added two new CLI options (
--save-catalog
and--save-catalog-name=<name>
) topnpm add
to save new dependencies as catalog entries.catalog:
orcatalog:<name>
will be added topackage.json
and the package specifier will be added to thecatalogs
orcatalog[<name>]
object inpnpm-workspace.yaml
#9425. -
Semi-breaking. The keys used for side-effects caches have changed. If you have a side-effects cache generated by a previous version of pnpm, the new version will not use it and will create a new cache instead #9605.
-
Added a new setting called
ci
for explicitly telling pnpm if the current environment is a CI or not.
Patch Changes
- Sort versions printed by
pnpm patch
using semantic versioning rules. - Improve the way the error message displays mismatched specifiers. Show differences instead of 2 whole objects #9598.
- Revert #9574 to fix a regression #9596.
Platinum Sponsors
|
|
Gold Sponsors
|
|
|
|
|