npm pnpm 12.26.0
pnpm 12.26

one hour ago

This release installs command-line tools such as jq and the GitHub CLI from their publishers' releases. It also adds separate supportedArchitectures lists for lockfile coverage and local downloads, and adds sideEffectsCache.key for builds that target other runtimes. The release carries security fixes. Scripts now run with an absolute /bin/sh, and pnpm view strips control characters from registry metadata.

Minor Changes

  • pnpm can install command-line tools such as jq, ripgrep, and the GitHub CLI from the archives their publishers release. pnpm add gh@aqua:cli/cli adds "gh": "aqua:cli/cli@^2.106.0" to devDependencies, and pnpm install links the tool's commands into node_modules/.bin. The tool's name is its name in the aqua registry.

    pnpm-lock.yaml records the download and its checksum for every platform the tool publishes. When GitHub reports no checksum for a file, pnpm downloads it to compute the checksum. Use supportedArchitectures.required to fail resolution when a tool lacks a download for a listed platform.

    A tool can only be listed in the devDependencies of a project. pnx aqua:cli/cli runs one without adding it.

    A named registry can no longer be called aqua.

  • supportedArchitectures accepts separate lists for the lockfile and the local install. supportedArchitectures.resolve selects the platforms the lockfile covers, and supportedArchitectures.fetch selects the platforms whose downloads pnpm installs locally. Changing only fetch works with a frozen lockfile.

  • Added sideEffectsCache.key. It tells pnpm what the dependency builds of a project depend on, so builds made for different targets get their own side-effects cache entries in one store. key.env lists environment variables whose values pnpm hashes into the key, such as the npm_config_runtime that Electron projects set or the NIX_CC of a Nix shell. key.excludeNodeVersion: true leaves the Node.js major out of the key, for builds that target another runtime.

  • minimumReleaseAgeExclude, trustPolicyExclude, and sideEffectsCache.exclude now accept scoped name patterns with exact versions. For example, @myorg/tool-*@1.2.3 exempts matching packages only at version 1.2.3. Versioned patterns require a scope without wildcards #18609.

Patch Changes

Security

  • Scripts now run with /bin/sh by default outside Windows, or /system/bin/sh on Android. A dependency that ships a bin named sh can no longer replace the shell that runs other packages' lifecycle scripts.

  • pnpm now ends a package tarball at two zero blocks that have a block npm cannot read as a header between them. Before, pnpm installed the files after that point, which npm does not install.

  • pnpm view now strips control characters and invisible formatting characters from registry metadata before printing it. In the summary and when several fields are selected, line breaks and tabs inside a value become spaces. --json output is unchanged.

Installing packages

  • Fixed installs failing when a package tarball contains a binary extended file attribute #18607.

  • Fixed native addon builds failing when the bundled node-gyp downloads Node.js headers #18596.

  • pnpm install now reports ERR_PNPM_MISSING_PACKAGE_NAME when a file: directory, a git repository, or a tarball URL that a project depends on has a package.json without a name. The install failed before with an internal error about a dependency path that "keys no lockfile entry". A workspace project without a name now fails the same way when another project injects it or depends on it through file:. pnpm linked such a project under dedupeInjectedDeps, which is on by default.

Switching pnpm versions

  • Fixed pinned pnpm installations failing or missing their cache when a project sets options such as engineStrict, optional, ignoredOptionalDependencies, virtualStoreOnly, enableModulesDir, symlink, or sideEffectsCache.exclude. Pinned pnpm installs now ignore unrelated project settings and reuse the cached installation across runs pnpm/tasks#67.

  • Fixed pnpm self-update and package manager version switching failing when an unused registry has an unsupported client certificate. Requests that follow redirects with a single HTTP client now reject a redirect that requires different TLS settings #18583.

Workspaces and the lockfile

  • Filtered installs now apply catalog and override changes to registry dependencies of projects missing from disk. If an override requires information from a missing project's manifest, pnpm asks you to check out that project. A frozen install rejects a lockfile when a project records a dependency version that disagrees with its catalog entry #18579.

  • pnpm remove and pnpm link now preserve lockfile entries for workspace projects missing from disk. pnpm remove also applies workspace filters supplied by the updateConfig hook #18579.

  • pnpm install, pnpm update, and pnpm outdated now respect minimumReleaseAge when selecting a Node.js version for devEngines.runtime #18599.

  • Pruning unused catalog entries now preserves comments following pruned entries #18574.

  • pnpm now reads lockfile entries that spell a tool's version with tool:, such as node@tool:22.0.0, the same as the runtime: spelling. pnpm still writes runtime:.

The side-effects cache

  • A sideEffectsCache object in PNPM_CONFIG_SIDE_EFFECTS_CACHE or in the result of an updateConfig hook that leaves out read or write now keeps the current value of that setting. Before, such an object turned a disabled side-effects cache back on.

  • pnpm store status now applies the updateConfig hooks of the pnpmfile, so it checks the global virtual store slots that pnpm install created when a hook changes sideEffectsCache.exclude.

Commands

  • pnpm patch-commit now supports text-file and mode-only changes in WebContainers. Both package snapshots together can contain up to 64 MiB of file contents. A changed text file can contain up to 100,000 lines. A generated diff can contain up to 128 MiB. Binary content changes, symbolic links, and unsupported file names return an error pnpm/tasks#63.

  • pnpm config delete now removes a field named by a dotted key, such as pnpm config delete globalPackagesConfig.virtualStoreType, from config.yaml and pnpm-workspace.yaml. Deleting a field that is not present succeeds without changing the file.

  • pnpm pack and pnpm publish no longer zero-pad brace range values because the step has a leading zero. In files, .npmignore, and .gitignore, part{1..10..02}.js now matches part1.js and part3.js, as in Bash.

Windows

  • The commands of a crate installed with pnpm add -g crate:<name> are now executables. They were .cmd scripts, which Cargo cannot run as a subcommand and rustc cannot run as a linker. pnpm update -g replaces the scripts of an existing install.

  • A variable listed in the env of a pnpm pipeline task now matches an extraEnv entry spelled in another case, as it does in the task's own environment.

Platinum Sponsors

Bit OpenAI Notion
CodeRabbit Cloudflare

Gold Sponsors

Sanity Discord Vite
SerpApi Stackblitz Workleap
Nx Latitude Syntax

Don't miss a new pnpm release

NewReleases is sending notifications on new releases.