Repository navigation
build: update pnpm to v11.28.13 (22.3.x) - #34156
Open
angular-robot wants to merge 1 commit into
Open
angular-robot wants to merge 1 commit into
angular-robot wants to merge 1 commit into
Conversation
See associated pull request for more information.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
11.28.11→11.28.13Release Notes
pnpm/pnpm (pnpm)
v11.28.13: pnpm 11.28.13Compare Source
pnpm 11.28.13 includes a security fix. After the default or a scoped registry changed,
pnpm installcould skip theminimumReleaseAgeandtrustPolicychecks against the new registry. It also fixespnpm auditdropping advisories with string ids, offline installs failing theminimumReleaseAgecheck, and peer and injected-package resolution bugs.Patch Changes
Security
pnpm installnow re-verifies lockfile resolutions when the default registry or a scoped registry changes. Before, it reused the result cached for the previous registry and skipped theminimumReleaseAgeandtrustPolicychecks against the new one #18070.pnpm dlxnow keys its cache on activeoverrides,packageExtensions,minimumReleaseAge,trustPolicy,trustLockfile, andblockExoticSubdepssettings. Cached installs created under looser settings are no longer reused when stricter policies apply #18075.pnpm dlx --allow-build=!<pkg>now denies build scripts for<pkg>, including the executed package itself. Denied packages also skip interactive build approval.pnpm auditnow reports advisories whoseidis a string. Such advisories were dropped, andpnpm auditreported no known vulnerabilities #18184.Installs that failed
Fixed an offline install failing the
minimumReleaseAgelockfile check withERR_PNPM_NO_OFFLINE_METAafter an online install resolved the same packages with the same cache directory. The check now reads publish times from the metadata that the resolution cached #18063.pnpm no longer stalls on a patch file whose
diff --gitline contains a long run of spaces.Installing an injected local package no longer fails with a "no such file or directory" error when another process renames or removes files in that package while pnpm lists them. This happened most often on macOS in workspaces with
sharedWorkspaceLockfile: false, where the install of the package itself writes its lockfile at the same time.Fixed
pnpm install --merge-git-branch-lockfiles --frozen-lockfilefailing withERR_PNPM_OUTDATED_LOCKFILEwhen a project sets or removespublishConfig.directory,publishConfig.linkDirectory, ordependenciesMeta. Lockfile merging now preserves and reconcilespublishDirectory,linkDirectory, anddependenciesMetaon importers.Tarball URLs that reject HEAD requests with 405 Method Not Allowed now fall back to a GET request during resolution.
Resolving and linking dependencies
With
autoInstallPeers, an optional peer is no longer bound to a version outside its range that only another dependency's subtree brings in. Before, adding an unrelated dependency could flip that binding and rewrite the peer suffixes of other projects in the lockfile #18162.pnpm installnow updates a peer that it auto-installs for a localfile:dependency when the peer'scatalog:entry changes. Before, the old peer version stayed locked.pnpm installresolves thelink:and bare relative path dependencies of an injected workspace package from that package's directory. They were resolved from the lockfile directory, so the installed link could point outside the workspace. Frozen installs now accept such dependencies pnpm/tasks#274.When multiple
overridesselectors match a dependency, pnpm now picks the selector with the narrower version range regardless of the order in which the overrides are declared #18071.Patches that add lines to the end of a file without a final newline now install the whole file. pnpm dropped the last added line when the patch also marked it with
\ No newline at end of file#18156.Project
engines.nodechecks now use the Node.js runtime that pnpm links for the dependency groups being installed. If the lockfile records that runtime, the check uses its resolved version. Production installs ignore a runtime declared only indevEngines.runtimepnpm/tasks#302.Scripts and builds
pnpm --if-present start,pnpm run --if-present start, andpnpm restart --if-presentnow exit with code 0 when a project has neither astartscript nor aserver.jsfile #18073.pnpm approve-buildswithout package arguments or--allnow fails withERR_PNPM_APPROVE_BUILDS_NON_INTERACTIVEwhen packages are awaiting approval in CI or without an interactive terminal.pnpm dlxand global installs also skip automatic build-approval prompts in CI, leaving pending builds unapproved.Workspaces and lockfiles
Combining
--filterand--filter-prodwith exclusion selectors such as!pkgnow evaluates all selectors together in command-line order. An exclusion passed on one flag while inclusions were passed on the other no longer selects every workspace project.pnpm -r fetchnow fetches each selected project's lockfile whensharedWorkspaceLockfileisfalse. Use--filterto limit which projects are fetched #18152.pnpm peersin workspaces withsharedWorkspaceLockfile: falsenow checks each selected project'spnpm-lock.yaml.pnpm cinow validates thatpnpm-lock.yamlexists and matchespackage.jsonbefore removingnode_modules.pnpm cleanandpnpm cinow honor--filter,--filter-prod, and--workspace-root.pnpm cleanandpnpm cialso clean rootnode_modulesin workspaces without a rootpackage.json.pnpm clean --lockfilenow removes per-project lockfiles and lockfiles inside a customlockfileDir.pnpm clean,pnpm purge, andpnpm cikeep files outside the project untouched whenmodulesDirpoints outside the project root. Whennode_modulesis a symlink,pnpmnow unlinks the symlink without modifying its target #18072.pnpm importnow preserves locked versions fornpm:aliased dependencies when importing frompackage-lock.json,npm-shrinkwrap.json, oryarn.lock.pnpm importalso parses Yarn Classicyarn.lockfiles that reference__metadatapackage names without treating them as Yarn Berry lockfiles.Updating, packing, and publishing
Fixed GitHub Actions support in
pnpm updateandpnpm outdated. Updating a workflow step with a major or minor version comment such as# v4or a prose comment now formats the updated version comment cleanly. Negated action selectors such as!actions/cache/savenow exclude only the targeted subpath actions. Passing only negated action selectors still updates packages. Previously, negated action selectors skipped package updates.pnpm outdatednow reports every distinct outdated version when several workflows pin the same action at different versions.pnpm update -g --latestnow upgrades global runtimes (node,deno, andbun) andnpm:-aliased global packages across major versions.pnpm update --changesetnow generates a changeset when a.changesetdirectory exists orversioningis configured inpnpm-workspace.yaml, without requiring.changeset/config.json. It also respectsversioning.ignorealongside.changeset/config.json.pnpm version -rnow runs each bumped package'spreversion,version, andpostversionscripts unless--ignore-scriptsor--dry-runis set.pnpm version -r --dry-run --jsonnow prints the planned releases as a JSON array.pnpm lane <lane> --filter <selector>now rejects partial moves of aversioning.fixedgroup withERR_PNPM_VERSIONING_CONFLICTING_CONFIGbefore writingpnpm-workspace.yaml.pnpm packnow accepts--ignore-pnpmfileand--ignore-scripts, andpnpm publishaccepts--ignore-pnpmfile. With these flags, a package can be packed without running the project's pnpmfile or lifecycle scripts #18132.pnpm packandpnpm publishin a workspace now keep the workspace's ignore rules when a package's.npmignoreis removed while pnpm lists the package's files.pnpm -r pack --outnow expands%sand%vplaceholders only in the--outtemplate. Literal%sand%vsegments in the working directory path stay unchanged.pnpm -C <dir> publish <tarball|folder>andpnpm --dir <dir> publish <tarball|folder>now resolve relative tarball and directory arguments against<dir>. Git checks duringpnpm publishalso inspect the target directory.Other commands and settings
updateConfigandafterAllResolvedhooks in.pnpmfile.cjsthat returnundefined,null, or a non-object value now fail withERR_PNPM_CONFIG_IS_UNDEFINEDandERR_PNPM_BAD_AFTER_ALL_RESOLVED_RETURN.pnpm list --parseable --longnow keeps<name>@onlink:andfile:dependencies whose path or peer suffix contains@, such aslink:../@scope/pkg. Aliased scopedfile:dependencies whose path contains@also keep<name>@inpnpm list.pnpm whyno longer merges distinct localfile:directory dependencies that share the same package name across projects with dedicated lockfiles (sharedWorkspaceLockfile: false).pnpm pkgnow reads and writes the project manifest as written on disk.pnpm pkg getno longer reports syntheticruntime:dependency entries fromdevEngines.runtimeorengines.runtime.pnpm pkg setandpnpm pkg deletenow preservedevEngines.runtime,engines.runtime, and empty dependency objects set with--json.pnpm pmnow works after CLI flags such as--dirand afterpnpm with current.pnpm with currentalso accepts subcommand boolean flags such aspnpm --bare with current initahead ofwith.pnpm envcommands (use,list, andremove) now accept Node.js version specifiers with a leadingv, including prerelease versions such asv22.0.0-rc.1.pnpm doctornow checks write access for the cache, store, and global bin directories before they have been created. Previously,pnpm doctorreportedno write accesson fresh environments.pnpm doctornow probes whether reflinks or hardlinks work from the store into the project's link target and warns when neither does.Output and error messages
pnpm installwithnodeLinker: hoistedno longer counts missing packages as removed. This fixes inflated removal counts for skipped optional dependencies #18178.pnpm outdated --jsonandpnpm outdated --format=jsonnow write reporter warnings tostderr. Warnings previously appeared onstdoutbefore the JSON output.pnpm now reports
globalPackagesConfigin the globalconfig.yamlas a setting of a newer pnpm version. It no longer suggests a similarly named setting.pnpmwarns when anupdateConfighook changesregistriesand some routes still use their configured registry. The warning names those routes and points toregistriesByScope.pnpm cat-filenow reportsERR_PNPM_INVALID_HASHwhen given an empty, malformed, or truncated digest such assha512-.Platinum Sponsors
Gold Sponsors
v11.28.12: pnpm 11.28.12Compare Source
pnpm 11.28.12 fixes many peer dependency,
pnpm deploy, frozen-lockfile, andnodeLinker: hoistedbugs. It also includes a security fix. A${VAR}placeholder in a repository's registry URL now fails the command, so pnpm no longer sends those requests to another registry. The bundlednode-gypno longer ships the undici version that security scanners flag, and remote resolution needs pnpr 0.1.0-alpha.20 or newer.Patch Changes
Upgrading and security
A
${VAR}placeholder in a registry URL inpnpm-workspace.yamlor the project.npmrcnow fails the command. pnpm does not expand environment variables in these files. Before, pnpm ignored such a URL and resolved packages from another registry, such as npmjs.org. pnpm now warns when it ignores a placeholder in a proxy,pnprServer, oruserAgentsetting inpnpm-workspace.yaml#17762.The
node-gypbundled with pnpm no longer ships undici 6, which security scanners flag for CVE-2026-84947. On Node.js 26,node-gypdownloads through a proxy or with a custom CA file no longer crash with "invalid onError method" #17941.Remote resolution and shared build caches no longer work with pnpr 0.1.0-alpha.19 or older. pnpm now reads the capabilities a pnpr server advertises under
pnpr.protocols. Installs fail when the server does not confirm the requested resolution and verification policies. Upgrade the pnpr server before upgrading pnpm.Installs that failed
pnpm install --frozen-lockfilenow succeeds when a workspace project recorded inpnpm-lock.yamlhas an empty directory, such as a git submodule that was not checked out #17712.pnpm install --frozen-lockfilenow accepts a lockfile when an injected workspace package declares afile:orlink:dependency with backslashes, such asfile:..\vendor, or with a slash after the protocol, such asfile:/./vendor. Before, the install reported the lockfile as out of date right afterpnpm installhad written it #17720.pnpm install --frozen-lockfileandverifyDepsBeforeRunnow accept aworkspace:dependency on a project whose version is not valid semver, such asworkspace:1on a project at version1. Before, they reported the lockfile thatpnpm installhad just written as out of date.pnpm fetchno longer fails withENOENTwhennodeLinkerishoistedand the project configurespatchedDependenciesorallowBuilds.pnpm fetchalso preserves an existing hoistednode_modulesdirectory #18037.Git dependencies now accept npm's
::separator between fragment parameters, such asgithub:owner/repo#v1.0.0::path:packages/foo. Before, pnpm read the whole fragment as a branch name and failed to resolve it #17827.pnpm no longer fails to remove a dependency whose
package.jsonis malformed. It removes the dependency and keeps its bins pnpm/tasks#295.Fixed
pnpm deprecate,pnpm undeprecate, andpnpm unpublishfailing with revision conflicts when a registry cache serves stale package metadata.When a package injected through a path, such as
file:../libor../lib, gives one of its dependencies acatalog:specifier,pnpm installnow fails the way a fresh resolution does, andpnpm install --frozen-lockfilereports the lockfile as outdated. Before, both could accept the existing lockfile #17722.Peer dependencies
Repeated installs no longer change the peer dependency providers that the previous install chose. This covers adding a dependency, removing a shared package from one workspace project, and projects that use different ranges of one dependency pnpm/tasks#221.
An unchanged install keeps a valid locked peer provider even when a direct dependency provides another compatible version. Explicit
pnpm addandpnpm updaterequests take precedence over it. Required dependencies no longer remain marked optional when another workspace project removes a shared package.Workspace projects that select different versions of a peer provider no longer share one copy of the package that depends on it. This affected peers reached through an aliased dependency or a peer dependency cycle.
New workspace projects now prefer peer versions already pinned in the lockfile. Dependencies that are also optional peers no longer cause an unrelated project to select an older peer version.
With
dedupePeerDependents: false, a missing optional peer is no longer resolved from a version that only another workspace project depends on. The workspace root's dependencies still count ifresolvePeersFromWorkspaceRootistrue. Before, a tool in one project'sdevDependencies, such aswebpack-cli, could become an optional peer of another project's production dependencies #16666.pnpm installno longer gives a project an optional peer dependency that it skipped because a required peer would conflict with the project's dependencies. Before,dedupePeerDependentsmerged the project's copy of the package that declares the peer with another project's copy that resolves it #17781.pnpm installno longer fills in a missing optional peer dependency if a required peer it brings in conflicts with a version the project depends on. Before, such a peer was installed along with it and reported as unmet #17718.With
autoInstallPeersFromHighestMatch, conflicting non-semver peer dependencies now remain missing, and identical non-semver peer specifiers are preserved. Preferred registry versions no longer replace local paths or protocol-prefixed specifiers when pnpm installs missing peers pnpm/tasks#272.Fixed installation and peer dependency reporting for packages named
constructorortoString. Optional peers with these names are also recognized when declared only inpeerDependenciesMeta.Resolving and linking dependencies
A root
overridesentry that points a package at aworkspace:path, such asworkspace:./packages/foo, now also applies when a registry package depends on that package pnpm/tasks#270.Version-selector
overridesentries such as"ms@^2.0.0": "2.1.1"now apply to dependencies declared with thecatalog:protocol when the catalog entry's range matches the selector #17922.An optional dependency that declares no
os,cpu, orlibcfield is no longer skipped because its name contains only an operating system word, such asget-windowson macOS. pnpm now infers its platform from the name only when the name also has a cpu or libc token, such as-win32-x64#17774.pnpm dedupenow keeps a locked runtime version, fromdevEngines.runtimeor from a dependency'sengines.runtime, when the declared range still admits it.pnpm dedupe --checkno longer fails each time a newer Node.js release in the range comes out #17984.Resolving against a registry that sends
Cache-Control: no-cache, such as Azure Artifacts, is fast again when the lockfile already decides the version. pnpm reads the cached metadata for a pinned version, or for a range the lockfile version is proven to win, without a registry request #17758.Dependencies declared as
workspace:entries in catalogs now remain in the lockfile whenexcludeLinksFromLockfileis enabled. Frozen installs can restore these links afternode_modulesis removed pnpm/tasks#260.pnpm install --filterin a sparse checkout now counts the dependencies of workspace projects that are missing from disk when it resolves peer dependencies and marks packages as optional. The lockfile it writes no longer differs from a full checkout in those entries #17791.With
nodeLinker: hoisted,pnpm install --filterin a sparse checkout now drops previously installed workspace projects that are missing from disk from the hoistednode_modulestree. It no longer recreatesnode_modulesinside a missing project's directory. Packages that only the missing project used are also removed from the rootnode_modules.With
nodeLinker: hoistedand a custommodulesDir, pnpm now installs a workspace project's dependencies that cannot be hoisted to the root into the project'smodulesDir. The next install that relinks the project removes the copies that earlier installs left in itsnode_modules. A later install restores the project'smodulesDirwhen it was removed. Package directories that pnpm did not install are now also moved to.ignoredin a custommodulesDir.With
dedupeDirectDeps,pnpm installnow compareslink:dependencies by the directory they point at. A project'slink:dependency is removed when the workspace root links the same directory under a different path. It is kept when the root'slink:dependency has the same text but points at another directory. This also applies withnodeLinker: hoisted.pnpm installreports each removedlink:dependency once pnpm/tasks#293.A repeat
pnpm installwithnodeLinker: pnpnow applies dependency and configuration changes. Before, it printed "Already up to date" and left the lockfile unchanged.Config dependencies use the declared registry
serverTypewhen recording and installing packages pnpm/tasks#236.pnpm deploy
pnpm deployno longer fails when the deployed project depends on a workspace package that setspublishConfig.directory. pnpm installs that package from its publish directory and runs its build scripts #17771.pnpm deploynow runs the build scripts of a workspace project that it installs as afile:dependency, without a machine-specificallowBuildskey. AnallowBuildsentry that denies the project still applies #17740.pnpm deploy --offline --trust-lockfilenow reuses dependencies pinned in the source lockfile from a populated store when registry metadata is unavailable. This works with per-project lockfiles,--legacy, and npm aliases #17888.pnpm deploypreserves an injected workspace package's resolved dependencies when they differ from the workspace project's own dependencies. This also applies to packages withpublishConfig.directorypnpm/tasks#221.pnpm deploynow binds optional peers declared only inpeerDependenciesMetafor linked workspace packages. The deployed manifest and lockfile also retain these peers when filtering dependency groups.Builds, bins, and scripts
Concurrent installs into a global virtual store no longer wait on each other. A package that needs a build is built in a private directory and moved into the store once its build has finished, so another project never links a half-built package. An install with
--ignore-scriptslinks the packages it does not build from their own store directories, andpnpm store pruneremoves the build directories of installs that were interrupted #15568.Packages that an older pnpm version added to the store now run their install scripts. Before, pnpm could skip those scripts and hardlink the package's files to the store. This includes git dependencies that an older pnpm marked in a shared store as not requiring a build pnpm/tasks#189.
Fixed
pnpm store statusreporting approved builds of git dependencies as modified when the store contains legacy build metadata.pnpm store prunenow stops if a dependency link cannot be read. This keeps installed packages from being removed after an incomplete scan.When
pnpm installadds placeholder entries toallowBuildsinpnpm-workspace.yaml, it no longer copiesallowBuildsentries from other config sources into the file.Bin shims in the global virtual store no longer include the hoisted modules directory of the project that installed them #18035.
POSIX bin shims and the
pnpm,pn,pnpx, andpnxlaunchers now run inside a Nix build on macOS with the sandbox enabled. Installing again replaces the shims already innode_modules#17750.Installing no longer replaces the POSIX bin shims that a newer pnpm wrote in
node_modules/.bin.Linking bins is faster for packages that ship large native executables as bins. pnpm now reads only the first 512 bytes of a bin file to find its shebang #17361.
pnpm runandpnpm setupno longer clear the visible terminal on Windows when a project path contains non-ASCII characters.pnpm stops scripts and their descendants when it is killed during script startup pnpm/tasks#313.
Engines and runtimes
pnpm installnow fails on a workspace project's incompatibleengines.pnpm, or on its incompatibleengines.nodewithengineStrictenabled, even when the project'sos,cpu, orlibcexcludes the current platform pnpm/tasks#281.pnpm installnow checks the project'senginesfield when the project is already up to date. A repeat install of a project outside a workspace warns about an incompatible Node.js version, or fails withengineStrictenabled #17751.A workspace project that downloads its own Node.js through
devEngines.runtimenow has itsengines.nodechecked against that Node.js. Before, pnpm checked it against the shared Node.js version, soengineStrictcould reject a project whose scripts run on a compatible runtime pnpm/tasks#300.A repeat
pnpm installnow runs a full install when theruntimeOnFailsetting changes. Before, it printed "Already up to date" and did not install the runtime a project declares indevEngines.runtimepnpm/tasks#303.Fixed missing warnings when a required dependency does not support the current Node.js version.
Other commands and settings
pnpm dist-tagandpnpm unpublishnow offer browser-based authentication when the account's two-factor authentication uses a security key. Before, they asked for a one-time password in that case #17832.pnpm loginnow prints the registry'snpm-noticemessage before the web login URL. Some registries use it to show a code that you type in the browser.pnpm self-updatenow updates the project'sengines.pnpmrange along with its pnpm pin, keeping the^or~operator #17732.pnpm setupand the install script now support PowerShell as the login shell on Linux and macOS. They addPNPM_HOMEtoPATHinprofile.ps1under$XDG_CONFIG_HOME/powershellor~/.config/powershell#18026.pnpm setuprejects aPNPM_HOMEvalue that would split the savedPATHpnpm/tasks#315.Relative directory selectors set on
config.filterorconfig.filterProdby anupdateConfighook now resolve from the workspace root even when--diris passed orpnpmruns from a subdirectory #17906.pnpm now reads the boot document of
pnpm-lock.yamlwhen it is written in lockfile format 13. pnpm then switches to the pnpm version such a project pins.Programmatic install mutations that omit workspace project manifests now resolve locally when a pnpr server is configured pnpm/tasks#59.
pnpm now recognizes Capawesome Cloud and RWX as CI environments.
The warning about unrecognized settings now marks
projectScopedOptionalPeersas a setting of a newer pnpm version.Platinum Sponsors
Gold Sponsors