Replies: 3 comments 2 replies
The stricter global setting should be followed. Otherwise it will reported as a vulnerability |
|
Hey @zkochan, I closed this discussion assuming #16437 covered it, but I'm no longer sure it does, and I'd appreciate a sanity check. From what I understand, #16437 makes pnpm check What I observed today on pnpm 12.9.0 (Linux), in a project with pnpm 12.9.1 was published 2026-10-03T20:48Z, so at that point it was about 37 hours old: old enough for the global default, but not for the project's 2-day limit. So my questions:
A side question I ran into while checking this: inside the project, Happy to provide more details or a minimal reproduction if that helps. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Since #12813,
pnpm self-updatedeliberately ignores the project'sminimumReleaseAgeandtrustPolicysettings and only uses the global ones, because the command replaces the global binary. That makes sense for the global binary.But when run inside a project,
self-updatealso rewrites that project'spackageManagerpin, and that pin is project-scoped. So now two different release-age limits apply to the same pin: the global one whenself-updatewrites it, and the project's one whenpnpm installuses it. When the project's limit is stricter,self-updatewrites a pin that the project's own install rejects straight away.What happened
pnpm 12.6.0, Node 24.15.0, Linux.
pnpm-workspace.yamlhasminimumReleaseAge: 2880(2 days). The global config has nominimumReleaseAge, soself-updateuses the built-in default (1 day). pnpm 12.8.1 was published 2026-09-28T17:38Z, i.e. old enough for the global limit but not the project's.The options at that point are: revert the pin by hand, wait out the limit before installing anything, or accept the prompt. Accepting permanently adds
pnpmand all@pnpm/exe.*packages to the project'sminimumReleaseAgeExclude. From then on, every new pnpm release skips the project's cooldown. That seems like exactly what #12813 wanted to prevent.Proposal
The two limits shouldn't fight each other. If the project sets
minimumReleaseAge, I'd expect the project's pin to follow it:pnpmis even older than what project accepts, update both global and project's pinned version to the newest version the project accepts.minimumReleaseAgeis what holds it back.The global binary keeps following the global settings only, so none of #12813's guarantees change.
All reactions