mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-28 02:53:15 -04:00
fix: don't crash on lockfile with no packages field (#5557)
close #5553
This commit is contained in:
6
.changeset/small-ads-warn.md
Normal file
6
.changeset/small-ads-warn.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/resolve-dependencies": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Don't crash on lockfile with no packages field [#5553](https://github.com/pnpm/pnpm/issues/5553).
|
||||
@@ -332,8 +332,8 @@ async function finishLockfileUpdates (
|
||||
|
||||
// TODO: try to cover with unit test the case when entry is no longer available in lockfile
|
||||
// It is an edge that probably happens if the entry is removed during lockfile prune
|
||||
if (requiresBuild && newLockfile.packages![depPath]) {
|
||||
newLockfile.packages![depPath].requiresBuild = true
|
||||
if (requiresBuild && newLockfile.packages?.[depPath]) {
|
||||
newLockfile.packages[depPath].requiresBuild = true
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user