pnpm
12.21.0 · 13 Nov 2026MIT358.4M / weekRepositoryHomepagenpmAtom feed
12.23.0 is the newest release of 12.x.
In short
3 security10 new1 faster69 fixed
- Security
POSIX bin shims now take
cygpathandwslpathfrom the system default path on Cygwin, MSYS2, and WSL2 so a dependency cannot redirect another package's shim #14866. - Security
pnpm installwarnings no longer carry the text of a package's deprecation notice, naming only the deprecated package and version #15099. A deprecation warning names the newest non-deprecated version when one exists, and control characters and line separators are stripped from package identifiers and warnings. - Security
pnpm installand other commands that report configuration warnings now warn when environment variables in project.npmrccredentials are ignored #15051.
Release note
pnpm 12.6.0 ships with automatic dependency deduplication, relocatable node_modules, package.yaml manifest editing, and --save-types support.
Minor Changes
autoDedupededuplicates compatible dependency versions during installation #7258. Enable it inpnpm-workspace.yamlor usepnpm install --auto-dedupeorpnpm add --auto-dedupe. Frozen installs leave the lockfile unchanged.pnpm install,pnpm run, andpnpm execon macOS and Linux now reuse anode_modulesdirectory and bin shims that moved or were copied together with their project #6937. The first command after the move checks the tree and records its new location, so project commands innode_modules/.binkeep working.pnpm add --save-typessaves available@types/*packages indevDependenciesalongside registry dependencies #3868. Packages that declare bundled TypeScript types are skipped. SetsaveTypes: trueinpnpm-workspace.yamlto enable this by default.package.yamlmanifests can now be updated bypnpm add,pnpm update,pnpm remove,pnpm pkg,pnpm link,pnpm set-script, andpnpm version#2008. Existing comments and key order are preserved.Catalog entries can now use the
file:andlink:protocols #8642. A relative path or bare path in an entry, such as./tarballs/foo.tgz, is measured from the directory holdingpnpm-workspace.yaml.pnpm tasks statuslists running and waiting tasks in each concurrency group, and waiting tasks now take available slots in arrival order with higherprioritytasks going first #15208. If workspaces use different limits for the same group, a later task can take a free slot that earlier tasks cannot use. A package script namedtaskstakes precedence; usepnpm pm tasks statuswhen that script exists.pnpm cache prunedeletes registry metadata cache directories that this version of pnpm can no longer read #15046.pnpm cache prune --dry-runlists what it would delete without removing anything.macosBackup.excludeModulesDirandmacosBackup.excludeStoreDiron macOS can now exclude newly created modules, virtual-store, and package-store directories from Time Machine #6440. Set either totruein global configuration or using thePNPM_CONFIG_MACOS_BACKUP_EXCLUDE_MODULES_DIRandPNPM_CONFIG_MACOS_BACKUP_EXCLUDE_STORE_DIRenvironment variables.pnpm add --tildeis now an alias for--save-prefix=~#12863. The Yarn-Tshorthand is not supported.progresssetting and--no-progressoption now turn off dependency and download progress lines #14065. Warnings, lifecycle output, and the dependency summary are still printed.
Patch Changes
Security
- Security
POSIX bin shims now take
cygpathandwslpathfrom the system default path on Cygwin, MSYS2, and WSL2 so a dependency cannot redirect another package's shim #14866. - Security
pnpm installwarnings no longer carry the text of a package's deprecation notice, naming only the deprecated package and version #15099. A deprecation warning names the newest non-deprecated version when one exists, and control characters and line separators are stripped from package identifiers and warnings. - Security
pnpm installand other commands that report configuration warnings now warn when environment variables in project.npmrccredentials are ignored #15051.
Installing packages
pnpm install --frozen-lockfilenow succeeds when an optional dependency was unresolvable and skipped by the install that wrote the lockfile #3960.pnpm install --frozen-lockfileno longer installs dependencies of projects removed frompnpm-workspace.yaml#15248. Missing local tarballs used only by those projects no longer fail the install.pnpm cinow emptiesnode_modulesbefore installing in a project that declares acleanscript #15276.pnpm install --forcenow re-imports every package into the virtual store #15030 and removes obsolete dependency links inside virtual-store packages when their dependencies change #15039.preinstallscript for the root project now runs before dependencies are resolved and linked #3760.pnpm installnow runspnpm:devPreinstallwhen the root project usespackage.yaml#15168.pnpm installnow enforces the root project'sengines.noderange whenengineStrictis enabled #3016.pnpm installnow uses the running Node.js whendevEngines.runtimedeclares a range withoutonFail: download#15230.pnpm installno longer hangs when a git dependency is fetched over SSH and ssh prompts for a passphrase or host key confirmation, running ssh in batch mode instead #2227.pnpm installnow installs git-hosted dependencies without preparing them when their builds are explicitly denied byallowBuilds#10522.pnpm installnow reuses an in-flight tarball download when another resolution of the same archive still needs itspackage.json#15037.pnpm install --prodno longer downloads registry packages that only a devDependency reaches #881.pnpm install --no-runtime --frozen-lockfilewithnodeLinker: hoistedno longer fails on repeated runs with a broken lockfile #15212.
Resolving and linking dependencies
pnpm installandpnpm updatenow resolve a dependency range to the newest matching version that is not deprecated #15128.pnpm add <pkg>without a version now uses the catalog entry when the workspace already catalogs that package #14865.pnpm installnow links workspace dependencies declared with plain version ranges whenexcludeLinksFromLockfileandlinkWorkspacePackagesare enabled #15133.pnpm installnow resolves local tarball dependencies whose absolutefile:paths contain..consistently and skips reinstallation on repeat installs #15190.pnpm installnow installs dependencies when a custom resolver returns a local or git-hosted tarball without a manifest #15016.pnpm.overridesentries written as a bare path, such as./local-dep, are now measured from the directory holdingpnpm-workspace.yaml#11131.pnpm update --no-saveno longer bypasses version-scoped overrides when a dependency selector specifies a version #14923.pnpm peers checkand strict peer dependency checks no longer reject compatible versions from named registries #15225.pnpm outdatedandpnpm update --interactive --latestnow include named-registry dependencies such aswork:2.1.0and preserve their registry prefix #15226.Workspace projects selected by
hoistPatternorpublicHoistPatternare now hoisted on every install #3642.Workspace packages with SemVer build metadata are no longer skipped when they match the requested range and have the same version precedence as the registry package #2812.
Sped up
pnpm dedupeandpnpm installin projects with many convergence overrides by checking overrides concurrently #15175.minimumReleaseAgeis no longer skipped for packages served by registries returning matching ETags for abbreviated and full package metadata #14925.
Running scripts and tasks
pnpm runsignal handling no longer delivers a redundant secondSIGINTto child scripts onCtrl+Cin a terminal, and properly forwards termination signals when running non-interactively without a terminal #7374.pnpm runandpnpm execin workspaces withsharedWorkspaceLockfile: falsenow verify dependencies in the selected projects rather than expecting a root workspace state #15272.pnpm testnow forwards--filterarguments to the test script when the option follows the shortcut #15217.Recursive runs now start scripts matched by a
/pattern/selector in parallel withinworkspaceConcurrency#14933.pnpm deploy,pnpm rebuild,pnpm rb, andpnpm setupnow prefer apackage.jsonscript of the same name #14976.modulesDircustom directory names now support executable lookup and CommonJS plugin resolution acrosspnpm run,pnpm exec,pnpm versionhooks, and lifecycle scripts #3604.pnpm install-testnow accepts--no-baildirectly and in recursive runs #3777.
Workspace and project configuration
pnpmcommands run in a project not included in the workspace now act on that project alone #3561.pnpm-workspace.yamledits now preserve scalar YAML anchors and aliases #8245.pnpm-workspace.yamlnow expands environment variable placeholders with fallback syntax in enum-valued settings such asnodeLinker#14914.pnpmfileconfiguration now loads a.jsfile as CommonJS or an ES module, following the nearestpackage.json#15141.updateConfighook settings are now honored bypnpm peers check,why,list,ll,licenses,audit,sbom,fetch,patch,patch-commit,patch-remove,approve-builds, andruntime#15047, #15049.readPackagehook changes or removal now take added dependencies out ofpnpm-lock.yamland update dependencies when an existing lockfile is present #3735, #15136.package.yamlprojects now record their pinned pnpm underpackageManagerDependenciesinpnpm-lock.yaml#15167.packageManagerDependenciespinning@pnpm/exebesidepnpmis no longer rewritten inpnpm-lock.yaml#14926.pnpmnow preserves CRLF line endings when modifying project manifests #3529.loglevelsetting is now honored when configured inpnpm-workspace.yaml, global configuration, orPNPM_CONFIG_LOGLEVEL#3122.storeDirvalues loaded from global configuration orPNPM_CONFIG_STORE_DIRnow expand a leading~/to the user's home directory #6560.--shared-workspace-lockfilenow produces a warning when passed on the command line outside a workspace #1617.
Windows
pnpm installon Windows now runs dependency build scripts from long global virtual store paths and normalizes scoped package paths in lifecycle scriptPATHentries #15111.pnpm installacross projects sharing a global virtual store on Windows no longer fails withAccess is denied, file-exists errors, or transient sharing violations #15114, #15176, #15171.pn,pnpx,pnx, andpnpmnow run when Git Bash, MSYS2, or Cygwin launches them through a Windows path #14884.pnpm dlxnow reuses cached packages when Windows creates directory junctions for its cache links #15171.pnpm pipeline --watchnow resolves Windows short paths so multiple path representations share the build cache #15105.
CLI commands and output
pnpm removenow runs the project's ownpreuninstall,uninstall, andpostuninstallscripts #3276.pnpm remove -rnow fails before modifying manifests if any requested dependency is absent from all selected projects #2319.pnpm update --peernow updates ranges inpeerDependencies#8081.pnpm updatenow movesdevEngines.runtimeandengines.runtimeversion ranges to the resolved Node.js version #14988.pnpm update -gno longer reinstalls unchanged packages #12002.pnpm add -g,pnpm update -g, andpnpm remove -gnow recover a global package group whosenode_modulesdirectory was deleted #15093.pnpm add -gnow installs local tarballs whenPNPM_HOMEcontains..path segments #15118.pnpm versionnow readstagVersionPrefixfrompnpm-workspace.yaml, global config, orPNPM_CONFIG_TAG_VERSION_PREFIXwhen creating and reading Git tags #15044.pnpm publishnow allows a detached Git HEAD in CI environments #5894.pnpm store prunenow removes unreferenced files and packages from the content-addressable store #3635, as well as expired or supersededpnpm dlxcache data #15171.pnpm cache list-registriesnow prints decoded registry URLs #15046.pnpm deployno longer triggers an install when running scripts in a read-only deployed filesystem #11617.pnpm -r list --jsonnow outputs a single JSON array whensharedWorkspaceLockfileisfalse, and--longand--parseableread each project's own modules directory #15011.pnpm sbomnow validates SPDX identifiers and expressions before emitting them as CycloneDX license IDs or expressions, falling back to a license name for non-SPDX values such asUNLICENSED#14786.pnpm change checknow validates pending change intents in.changeset/#15183.pnpm --filterandpnpm -Fshell completion now suggests workspace package names #15216. Completion candidates containing control or invisible formatting characters are omitted so package and script names cannot inject terminal escape sequences.pnpm runandpnpm run-scriptshell completion now suggests package scripts #15034.pnpm --versionno longer creates a temporary file in the project directory during store detection #15264.pnpm setupnow describes displayed configuration changes as "The following configuration changes were made" #15100.minimumReleaseAgeapproval prompts inpnpm installandpnpm update -gnow count and display each package version once #15083, #15091..npmrcauthentication warnings now report when an empty environment variable removes an auth token and name the affected key #4806.The install summary now names the version each dependency resolved to when
node-linkerishoisted#15161.pnpm installnow re-links a package's global virtual store slot afterallowBuildschanges #15117.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.