@@ -43,11 +43,11 @@ struct ProfileOptions: ParsableArguments {
43
43
@Option ( name: . long, help: " Profile to use for the given command " )
44
44
var profile : String ?
45
45
46
- var usedProfile : PackageCollectionsModel . Profile {
46
+ var usedProfile : PackageCollectionsModel . Profile ? {
47
47
if let profile = profile {
48
48
return . init( name: profile)
49
49
} else {
50
- return . default
50
+ return nil
51
51
}
52
52
}
53
53
}
@@ -287,8 +287,8 @@ public struct SwiftPackageCollectionsTool: ParsableCommand {
287
287
}
288
288
289
289
let modules = version. targets. compactMap { $0. moduleName } . joined ( separator: " , " )
290
- let platforms = optionalRow ( " Supported Platforms" , version. verifiedPlatforms? . map { $0. name } . joined ( separator: " , " ) )
291
- let swiftVersions = optionalRow ( " Supported Swift Versions" , version. verifiedSwiftVersions? . map { $0. rawValue } . joined ( separator: " , " ) )
290
+ let platforms = optionalRow ( " Verified Platforms" , version. verifiedPlatforms? . map { $0. name } . joined ( separator: " , " ) )
291
+ let swiftVersions = optionalRow ( " Verified Swift Versions" , version. verifiedSwiftVersions? . map { $0. rawValue } . joined ( separator: " , " ) )
292
292
let license = optionalRow ( " License " , version. license? . type. description)
293
293
let cves = optionalRow ( " CVEs " , version. cves? . map { $0. identifier } . joined ( separator: " , " ) )
294
294
@@ -341,8 +341,8 @@ private func optionalRow(_ title: String, _ contents: String?) -> String {
341
341
342
342
private extension JSONEncoder {
343
343
func print< T> ( _ value: T ) throws where T : Encodable {
344
- if #available( macOS 10 . 13 , * ) {
345
- self . outputFormatting = [ . prettyPrinted, . sortedKeys]
344
+ if #available( macOS 10 . 15 , * ) {
345
+ self . outputFormatting = [ . prettyPrinted, . sortedKeys, . withoutEscapingSlashes ]
346
346
}
347
347
348
348
let jsonData = try self . encode ( value)
0 commit comments