Skip to content

Commit

Permalink
fix(core): fix lockfile remapping for yarn berry with aliases (#17853)
Browse files Browse the repository at this point in the history
(cherry picked from commit cfe1fa0)
  • Loading branch information
meeroslav authored and FrozenPandaz committed Jun 29, 2023
1 parent 0b5cb5b commit db13316
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/nx/src/plugins/js/lock-file/yarn-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,10 @@ function mapSnapshots(
.slice(0, key.indexOf('#'))
.replace(`@patch:${packageName}@`, '@npm:');
}
if (!existingKeys.get(packageName).has(normalizedKey)) {
if (
!existingKeys.get(packageName) ||
!existingKeys.get(packageName).has(normalizedKey)
) {
keysSet.delete(key);
}
}
Expand Down

0 comments on commit db13316

Please sign in to comment.