Files
pnpm/installing
Eyal Mizrachi b77b5797ae fix(graph-builder): guard against missing resolution on peer-variant snapshots
Peer-dep variant snapshots in the lockfile (e.g.
`pkg@file:packages/pkg(peer@2.0.0)`) inherit their resolution from the
base entry and may legally omit `resolution` themselves. The previous
code in `buildGraphFromPackages` accessed `pkgSnapshot.resolution`
directly with the `in` operator, which crashes with
`TypeError: Cannot use 'in' operator to search for 'directory' in undefined`
when `resolution` is unset.

Guarding the access mirrors the pattern in `@pnpm/deps.graph-hasher`,
which already handles missing resolution defensively. A snapshot
without `resolution` is treated as "not a directory dep" — the base
entry still drives directory-dep detection through its own snapshot.
2026-05-14 21:55:27 -04:00
..
2026-05-14 13:31:53 +02:00
2026-05-14 13:31:53 +02:00
2026-05-14 13:31:53 +02:00
2026-05-11 19:56:10 +02:00
2026-05-14 13:31:53 +02:00
2026-05-14 13:31:53 +02:00
2026-05-14 13:31:53 +02:00
2026-05-14 13:31:53 +02:00
2026-05-11 19:56:10 +02:00
2026-05-14 13:31:53 +02:00