Skip to content

Commit

Permalink
docs(node): Remove a couple of comments
Browse files Browse the repository at this point in the history
The comments do not provide much information.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Nov 7, 2024
1 parent 18b2cb0 commit 52ff169
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions plugins/package-managers/node/src/main/kotlin/yarn/Yarn.kt
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@ open class Yarn(
// TODO: Add support for bundledDependencies.
private fun resolveDependenciesInternal(definitionFile: File): List<ProjectAnalyzerResult> {
val workingDir = definitionFile.parentFile

// Actually installing the dependencies is the easiest way to get the metadata of all transitive
// dependencies (i.e. their respective "package.json" files). As NPM uses a global cache, the same
// dependency is only ever downloaded once.
installDependencies(workingDir)

val projectDirs = findWorkspaceSubmodules(workingDir).toSet() + definitionFile.parentFile
Expand Down Expand Up @@ -348,13 +344,9 @@ open class Yarn(
override fun createPackageManagerResult(projectResults: Map<File, List<ProjectAnalyzerResult>>) =
PackageManagerResult(projectResults, graphBuilder.build(), graphBuilder.packages())

/**
* Install dependencies using the given package manager command.
*/
private fun installDependencies(workingDir: File) {
requireLockfile(workingDir) { hasLockfile(workingDir) }

// Install all NPM dependencies to enable NPM to list dependencies.
run(workingDir, "install", "--ignore-scripts", "--ignore-engines", "--immutable")
}

Expand Down

0 comments on commit 52ff169

Please sign in to comment.