feat(updates): add AtomGit update download source
This commit is contained in:
1 parent
cb42a4184a
commit
6f2e4774f4
14 files changed
+75
-18
No files matched your search
@@ -45,8 +45,9 @@ describe("normalizeEditorSettings", () => {
|
||||
expect(normalizeEditorSettings({ restoreOpenTabsOnLaunch: true } as any).openTabsRestoreMode).toBe("all");
|
||||
});
|
||||
|
||||
it("preserves CNB update download source and rejects invalid values", () => {
|
||||
it("preserves mirror update download sources and rejects invalid values", () => {
|
||||
expect(normalizeEditorSettings({ updateDownloadSource: "cnb" }).updateDownloadSource).toBe("cnb");
|
||||
expect(normalizeEditorSettings({ updateDownloadSource: "atomgit" }).updateDownloadSource).toBe("atomgit");
|
||||
expect(normalizeEditorSettings({ updateDownloadSource: "mirror" as any }).updateDownloadSource).toBe("official");
|
||||
});
|
||||
});
|
||||
@@ -59,7 +59,7 @@ export type DesktopIconTheme = "default" | "black";
|
||||
|
||||
export type InterfaceLayout = "separated" | "classic";
|
||||
|
||||
export type UpdateDownloadSource = "official" | "cnb";
|
||||
export type UpdateDownloadSource = "official" | "cnb" | "atomgit";
|
||||
export type SqlSemanticDiagnosticsMode = "auto" | "enabled" | "disabled";
|
||||
export type OpenTabsRestoreMode = "all" | "pinned" | "none";
|
||||
|
||||
@@ -533,6 +533,7 @@ function normalizeTableFontSize(value: unknown): number {
|
||||
}
|
||||
|
||||
function normalizeUpdateDownloadSource(value: unknown): UpdateDownloadSource {
|
||||
if (value === "atomgit") return "atomgit";
|
||||
return value === "cnb" ? "cnb" : DEFAULT_EDITOR_SETTINGS.updateDownloadSource;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user