fix(core): nesting npm lock file deps should support multi nests #14949
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Imagine the following situation:
A@v1 -> D@v2 -> B@v2
B@v1
C@v1 -> B@v2
D@v1
Package
B@v2
will have two nests - one as a direct child ofC
and another one as a child ofA
(since A has noB
child of its own). Current implementation explicitly checks that there is only a single slot to placeB@v2
causing this package to never be nested.We need to support multiple nesting slots.
Current Behavior
If the package version has multiple nesting places, the stringifier ends up in the loop
Expected Behavior
Npm stringifier should support multiple nesting slots for the same package
Related Issue(s)
Fixes #