Commit 84c5684
feat(node): Implement handling of (trainsitive) dependency aliases
When dependency aliases are used for transitive dependencies, the
`name` property of tree nodes output by `yarn list` have a different
format, but only in case the version is a constraint, e.g. [1]. While
the node which has the resolved version still has the "normal" format,
e.g. [2].
Adjust the replacement during version resolution, so that the
replacement key is either the `alias` or the `name`.
Note: Yarn behaves differently in case aliases are used for direct
dependencies. Adding the necessary handling is left for a future
change.
Fixes: #10295.
[1]: `"name": "string-width-cjs@npm:string-width@^4.2.0"`
[2] `"name": "string-width-cjs@4.2.3"`
Signed-off-by: Frank Viernau <frank_viernau@epam.com>1 parent 30e700c commit 84c5684
File tree
6 files changed
+742
-8
lines changed- plugins/package-managers/node/src
- funTest
- assets/projects/synthetic/yarn
- alias-use-for-transitive-deps
- kotlin/yarn
- main/kotlin/yarn
- test/kotlin
6 files changed
+742
-8
lines changed
0 commit comments