Skip to content

Commit 950e77d

Browse files
authored
Fix CLI output for stars (#3439)
What we are displaying here are stars, not watchers, so the output should reflect that.
1 parent a5f7859 commit 950e77d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Documentation/PackageCollections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Packages:
156156
$ swift package-collection describe [--json] https://github.com/jpsim/yams
157157
Description: A sweet and swifty YAML parser built on LibYAML.
158158
Available Versions: 4.0.0, 3.0.0, ...
159-
Watchers: 14
159+
Stars: 14
160160
Readme: https://github.com/jpsim/Yams/blob/master/README.md
161161
Authors: @norio-nomura, @jpsim
162162
--------------------------------------------------------------

Sources/Commands/SwiftPackageCollectionsTool.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public struct SwiftPackageCollectionsTool: ParsableCommand {
283283
} else {
284284
let description = optionalRow("Description", result.package.summary)
285285
let versions = result.package.versions.map { "\($0.version)" }.joined(separator: ", ")
286-
let watchers = optionalRow("Watchers", result.package.watchersCount?.description)
286+
let stars = optionalRow("Stars", result.package.watchersCount?.description)
287287
let readme = optionalRow("Readme", result.package.readmeURL?.absoluteString)
288288
let authors = optionalRow("Authors", result.package.authors?.map { $0.username }.joined(separator: ", "))
289289
let latestVersion = optionalRow("\(String(repeating: "-", count: 60))\n\(indent())Latest Version", printVersion(result.package.latestVersion))
@@ -293,7 +293,7 @@ public struct SwiftPackageCollectionsTool: ParsableCommand {
293293
} else {
294294
print("""
295295
\(description)
296-
Available Versions: \(versions)\(watchers)\(readme)\(authors)\(latestVersion)
296+
Available Versions: \(versions)\(stars)\(readme)\(authors)\(latestVersion)
297297
""")
298298
}
299299
}

0 commit comments

Comments
 (0)