Files
pnpm/.github
Zoltan Kochan 3c0f092390 fix(peers): stop the peer walk at linked workspace packages (#14909)
An importer's peer report followed every `link:` edge into the linked
importer and kept walking, so a workspace package shared by many projects
was re-traversed once per project that reached it. Every visit canonicalized
the target and read its manifest, which made a lockfile-only install of a
6,833-project workspace take 29 s instead of 3 s and left `pnpm peers check`
running for over 15 minutes.

Stop at the edge, as pnpm's own lockfile walker does. A linked package's own
linked dependencies are its obligation, and it is an importer of the same
lockfile, so its own report already covers them.

Add a linked-workspace benchmark scenario to keep the walk linear: 225
generated projects joined by 6,369 `workspace:*` edges, every linked project
declaring a peer its consumers provide, resolved offline against no registry
package at all. The regressed walk takes 93 s on that fixture against 1.4 s.

Closes pnpm/pnpm#14906
2026-09-15 09:48:19 +02:00
..