fix: supi regression

This commit is contained in:
Zoltan Kochan
2020-09-03 01:19:30 +03:00
parent 501efdabd3
commit 11dea936ac
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"supi": patch
---
Fixing a regression that was shipped with supi v0.41.22. Cyclic dependencies that have peer dependencies are not symlinked to the root of node_modules, when they are direct dependencies.

View File

@@ -206,6 +206,7 @@ function resolvePeersOfNode (
)
if (hit) {
ctx.pathsByNodeId[nodeId] = hit.depPath
ctx.depGraph[hit.depPath].depth = Math.min(ctx.depGraph[hit.depPath].depth, node.depth)
return {
missingPeers: hit.missingPeers,
resolvedPeers: R.fromPairs(hit.resolvedPeers),