Commit 4be097c
fix(integrity): dedupe packageIds when counting resolved packages
`getResolvedMopsPackageIds()` produces one entry per dependency-table
row, including alias rows like `base`, `base@0`, `base@0.16` all
resolving to the same `base@0.16.0`. The subsequent length comparison
against `Object.keys(lockFileJson.hashes).length` then fails — the
hashes object is naturally deduplicated by its packageId keys, so the
two counts diverge by the number of alias duplicates.
Compare unique packageId counts via `Set` to match the lock file's
semantics.
Fixes #506
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 37bd049 commit 4be097c
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
272 | 277 | | |
273 | 278 | | |
274 | | - | |
| 279 | + | |
275 | 280 | | |
276 | 281 | | |
277 | 282 | | |
| |||
0 commit comments