Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# .swiftformat
# mas
#
# SwiftFormat 0.61.0
# SwiftFormat 0.61.1
#

# Disabled rules (enabled by default)
Expand Down
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,9 @@ Within this section & all subsections, `X` is a placeholder for any type name.
6. `switch`
7. Multiple `guard`
8. `if` / `else if`… / `else`
9. Forced unwrapping (`!` suffix)
10. `fatalError(_:file:line:)`
9. `preconditionFailure(_:file:line:)`
10. Forced unwrapping (`!` suffix)
11. `fatalError(_:file:line:)`

#### Throwing

Expand Down
4 changes: 2 additions & 2 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
brew "actionlint" # 1.7.12
brew "editorconfig-checker" # 3.6.1
brew "gh" # 2.91.0
brew "gh" # 2.92.0
brew "git" # 2.54.0
brew "ipsw" # 3.1.672
brew "markdownlint-cli2" # 0.22.1
brew "periphery" if MacOS.version >= :sequoia && `/usr/bin/arch` == "arm64" # 3.7.4
brew "shellcheck" # 0.11.0
brew "swiftformat" # 0.61.0
brew "swiftformat" # 0.61.1
brew "swiftlint" # 0.63.2
brew "yamllint" # 1.38.0
4 changes: 2 additions & 2 deletions Scripts/mas
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ try (
lookup|info)
{
{ exec "${mas}" "${@}" 3>&1 1>&4 2>&5 } | "${jq}" -sr '
def numberCommas($n):
def number_commas($n):
($n | abs | round | tostring) as $s |
if $n < 0 then "-" else "" end + ([$s | while(length > 0; .[:-3]) | .[-3:]] | reverse | join(","))
;
Expand All @@ -81,7 +81,7 @@ try (
"\($key_map[$k]) \("▁" * ($max_key_length - ($key_map[$k] | length) + 1)) \(
$in[$k] |
if $k == "fileSizeBytes" then
numberCommas(tonumber? / 1e6 // 0) + " MB"
number_commas(tonumber? / 1e6 // 0) + " MB"
elif $k == "currentVersionReleaseDate" then
(fromdateiso8601? | strflocaltime("%Y-%m-%d")) // .
else
Expand Down
4 changes: 2 additions & 2 deletions Sources/mas/AppStore/AppStoreAction+download.swift
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private actor DownloadQueueObserver: CKDownloadQueueObserver {

MAS.printer.notice(
[action.performed.uppercasingFirst, snapshot.appNameAndVersion]
+ (appFolderURL.map { ["in", $0.filePath] } ?? .init()),
+ (appFolderURL.map { ["in", $0.filePath] } ?? .init()), // swiftformat:disable:this indent
)

if let appFolderURL {
Expand Down Expand Up @@ -513,7 +513,7 @@ extension PhaseType: CustomStringConvertible {
case .downloaded:
"Downloaded"
case let .performing(action):
action.performing
action.performing.uppercasingFirst
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Config.swift
// MAS.Config.swift
// mas
//
// Copyright © 2025 mas-cli. All rights reserved.
Expand All @@ -23,8 +23,8 @@ extension MAS {
func run() {
outputFormatOptionGroup.info(
JSON.Object( // swiftformat:disable:this wrap wrapArguments
dictionaryLiteral: // swiftformat:disable indent
("mas", .string(version)), // swiftlint:disable vertical_parameter_alignment_on_call
dictionaryLiteral: // swiftlint:disable vertical_parameter_alignment_on_call
("mas", .string(version)), // swiftformat:disable indent
("slice", .string(runningSliceArchitecture)),
("slices", .string(supportedSliceArchitectures.joined(separator: " "))),
("dist", .string(distribution)),
Expand Down Expand Up @@ -102,7 +102,7 @@ private func configStringValue(_ name: String) -> String {
return unknown
}

return unsafe .init(cString: &buffer) // swiftformat:disable:this spaceAroundOperators
return unsafe .init(cString: &buffer)
}

private let unknown = "unknown"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Get.swift
// MAS.Get.swift
// mas
//
// Copyright © 2026 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Home.swift
// MAS.Home.swift
// mas
//
// Copyright © 2018 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Install.swift
// MAS.Install.swift
// mas
//
// Copyright © 2015 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// List.swift
// MAS.List.swift
// mas
//
// Copyright © 2015 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Lookup.swift
// MAS.Lookup.swift
// mas
//
// Copyright © 2016 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Lucky.swift
// MAS.Lucky.swift
// mas
//
// Copyright © 2017 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Open.swift
// MAS.Open.swift
// mas
//
// Copyright © 2018 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Outdated.swift
// MAS.Outdated.swift
// mas
//
// Copyright © 2015 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Reset.swift
// MAS.Reset.swift
// mas
//
// Copyright © 2016 mas-cli. All rights reserved.
Expand Down Expand Up @@ -43,7 +43,7 @@ extension MAS {
"/System/Library/PrivateFrameworks/AppStoreComponents.framework/Support/appstorecomponentsd",
"/System/Library/PrivateFrameworks/AppStoreDaemon.framework/Support/appstoreagent",
"/System/Library/PrivateFrameworks/CascadeSets.framework/Versions/A/XPCServices"
+ "/SetStoreUpdateService.xpc/Contents/MacOS/SetStoreUpdateService",
+ "/SetStoreUpdateService.xpc/Contents/MacOS/SetStoreUpdateService", // swiftformat:disable:this indent
"/System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Resources/storeaccountd",
"/System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Resources/storeassetd",
"/System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Resources/storedownloadd",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Search.swift
// MAS.Search.swift
// mas
//
// Copyright © 2016 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Seller.swift
// MAS.Seller.swift
// mas
//
// Copyright © 2018 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// SignOut.swift
// MAS.SignOut.swift
// mas
//
// Copyright © 2016 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Uninstall.swift
// MAS.Uninstall.swift
// mas
//
// Copyright © 2018 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Update.swift
// MAS.Update.swift
// mas
//
// Copyright © 2015 mas-cli. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Version.swift
// MAS.Version.swift
// mas
//
// Copyright © 2015 mas-cli. All rights reserved.
Expand Down
Loading
Loading