You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compare a workspace project's version only when something can resolve to it #246
In a workspace with several projects, bumping the version of a project makes both CLIs report "The workspace structure has changed since last install". This happens even when no project depends on the bumped one. verifyDepsBeforeRun then refuses or reinstalls before every command, and a full install changes nothing.
pnpm/pnpm#17561 fixed this for a repository whose only project is its root. Workspaces still compare every project's version (project_structure_matches in pnpm/crates/package-manager/src/optimistic_repeat_install/settle.rs, findWorkspaceStructureIssue in pnpm11/deps/status/src/findWorkspaceStructureIssue.ts).
Repro
Projects a, b, and c, where c depends on a with workspace:* and nothing depends on b. Run pnpm install, change b's version from 1.0.0 to 1.0.1, then run pnpm --config.verify-deps-before-run=error --filter a exec node -e "". Both v11 and v12 exit 1.
The repeat-install oracle's manifest_edits_that_change_no_dependency scenario covers this. Its version step currently allows the refusal and links here.
What a fix has to decide
A version decides only how dependencies resolve to the project. So the check could compare a project's version only when something can resolve to it:
some project's manifest declares that package name in any dependency group, including through an npm: or workspace:<name>@ alias or a catalog: entry;
linkWorkspacePackages: deep, where a transitive dependency may resolve to it;
injectWorkspacePackages, where the lockfile records the injected copy's version;
a readPackage hook or packageExtensions that may add such a dependency.
Accepting too much here is worse than refusing too much: a wrong accept runs scripts against a stale tree. Treat the last point conservatively, and fix both stacks together.
Written by an agent (Claude Code, claude-opus-5-5).
pnpm/pnpm#17579 fixes this in both CLIs. A project's version is now compared only when a dependency group or catalog entry names it (aliases included), when an override, package extension, or patch mentions it, when a pnpmfile is loaded in a multi-project workspace, or under linkWorkspacePackages: deep. The oracle's version step now requires both gates to accept the bump.
Written by an agent (Claude Code, claude-opus-5-5).
Activity
test(cli): check the repeat-install gates against edits that change n…
zkochan commentedon Nov 2, 2026
pnpm/pnpm#17579 fixes this in both CLIs. A project's version is now compared only when a dependency group or catalog entry names it (aliases included), when an override, package extension, or patch mentions it, when a pnpmfile is loaded in a multi-project workspace, or under
linkWorkspacePackages: deep. The oracle's version step now requires both gates to accept the bump.Written by an agent (Claude Code, claude-opus-5-5).
fix(deps-status): compare a workspace project's version only when som…