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/cliadds"gh": "aqua:cli/cli@^2.106.0"todevDependencies, andpnpm installlinks the tool's commands intonode_modules/.bin. The tool's name is its name in the aqua registry.pnpm-lock.yamlrecords 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. UsesupportedArchitectures.requiredto fail resolution when a tool lacks a download for a listed platform.A tool can only be listed in the
devDependenciesof a project.pnx aqua:cli/cliruns one without adding it.A named registry can no longer be called
aqua. -
supportedArchitecturesaccepts separate lists for the lockfile and the local install.supportedArchitectures.resolveselects the platforms the lockfile covers, andsupportedArchitectures.fetchselects the platforms whose downloads pnpm installs locally. Changing onlyfetchworks 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.envlists environment variables whose values pnpm hashes into the key, such as thenpm_config_runtimethat Electron projects set or theNIX_CCof a Nix shell.key.excludeNodeVersion: trueleaves the Node.js major out of the key, for builds that target another runtime. -
minimumReleaseAgeExclude,trustPolicyExclude, andsideEffectsCache.excludenow accept scoped name patterns with exact versions. For example,@myorg/tool-*@1.2.3exempts matching packages only at version1.2.3. Versioned patterns require a scope without wildcards #18609.
Patch Changes
Security
-
Scripts now run with
/bin/shby default outside Windows, or/system/bin/shon Android. A dependency that ships a bin namedshcan 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 viewnow 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.--jsonoutput 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 installnow reportsERR_PNPM_MISSING_PACKAGE_NAMEwhen afile:directory, a git repository, or a tarball URL that a project depends on has apackage.jsonwithout aname. The install failed before with an internal error about a dependency path that "keys no lockfile entry". A workspace project without anamenow fails the same way when another project injects it or depends on it throughfile:. pnpm linked such a project underdedupeInjectedDeps, 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, orsideEffectsCache.exclude. Pinned pnpm installs now ignore unrelated project settings and reuse the cached installation across runs pnpm/tasks#67. -
Fixed
pnpm self-updateand 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 removeandpnpm linknow preserve lockfile entries for workspace projects missing from disk.pnpm removealso applies workspace filters supplied by theupdateConfighook #18579. -
pnpm install,pnpm update, andpnpm outdatednow respectminimumReleaseAgewhen selecting a Node.js version fordevEngines.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 asnode@tool:22.0.0, the same as theruntime:spelling. pnpm still writesruntime:.
The side-effects cache
-
A
sideEffectsCacheobject inPNPM_CONFIG_SIDE_EFFECTS_CACHEor in the result of anupdateConfighook that leaves outreadorwritenow keeps the current value of that setting. Before, such an object turned a disabled side-effects cache back on. -
pnpm store statusnow applies theupdateConfighooks of the pnpmfile, so it checks the global virtual store slots thatpnpm installcreated when a hook changessideEffectsCache.exclude.
Commands
-
pnpm patch-commitnow 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 deletenow removes a field named by a dotted key, such aspnpm config delete globalPackagesConfig.virtualStoreType, fromconfig.yamlandpnpm-workspace.yaml. Deleting a field that is not present succeeds without changing the file. -
pnpm packandpnpm publishno longer zero-pad brace range values because the step has a leading zero. Infiles,.npmignore, and.gitignore,part{1..10..02}.jsnow matchespart1.jsandpart3.js, as in Bash.
Windows
-
The commands of a crate installed with
pnpm add -g crate:<name>are now executables. They were.cmdscripts, which Cargo cannot run as a subcommand and rustc cannot run as a linker.pnpm update -greplaces the scripts of an existing install. -
A variable listed in the
envof apnpm pipelinetask now matches anextraEnventry spelled in another case, as it does in the task's own environment.
Platinum Sponsors
|
|
|
|
|
|
|
Gold Sponsors
|
|
|
|
|
|
|
|
|
|
|
|