KT-34468 Yarn. Star version support fix
This commit is contained in:
committed by
Ilya Goncharov
parent
d494881cb9
commit
0d1bf66c2a
+5
-3
@@ -114,11 +114,13 @@ abstract class YarnBasics : NpmApi {
|
||||
visited[src] = src
|
||||
|
||||
val key = dependencyKey(src.key, src.version)
|
||||
val deps = byKey[key]
|
||||
?: if (src.version == "*") byKey.entries
|
||||
val deps = if (src.version != "*") {
|
||||
byKey[key]
|
||||
} else {
|
||||
byKey.entries
|
||||
.firstOrNull { it.key.startsWith(dependencyKey(src.key, "")) }
|
||||
?.value
|
||||
else null
|
||||
}
|
||||
|
||||
if (deps == null) {
|
||||
error("Cannot find $key in yarn.lock")
|
||||
|
||||
Reference in New Issue
Block a user