Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(resolve-dependencies): a sequence of injected deps via the file p…
…rotocol (#4415)
- Loading branch information
Showing
3 changed files
with
275 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
"@pnpm/resolve-dependencies": patch | ||
"pnpm": patch | ||
--- | ||
|
||
The location of an injected directory dependency should be correctly located, when there is a chain of local dependencies (declared via the `file:` protocol`). | ||
|
||
The next scenario was not working prior to the fix. There are 3 projects in the same folder: foo, bar, qar. | ||
|
||
`foo/package.json`: | ||
|
||
```json | ||
{ | ||
"name": "foo", | ||
"dependencies": { | ||
"bar": "file:../bar" | ||
}, | ||
"dependenciesMeta": { | ||
"bar": { | ||
"injected": true | ||
} | ||
} | ||
} | ||
``` | ||
|
||
`bar/package.json`: | ||
|
||
```json | ||
{ | ||
"name": "bar", | ||
"dependencies": { | ||
"qar": "file:../qar" | ||
}, | ||
"dependenciesMeta": { | ||
"qar": { | ||
"injected": true | ||
} | ||
} | ||
} | ||
``` | ||
|
||
`qar/package.json`: | ||
|
||
```json | ||
{ | ||
"name": "qar" | ||
} | ||
``` | ||
|
||
Related PR: [#4415](https://github.com/pnpm/pnpm/pull/4415). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters