Skip to content

Commit 6a62490

Browse files
committed
chore(node): Move a function further down
Group the Yarn command based functions together. Signed-off-by: Frank Viernau <[email protected]>
1 parent e32d8ae commit 6a62490

File tree

1 file changed

+13
-13
lines changed
  • plugins/package-managers/node/src/main/kotlin/yarn2

1 file changed

+13
-13
lines changed

plugins/package-managers/node/src/main/kotlin/yarn2/Yarn2.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,6 @@ class Yarn2(override val descriptor: PluginDescriptor = Yarn2Factory.descriptor,
9292
analyzerConfig: AnalyzerConfiguration
9393
) = definitionFiles.forEach { yarn2Command.checkVersion(it.parentFile) }
9494

95-
private fun getWorkspaceModuleDirs(workingDir: File): Set<File> {
96-
val process = yarn2Command.run(
97-
workingDir,
98-
"workspaces",
99-
"list",
100-
"--json"
101-
).requireSuccess()
102-
103-
return parseWorkspaceInfo(process.stdout).mapTo(mutableSetOf()) {
104-
workingDir.resolve(it.location).realFile
105-
}
106-
}
107-
10895
override fun resolveDependencies(
10996
analysisRoot: File,
11097
definitionFile: File,
@@ -166,6 +153,19 @@ class Yarn2(override val descriptor: PluginDescriptor = Yarn2Factory.descriptor,
166153
return parsePackageInfos(process.stdout)
167154
}
168155

156+
private fun getWorkspaceModuleDirs(workingDir: File): Set<File> {
157+
val process = yarn2Command.run(
158+
workingDir,
159+
"workspaces",
160+
"list",
161+
"--json"
162+
).requireSuccess()
163+
164+
return parseWorkspaceInfo(process.stdout).mapTo(mutableSetOf()) {
165+
workingDir.resolve(it.location).realFile
166+
}
167+
}
168+
169169
internal fun getRemotePackageDetails(workingDir: File, moduleIds: Set<String>): Set<PackageJson> {
170170
val cachedResults = moduleIds.mapNotNull { moduleId ->
171171
yarnInfoCache[moduleId]?.let { moduleId to it }

0 commit comments

Comments
 (0)