Skip to content

Commit

Permalink
fix: error that sometimes happen on projects with linked deps
Browse files Browse the repository at this point in the history
close #5327
close #5614
  • Loading branch information
zkochan committed Nov 13, 2022
1 parent 9ad96e2 commit bf918d1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/mighty-waves-tan.md
@@ -0,0 +1,5 @@
---
"pnpm": patch
---

Fix an error that sometimes happen on projects with linked local dependencies [#5327](https://github.com/pnpm/pnpm/issues/5327).
5 changes: 5 additions & 0 deletions .changeset/poor-berries-yell.md
@@ -0,0 +1,5 @@
---
"@pnpm/resolve-dependencies": patch
---

Fix the nodeId in dependenciesTree for linked local packages.
2 changes: 1 addition & 1 deletion packages/resolve-dependencies/src/resolveDependencies.ts
Expand Up @@ -665,7 +665,7 @@ async function resolveDependenciesOfDependency (

if (resolveDependencyResult == null) return { resolveDependencyResult: null }
if (resolveDependencyResult.isLinkedDependency) {
ctx.dependenciesTree[resolveDependencyResult.pkgId] = {
ctx.dependenciesTree[`link:${path.relative(ctx.lockfileDir, resolveDependencyResult.resolution.directory)}`] = {
children: {},
depth: -1,
installable: true,
Expand Down

0 comments on commit bf918d1

Please sign in to comment.