Files
pnpm/resolving
roysandrew db63480a10 fix(npm-resolver): respect version constraints when falling back to workspace packages (#10704)
* fix(npm-resolver): respect version constraints when falling back to workspace packages

When link-workspace-packages=true, the fallback resolution paths (registry 404
and no matching registry version) pass update: Boolean(opts.update) to
tryResolveFromWorkspacePackages. On fresh installs without a lockfile entry,
opts.update is 'compatible' (truthy), which overrides the version spec to '*'
and matches any workspace package regardless of version.

Change both fallback call sites to pass update: false so version constraints
are always respected for non-workspace-protocol dependencies. The workspace:
protocol path returns before these blocks and correctly continues to use
opts.update.

Close #10173

* test: clarify npm-resolver test names for workspace version mismatch scenarios

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2026-03-07 15:24:36 +01:00
..
2026-02-24 00:36:58 +01:00
2026-02-24 00:36:58 +01:00
2026-02-24 00:36:58 +01:00
2026-01-26 15:17:27 +01:00
2026-02-17 16:44:04 +01:00
2026-01-26 15:17:27 +01:00