test(deps-restorer): complete the peer-variant-missing-resolution fixture

The fixture's lockfile was minimal — it had the pkg-a base + peer-variant
entries (the shape that triggered the original `'directory' in undefined`
TypeError in graph-builder) but no `peer@1.0.0` entry. That was enough
before Bug 1's fix, because graph-builder crashed early. Now that the
graph-builder + helper changes let the install path proceed, the next
stage (`filterLockfileByImportersAndEngine`) walks the dependency graph
and throws `LockfileMissingDependencyError: no entry for 'peer@1.0.0'`.

Add a stub directory-resolution entry pointing at the existing
`packages/peer/` workspace package so the graph walker finds it.
This commit is contained in:
Eyal Mizrachi
2026-05-15 07:11:26 -04:00
parent bb724a06ca
commit d3af249acb

View File

@@ -36,6 +36,14 @@ packages:
dependencies:
peer: 1.0.0
# Peer dep resolved to the workspace `packages/peer/` directory. This
# entry is required for `filterLockfileByImportersAndEngine` to walk
# the graph past the variant entry — otherwise it throws
# `LockfileMissingDependencyError` once the graph-builder no longer
# crashes early on the missing `resolution`.
'peer@1.0.0':
resolution: { directory: packages/peer, type: directory }
snapshots:
'pkg-a@file:packages/pkg-a': {}
@@ -43,3 +51,5 @@ snapshots:
'pkg-a@file:packages/pkg-a(peer@1.0.0)':
dependencies:
peer: 1.0.0
'peer@1.0.0': {}