Skip to content

Commit

Permalink
fix(core): fix lockfile remapping for yarn berry with aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Jun 29, 2023
1 parent 727590a commit 06cd747
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 @@ -348,7 +348,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 06cd747

Please sign in to comment.