mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-30 13:02:03 -04:00
fix: resolving peer dependencies from linked in dependencies (#6561)
This commit is contained in:
6
.changeset/plenty-geckos-applaud.md
Normal file
6
.changeset/plenty-geckos-applaud.md
Normal file
@@ -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