fix: resolving peer dependencies from linked in dependencies (#6561)
This commit is contained in:
1 parent
bcbfd42c44
commit
ee78f144d5
2 files changed
+9
No files matched your search
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/resolve-dependencies": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Peers resolution should not fail when a linked in dependency resolves a peer dependency.
|
||||
@@ -279,6 +279,9 @@ function resolvePeersOfNode<T extends PartialResolvedPackage> (
|
||||
ctx.pathsByNodeId[cachedNodeId] &&
|
||||
ctx.pathsByNodeId[cachedNodeId] === ctx.pathsByNodeId[parentPkgNodeId]
|
||||
) return true
|
||||
if (!ctx.dependenciesTree[parentPkgNodeId] && parentPkgNodeId.startsWith('link:')) {
|
||||
return false
|
||||
}
|
||||
const parentDepPath = (ctx.dependenciesTree[parentPkgNodeId].resolvedPackage as T).depPath
|
||||
if (!ctx.purePkgs.has(parentDepPath)) return false
|
||||
const cachedDepPath = (ctx.dependenciesTree[cachedNodeId].resolvedPackage as T).depPath
|
||||
|
||||
Reference in new issue
Block a user