Skip to content

Commit

Permalink
chore(node): Rename a field to plural as it is a set
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Nov 8, 2024
1 parent d6c8fad commit ec23aec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions plugins/package-managers/node/src/main/kotlin/yarn2/Yarn2.kt
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class Yarn2(
}

val hash = details.hash
val authors = details.author
val authors = details.authors
var vcsFromPackage = details.vcsFromPackage

if (details.vcsFromDownloadUrl.url != details.downloadUrl) {
Expand Down Expand Up @@ -530,7 +530,9 @@ class Yarn2(
val description = packageJson.description.orEmpty()
val vcsFromPackage = parseNpmVcsInfo(packageJson)
val homepage = packageJson.homepage.orEmpty()
val author = packageJson.authors.flatMap { parseAuthorString(it.name) }.mapNotNullTo(mutableSetOf()) { it.name }
val authors = packageJson.authors
.flatMap { parseAuthorString(it.name) }
.mapNotNullTo(mutableSetOf()) { it.name }
val downloadUrl = packageJson.dist?.tarball.orEmpty().fixNpmDownloadUrl()

val hash = Hash.create(packageJson.dist?.shasum.orEmpty())
Expand All @@ -546,7 +548,7 @@ class Yarn2(
homepage,
downloadUrl,
hash,
author
authors
)
}

Expand Down Expand Up @@ -648,7 +650,7 @@ private data class AdditionalData(
val homepage: String = "",
val downloadUrl: String = "",
val hash: Hash = Hash.NONE,
val author: Set<String> = emptySet()
val authors: Set<String> = emptySet()
)

/**
Expand Down

0 comments on commit ec23aec

Please sign in to comment.