mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-16 21:00:37 -04:00
If a workspace has a global peerDependencyRule that is applied by more than one package, the lockfile could contain duplicate copies of the patched range. For example react-dom might have `peerDependencies: 17.0.2 | 17 | 17 | 17 | 17` in the lockfile. This causes merge conflicts as package updates seem to regularly change the number of duplicates, causing lockfile conflicts. The fix checks if the same widened range has already been appended, and ignores subsequent duplicates if they exist.