KT-34468 Yarn. Dependency check at the beginning
This commit is contained in:
committed by
Ilya Goncharov
parent
c2b3dd8b33
commit
d494881cb9
+17
-17
@@ -120,26 +120,26 @@ abstract class YarnBasics : NpmApi {
|
||||
?.value
|
||||
else null
|
||||
|
||||
if (deps != null) {
|
||||
src.resolvedVersion = deps.version
|
||||
src.integrity = deps.integrity
|
||||
src.dependencies.addAll(deps.dependencies.map { dep ->
|
||||
val scopedName = dep.scopedName
|
||||
val child = NpmDependency(
|
||||
src.project,
|
||||
scopedName.toString(),
|
||||
dep.version ?: "*"
|
||||
)
|
||||
child.parent = src
|
||||
|
||||
resolveRecursively(child)
|
||||
|
||||
child
|
||||
})
|
||||
} else {
|
||||
if (deps == null) {
|
||||
error("Cannot find $key in yarn.lock")
|
||||
}
|
||||
|
||||
src.resolvedVersion = deps.version
|
||||
src.integrity = deps.integrity
|
||||
src.dependencies.addAll(deps.dependencies.map { dep ->
|
||||
val scopedName = dep.scopedName
|
||||
val child = NpmDependency(
|
||||
src.project,
|
||||
scopedName.toString(),
|
||||
dep.version ?: "*"
|
||||
)
|
||||
child.parent = src
|
||||
|
||||
resolveRecursively(child)
|
||||
|
||||
child
|
||||
})
|
||||
|
||||
return src
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user