Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Ask VS Code's own update service about VS Code

Țugui Dragoș26292e994e75
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 1e7006a2..5942084b 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -355,29 +355,31 @@ macOS asks the user to approve it once. It talks to the app over XPC.
`SUVerifyUpdateBeforeExtraction`, and `SUAllowsAutomaticUpdates` off), the one place Sparkle reads its security
settings from. It asks on its own only while Check for app updates is on (`OwnUpdateCheck`), and the update
round of the other apps passes over Peel.
-- **Updates of other apps.** `UpdateChecker` asks each app's own feed, or the App Store about an app from the App
- Store, and uses what Homebrew knows for an app a cask installed: first with Automatic or Homebrew preferred, and
- under any choice once the app's own source can't answer, an "up to date" only for a day after Homebrew last checked
- for new versions (`Homebrew.lastUpdateCheck`: while it reads its API, the date of the definitions file it downloads
- or confirms, since a fetch of its own repository leaves them as they were; otherwise the time of `.git/FETCH_HEAD`
- in its repository, which Homebrew itself compares before updating on its own). An answer Homebrew gives in place of
- the app's own source carries what that source answered (`UpdateAnswer.standsInFor`, kept in `UpdateMemory`): the
- source's answer stands again once Homebrew's no longer counts, the next check follows the source's own count, and an
- update the source found earlier stays. What Homebrew's casks and the app's own files decide without a server, and
- what Homebrew knows where the app's own source last had no answer (`statusWithoutAsking`), shows as soon as Homebrew
- is read, and again at every round, an update Homebrew no longer reports is forgotten then, and Peel reads Homebrew
- again once it has checked since. From the App Store it reads the listing of the installed bundle
- (`AppStoreListing`): the Mac's, which Apple gives for the desktop, also for an app sold once for iPhone and Mac, or
- the iPhone and iPad one for an app of those devices installed on the Mac, at most 20 lookups in any minute in a
- process, the pace Apple documents for its lookup (`RequestWindow`). An app that came with macOS or from Setapp gets
- no feed (`UpdateFeed.detect`, `InstalledApp.isFromSetapp`): Software Update and Setapp keep them current, whatever
- feed the bundle carries. A check waits up to 30 seconds for a Mac just awake to go online, and one made while it
- isn't online counts for nothing (`UpdateAnswer.wasOffline`): what was known stays and the app is asked at the next
- round. Every answer that changes nothing makes the next check of that app wait longer, up to a week
- (`UpdateSchedule`), though the first round after Peel opens also asks about every app whose answer is a day old
- (`UpdateMemory.isADayOld`). `UpdateMemory` keeps the last answer across launches, with the revision of the checker
- that gave it (`UpdateChecker.revision`): an answer an earlier revision gave about an app it couldn't check, or about
- one this revision asks nobody about, is dropped, so the app is asked again at the next round.
+- **Updates of other apps.** `UpdateChecker` asks each app's own feed (a Sparkle appcast, electron-updater's file, or,
+ for a stable build of VS Code, the service its `product.json` names, as VS Code asks it, `VSCodeUpdateService`), or
+ the App Store about an app from the App Store, and uses what Homebrew knows for an app a cask installed: first with
+ Automatic or Homebrew preferred, and under any choice once the app's own source can't answer, an "up to date" only
+ for a day after Homebrew last checked for new versions (`Homebrew.lastUpdateCheck`: while it reads its API, the date
+ of the definitions file it downloads or confirms, since a fetch of its own repository leaves them as they were;
+ otherwise the time of `.git/FETCH_HEAD` in its repository, which Homebrew itself compares before updating on its
+ own). An answer Homebrew gives in place of the app's own source carries what that source answered
+ (`UpdateAnswer.standsInFor`, kept in `UpdateMemory`): the source's answer stands again once Homebrew's no longer
+ counts, the next check follows the source's own count, and an update the source found earlier stays. What Homebrew's
+ casks and the app's own files decide without a server, and what Homebrew knows where the app's own source last had
+ no answer (`statusWithoutAsking`), shows as soon as Homebrew is read, and again at every round, an update Homebrew
+ no longer reports is forgotten then, and Peel reads Homebrew again once it has checked since. From the App Store it
+ reads the listing of the installed bundle (`AppStoreListing`): the Mac's, which Apple gives for the desktop, also
+ for an app sold once for iPhone and Mac, or the iPhone and iPad one for an app of those devices installed on the
+ Mac, at most 20 lookups in any minute in a process, the pace Apple documents for its lookup (`RequestWindow`). An
+ app that came with macOS or from Setapp gets no feed (`UpdateFeed.detect`, `InstalledApp.isFromSetapp`): Software
+ Update and Setapp keep them current, whatever feed the bundle carries. A check waits up to 30 seconds for a Mac just
+ awake to go online, and one made while it isn't online counts for nothing (`UpdateAnswer.wasOffline`): what was
+ known stays and the app is asked at the next round. Every answer that changes nothing makes the next check of that
+ app wait longer, up to a week (`UpdateSchedule`), though the first round after Peel opens also asks about every app
+ whose answer is a day old (`UpdateMemory.isADayOld`). `UpdateMemory` keeps the last answer across launches, with the
+ revision of the checker that gave it (`UpdateChecker.revision`): an answer an earlier revision gave about an app it
+ couldn't check, or about one this revision asks nobody about, is dropped, so the app is asked again at the next
+ round.
- **Orphaned Files.** `OrphanScanner` lists what no installed app claims, under the app Peel saw go when it can
name it (`AppMemory`), and selects nothing for the person. An app macOS knows on another disk that claims something
is remembered too (`OrphanScan.appsOnOtherDisks`, `Disks`), so its files stay its own while that disk isn't
diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift b/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift
index 03549760..d6c19072 100644
--- a/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift
@@ -97,6 +97,12 @@ public enum AppInspector {
let isSystemProtected = isSystemProtected(url)
let use = use(of: url)
let electronConfiguration = ElectronUpdater.configuration(in: contents)
+ let architectures = executable.flatMap(MachOHeader.architectures(ofExecutableAt:)) ?? []
+ let asksForIntelFirst = (info["LSArchitecturePriority"] as? [String])?.first == "x86_64"
+ let vsCodeProduct = ProductFolders.vsCodeProduct(of: url)
+ // VS Code asks for the build of the processor it runs on, Intel code running translated on Apple silicon.
+ let runsOnAppleSilicon = HostArchitecture.isAppleSilicon && architectures.contains(.arm64)
+ && !(asksForIntelFirst && architectures.contains(.x86_64))
return InstalledApp(
url: url,
@@ -109,8 +115,8 @@ public enum AppInspector {
developer: signing.developer,
applicationGroups: signing.applicationGroups,
embeddedBundleIdentifiers: embeddedBundleIdentifiers(in: contents, isWrapped: layout.isWrapped),
- architectures: executable.flatMap(MachOHeader.architectures(ofExecutableAt:)) ?? [],
- asksForIntelFirst: (info["LSArchitecturePriority"] as? [String])?.first == "x86_64",
+ architectures: architectures,
+ asksForIntelFirst: asksForIntelFirst,
isFromAppStore: isFromAppStore,
isSystemProtected: isSystemProtected,
enclosingPackage: url.enclosingPackage,
@@ -120,12 +126,15 @@ public enum AppInspector {
updateFeed: UpdateFeed.detect(
info: info,
electronConfiguration: electronConfiguration,
+ vsCodeFeed: vsCodeProduct.flatMap {
+ VSCodeUpdateService.feedURL(product: $0, runsOnAppleSilicon: runsOnAppleSilicon)
+ },
appStoreListing: appStoreListing,
isSystemProtected: isSystemProtected,
isFromSetapp: InstalledApp.isFromSetapp(at: url, identifier: bundleIdentifier)
),
updaterFolder: electronConfiguration.flatMap(ElectronUpdater.downloadsFolder(fromConfiguration:)),
- productFolders: ProductFolders.of(appAt: url),
+ productFolders: ProductFolders.of(appAt: url, vsCodeProduct: vsCodeProduct),
webApp: bundleIdentifier.flatMap { WebApp.of(identifier: $0, info: info) },
carriesSystemExtensions: AppExtensions.systemExtensions(carriedBy: url).map { !$0.isEmpty } ?? true
)
diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/Inventory.swift b/Packages/PeelCore/Sources/PeelCore/Apps/Inventory.swift
index c2ac6238..ad1f39e6 100644
--- a/Packages/PeelCore/Sources/PeelCore/Apps/Inventory.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Apps/Inventory.swift
@@ -108,6 +108,7 @@ public struct Inventory: Sendable {
return switch app.updateFeed {
case .sparkle(let url): ("Sparkle", url.absoluteString)
case .electron(let url): ("Electron", url.absoluteString)
+ case .vsCode(let url): ("VS Code", url.absoluteString)
case .appStore, nil: origins?.address(of: app.url).map { ("Downloaded", $0.absoluteString) } ?? ("Unknown", nil)
}
}
diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/ProductFolders.swift b/Packages/PeelCore/Sources/PeelCore/Apps/ProductFolders.swift
index e234f3e6..056a5b3e 100644
--- a/Packages/PeelCore/Sources/PeelCore/Apps/ProductFolders.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Apps/ProductFolders.swift
@@ -48,8 +48,8 @@ enum ProductFolders {
/// What a code editor built on VS Code reads to name its folders.
static let vsCodeFile = "Contents/Resources/app/product.json"
- static func of(appAt url: URL) -> [ProductFolder] {
- jetBrainsFolders(in: json(at: url.appending(path: jetBrainsFile))) + vsCodeFolders(in: vsCodeProduct(of: url))
+ static func of(appAt url: URL, vsCodeProduct: [String: Any]?) -> [ProductFolder] {
+ jetBrainsFolders(in: json(at: url.appending(path: jetBrainsFile))) + vsCodeFolders(in: vsCodeProduct)
}
/// Whether `folder`, read back from a file, is one these rules would name.
diff --git a/Packages/PeelCore/Sources/PeelCore/Updates/UpdateChecker.swift b/Packages/PeelCore/Sources/PeelCore/Updates/UpdateChecker.swift
index 024c0d84..a1adc28a 100644
--- a/Packages/PeelCore/Sources/PeelCore/Updates/UpdateChecker.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Updates/UpdateChecker.swift
@@ -4,7 +4,7 @@ import Synchronization
public struct UpdateChecker: Sendable {
/// Raised whenever the checker answers some apps differently: an app an earlier revision couldn't check is asked
/// again rather than waited out, and so is one this revision asks nobody about (`UpdateMemory.recalled`).
- public static let revision = 3
+ public static let revision = 4
/// The largest reply read. An update feed is a small XML, YAML, or JSON file, and its address comes from
/// the app's own bundle, so the server is not trusted to keep its reply small.
@@ -236,6 +236,7 @@ public struct UpdateChecker: Sendable {
case nil: UpdateAnswer(status: .unsupported)
case .sparkle(let url): await sparkleAnswer(for: app, installed: installed, at: url)
case .electron(let url): await electronAnswer(for: app, installed: installed, at: url)
+ case .vsCode(let url): await vsCodeAnswer(installed: installed, at: url)
case .appStore: await appStoreAnswer(for: app, earlier: earlier, notListedBefore: notListedBefore)
}
}
@@ -281,6 +282,22 @@ public struct UpdateChecker: Sendable {
)
}
+ private func vsCodeAnswer(installed: String, at url: URL) async -> UpdateAnswer {
+ let reply = await fetchReply(url)
+ // The service answers 204, with nothing, while the build is the newest (`doIsLatestVersion`).
+ if reply.status == 204 { return UpdateAnswer(status: .upToDate) }
+ guard let data = reply.data else { return UpdateAnswer(status: .failed, wasOffline: reply.wasOffline) }
+ switch VSCodeUpdateService.read(data) {
+ case .unreadable:
+ return UpdateAnswer(status: .failed)
+ case .nothingOffered:
+ return UpdateAnswer(status: .upToDate)
+ case .offered(let latest):
+ guard VersionComparison.isNewer(latest, than: installed) else { return UpdateAnswer(status: .upToDate) }
+ return UpdateAnswer(status: .updateAvailable(version: latest, source: .developer, releaseNotes: nil))
+ }
+ }
+
/// Asks the App Store about `app`, but only when the app has an App Store receipt, whoever calls this.
/// Asking about other apps would send Apple, one identifier at a time, the list of installed apps.
private func appStoreAnswer(
@@ -372,7 +389,7 @@ public struct UpdateChecker: Sendable {
let notes = ElectronUpdater.releaseNotes(fromFeed: feed)
else { return .notGiven }
return .found(notes)
- case .appStore, nil:
+ case .vsCode, .appStore, nil:
return .notGiven
}
}
diff --git a/Packages/PeelCore/Sources/PeelCore/Updates/UpdateFeed.swift b/Packages/PeelCore/Sources/PeelCore/Updates/UpdateFeed.swift
index def63c33..c8e6fa77 100644
--- a/Packages/PeelCore/Sources/PeelCore/Updates/UpdateFeed.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Updates/UpdateFeed.swift
@@ -4,6 +4,7 @@ internal import PeelPrivileged
public enum UpdateFeed: Sendable, Hashable {
case sparkle(URL)
case electron(URL)
+ case vsCode(URL)
case appStore(AppStoreListing)
}
@@ -64,6 +65,7 @@ extension UpdateFeed {
static func detect(
info: [String: Any],
electronConfiguration: String?,
+ vsCodeFeed: URL?,
appStoreListing: AppStoreListing?,
isSystemProtected: Bool,
isFromSetapp: Bool
@@ -80,6 +82,9 @@ extension UpdateFeed {
if let feed = electronConfiguration.flatMap(ElectronUpdater.feedURL(fromConfiguration:)) {
return .electron(feed)
}
+ if let vsCodeFeed {
+ return .vsCode(vsCodeFeed)
+ }
// An app that names no update source gets no feed. Asking Apple about it would send its identifier
// to itunes.apple.com, and doing that for every app would send Apple the list of installed apps, which
// update checks never do.
diff --git a/Packages/PeelCore/Sources/PeelCore/Updates/VSCodeUpdateService.swift b/Packages/PeelCore/Sources/PeelCore/Updates/VSCodeUpdateService.swift
new file mode 100644
index 00000000..f062e630
--- /dev/null
+++ b/Packages/PeelCore/Sources/PeelCore/Updates/VSCodeUpdateService.swift
@@ -0,0 +1,36 @@
+import Foundation
+
+/// The service Microsoft's build of VS Code asks about its own updates (`updateService.darwin.ts` and
+/// `abstractUpdateService.ts` in microsoft/vscode at e646868227c3e3a9e3f24277c8c7220be42c0be7).
+enum VSCodeUpdateService {
+ /// An editor built on VS Code names a service of its own, whose answers Peel doesn't know.
+ static let service = "https://update.code.visualstudio.com"
+
+ enum Reading: Equatable {
+ case unreadable
+ case nothingOffered
+ case offered(version: String)
+ }
+
+ /// The address VS Code asks when you check for updates (`createUpdateURL`), from its `product.json`: the build's
+ /// platform, its quality and the commit it was made from. Only a stable build, since an Insiders build keeps its
+ /// version from one build to the next.
+ static func feedURL(product: [String: Any], runsOnAppleSilicon: Bool) -> URL? {
+ guard product["updateUrl"] as? String == service, product["quality"] as? String == "stable",
+ let commit = product["commit"] as? String, commit.wholeMatch(of: /[0-9a-f]{40}/) != nil
+ else { return nil }
+ let platform = product["darwinUniversalAssetId"] as? String ?? (runsOnAppleSilicon ? "darwin-arm64" : "darwin")
+ guard platform.wholeMatch(of: /[a-z0-9-]+/) != nil else { return nil }
+ return URL(string: "\(service)/api/update/\(platform)/stable/\(commit)?u=none")
+ }
+
+ /// A reply as VS Code reads one (`checkForUpdateNoDownload`): it offers a build only when it names the download,
+ /// the commit and the version.
+ static func read(_ data: Data) -> Reading {
+ guard let reply = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any] else { return .unreadable }
+ guard reply["url"] is String, reply["version"] is String, let version = reply["productVersion"] as? String,
+ !version.isEmpty
+ else { return .nothingOffered }
+ return .offered(version: version)
+ }
+}
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/ProductFoldersTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/ProductFoldersTests.swift
index f5e3ce28..fcc574ba 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/ProductFoldersTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/ProductFoldersTests.swift
@@ -16,7 +16,7 @@ struct ProductFoldersTests {
contents: Data(#"{"dataFolderName": ".example-editor", "sharedDataFolderName": ".example-editor-shared"}"#.utf8)
)
- #expect(ProductFolders.of(appAt: ide) == [
+ #expect(folders(of: ide) == [
ProductFolder(
path: "Library/Application Support/ExampleVendor/ExampleIDE2025.2", proof: nil,
work: ["scratches", "consoles"]
@@ -24,11 +24,11 @@ struct ProductFoldersTests {
ProductFolder(path: "Library/Caches/ExampleVendor/ExampleIDE2025.2", proof: nil),
ProductFolder(path: "Library/Logs/ExampleVendor/ExampleIDE2025.2", proof: nil),
])
- #expect(ProductFolders.of(appAt: editor) == [
+ #expect(folders(of: editor) == [
ProductFolder(path: ".example-editor", proof: "argv.json"),
ProductFolder(path: ".example-editor-shared", proof: "sharedStorage"),
])
- #expect(ProductFolders.of(appAt: try directory.directory("Applications/Plain.app")).isEmpty)
+ #expect(folders(of: try directory.directory("Applications/Plain.app")).isEmpty)
}
@Test func namesTheFolderACodeEditorKeepsItsDataInAndTheWorkInside() {
@@ -73,4 +73,8 @@ struct ProductFoldersTests {
#expect(ProductFolders.vsCodeFolders(in: ["dataFolderName": name]).isEmpty, "\(name)")
}
}
+
+ private func folders(of app: URL) -> [ProductFolder] {
+ ProductFolders.of(appAt: app, vsCodeProduct: ProductFolders.vsCodeProduct(of: app))
+ }
}
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/UpdateCheckerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/UpdateCheckerTests.swift
index 36c1d9c9..5022d495 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/UpdateCheckerTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/UpdateCheckerTests.swift
@@ -686,6 +686,29 @@ private final class DroppedProtocol: URLProtocol, @unchecked Sendable {
#expect(await checker.answer(for: sparkleApp()).notes == nil, "nothing waits for an app that is up to date")
}
+ @Test func readsVSCodesServiceAsVSCodeDoes() async throws {
+ let address = "https://update.code.visualstudio.com/api/update/darwin-arm64/stable/e646868227c3e3a9e3f24277c8c7220be42c0be7?u=none"
+ let code = InstalledApp(
+ url: URL(filePath: "/Applications/Visual Studio Code.app"), bundleIdentifier: "com.microsoft.VSCode",
+ name: "Visual Studio Code", version: "1.143.1", updateFeed: .vsCode(try #require(URL(string: address)))
+ )
+ let offer = { (version: String) in
+ #"{"url":"https://example.com/VSCode-darwin-arm64.zip","version":"2c33b50b16c472efe58357d1d2a8a5414bc23fbf","productVersion":"\#(version)"}"#
+ }
+
+ reply("update.code.visualstudio.com", status: 204, "")
+ #expect(await checker.status(for: code) == .upToDate)
+ #expect(CannedProtocol.addresses.withLock { $0.last } == address)
+ reply("update.code.visualstudio.com", offer("1.144.0"))
+ #expect(await checker.status(for: code) == .updateAvailable(version: "1.144.0", source: .developer))
+ reply("update.code.visualstudio.com", offer("1.143.0"))
+ #expect(await checker.status(for: code) == .upToDate)
+ reply("update.code.visualstudio.com", #"{"productVersion":"1.144.0"}"#)
+ #expect(await checker.status(for: code) == .upToDate, "no download named")
+ reply("update.code.visualstudio.com", "<html></html>")
+ #expect(await checker.status(for: code) == .failed)
+ }
+
@Test func anElectronReleaseTheAppWontOfferThisMacIsNoUpdate() async {
let chat = InstalledApp(
url: URL(filePath: "/Applications/Chat.app"), bundleIdentifier: "com.example.chat", name: "Chat",
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/UpdateTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/UpdateTests.swift
index d41f34ed..f10cda59 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/UpdateTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/UpdateTests.swift
@@ -398,6 +398,35 @@ struct UpdateFeedDetectionTests {
#expect(electronApp.updateFeed == .electron(URL(string: "https://example.com/updates/latest-mac.yml")!))
}
+ @Test func findsTheUpdateServiceVSCodeNames() throws {
+ let folder = try TemporaryDirectory()
+ let product = #"""
+ {"nameShort": "Code", "quality": "stable", "updateUrl": "https://update.code.visualstudio.com",
+ "commit": "e646868227c3e3a9e3f24277c8c7220be42c0be7", "darwinUniversalAssetId": "darwin-universal"}
+ """#
+ let app = try #require(AppInspector.inspect(try bundle(info: [:], files: ["Resources/app/product.json": product], in: folder)))
+ let address = "https://update.code.visualstudio.com/api/update/darwin-universal/stable/e646868227c3e3a9e3f24277c8c7220be42c0be7?u=none"
+ #expect(app.updateFeed == .vsCode(try #require(URL(string: address))))
+ }
+
+ @Test func asksVSCodesServiceOnlyAboutAStableBuildOfMicrosofts() {
+ let product: [String: Any] = [
+ "updateUrl": "https://update.code.visualstudio.com", "quality": "stable",
+ "commit": "e646868227c3e3a9e3f24277c8c7220be42c0be7",
+ ]
+ let address = { (platform: String) in
+ "https://update.code.visualstudio.com/api/update/\(platform)/stable/e646868227c3e3a9e3f24277c8c7220be42c0be7?u=none"
+ }
+
+ #expect(VSCodeUpdateService.feedURL(product: product, runsOnAppleSilicon: true)?.absoluteString == address("darwin-arm64"))
+ #expect(VSCodeUpdateService.feedURL(product: product, runsOnAppleSilicon: false)?.absoluteString == address("darwin"))
+ for (key, value) in [("quality", "insider"), ("updateUrl", "https://updates.example.com"), ("commit", "HEAD")] {
+ var other = product
+ other[key] = value
+ #expect(VSCodeUpdateService.feedURL(product: other, runsOnAppleSilicon: true) == nil, "\(key)")
+ }
+ }
+
@Test func readsTheFolderElectronUpdaterKeepsItsDownloadsIn() throws {
let cases: [(settings: String, folder: String?)] = [
("provider: generic\nurl: https://example.com/updates\nupdaterCacheDirName: notes-updater\n", "notes-updater"),
@@ -423,14 +452,14 @@ struct UpdateFeedDetectionTests {
#expect(
UpdateFeed.detect(
- info: info, electronConfiguration: nil, appStoreListing: nil,
+ info: info, electronConfiguration: nil, vsCodeFeed: nil, appStoreListing: nil,
isSystemProtected: true, isFromSetapp: false
)
== nil
)
#expect(
UpdateFeed.detect(
- info: info, electronConfiguration: nil, appStoreListing: nil,
+ info: info, electronConfiguration: nil, vsCodeFeed: nil, appStoreListing: nil,
isSystemProtected: false, isFromSetapp: false
)
== .sparkle(try #require(URL(string: "https://example.com/appcast.xml")))
@@ -464,7 +493,7 @@ struct UpdateFeedDetectionTests {
let peel = ["CFBundleIdentifier": "com.tuguidragos.Peel", "SUFeedURL": feed]
#expect(
UpdateFeed.detect(
- info: peel, electronConfiguration: nil, appStoreListing: nil,
+ info: peel, electronConfiguration: nil, vsCodeFeed: nil, appStoreListing: nil,
isSystemProtected: false, isFromSetapp: false
)
== .sparkle(URL(string: feed)!)
@@ -473,6 +502,7 @@ struct UpdateFeedDetectionTests {
UpdateFeed.detect(
info: ["CFBundleIdentifier": "com.tuguidragos.Peel"],
electronConfiguration: nil,
+ vsCodeFeed: nil,
appStoreListing: nil,
isSystemProtected: false,
isFromSetapp: false