Sometimes, the npm package-lock.json can accumulate pinned dependencies that can be merged together.
For example:
- Install
A@1
- Install
B@1
requiresA@^2
-> pin toA@2.1
- Install
A@latest
->A@2.3
Now, I have two A
versions:
A@2.3
B@1
->A@2.1
(which can be updated to A@2.3 and re-use the top-level one instead)
I'd like a command that can detect this merge opportunities to get an optimized dependency tree.
Is there such a thing?