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
|
?.value
|
||||||
else null
|
else null
|
||||||
|
|
||||||
if (deps != 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 {
|
|
||||||
error("Cannot find $key in yarn.lock")
|
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
|
return src
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user