Skip to content

Commit

Permalink
refactor(npm): Use a more speaking name for packageFile
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Sep 11, 2024
1 parent 8553c7f commit 0efc494
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/package-managers/node/src/main/kotlin/Npm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@ open class Npm(
* Construct a [Package] by parsing its _package.json_ file and - if applicable - querying additional
* content via the `npm view` command. The result is a [Pair] with the raw identifier and the new package.
*/
internal suspend fun parsePackage(workingDir: File, packageFile: File): Pair<String, Package> {
val packageDir = packageFile.parentFile
internal suspend fun parsePackage(workingDir: File, packageJsonFile: File): Pair<String, Package> {
val packageDir = packageJsonFile.parentFile

logger.debug { "Found a 'package.json' file in '$packageDir'." }

val json = packageFile.readValue<ObjectNode>()
val json = packageJsonFile.readValue<ObjectNode>()

// The "name" and "version" fields are only required if the package is going to be published, otherwise they are
// optional, see
Expand Down

0 comments on commit 0efc494

Please sign in to comment.