mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-19 12:12:34 -04:00
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:
10
installing/deps-restorer/test/fixtures/peer-variant-missing-resolution/pnpm-lock.yaml
generated
vendored
10
installing/deps-restorer/test/fixtures/peer-variant-missing-resolution/pnpm-lock.yaml
generated
vendored
@@ -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': {}
|
||||
|
||||
Reference in New Issue
Block a user