Skip to content

Commit

Permalink
refactor(node): Use the info alias for the view command
Browse files Browse the repository at this point in the history
Even though `npm view` is the actual command name [1], use its alias
`npm info` to align with `yarn info` which has a similar purpose. Note
that there is no `yarn view` at all.

[1]: https://docs.npmjs.com/cli/v10/commands/npm-view

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Sep 11, 2024
1 parent 0efc494 commit 4d854a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/package-managers/node/src/main/kotlin/Npm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ open class Npm(
}

protected open fun getRemotePackageDetails(workingDir: File, packageName: String): JsonNode {
val process = run(workingDir, "view", "--json", packageName)
val process = run(workingDir, "info", "--json", packageName)
return jsonMapper.readTree(process.stdout)
}

Expand Down

0 comments on commit 4d854a7

Please sign in to comment.