Files
Victor Sumner d5fcecac82 test(fetch): verify pnpm fetch populates global virtual store links/ (#10835)
* test(fetch): verify pnpm fetch populates global virtual store links/

pnpm fetch flows through headlessInstall → lockfileToDepGraph →
iteratePkgsForVirtualStore, which respects enableGlobalVirtualStore.
When enabled, packages are written to the store's links/ directory
instead of only the CAS. This behavior is relied upon by tools that
pre-build stores (Docker multistage builds, Nix, CI caching) but was
not covered by any test.

Also adds enableGlobalVirtualStore to FetchCommandOptions type to
match the runtime behavior where the option flows through via the
opts spread.

* test(fetch): use lockfileOnly instead of full install in GVS test

The test only needs a lockfile for the fetch step, so a full install
followed by rimraf of node_modules is unnecessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 21:40:24 +01:00

5.8 KiB