diff --git a/src/lib/components/CliVersion.svelte b/src/lib/components/CliVersion.svelte index 5f1028a..2361492 100644 --- a/src/lib/components/CliVersion.svelte +++ b/src/lib/components/CliVersion.svelte @@ -2,7 +2,7 @@ import { invoke } from "@tauri-apps/api/core"; import { onMount } from "svelte"; - const SUPPORTED_CLI_VERSION = "2.1.72"; + const SUPPORTED_CLI_VERSION = "2.1.74"; let installedVersion = $state("Loading..."); let latestNpmVersion = $state(null); diff --git a/src/lib/components/CliVersion.test.ts b/src/lib/components/CliVersion.test.ts index 37f5b8d..b3f9d9e 100644 --- a/src/lib/components/CliVersion.test.ts +++ b/src/lib/components/CliVersion.test.ts @@ -19,7 +19,7 @@ import { describe, it, expect } from "vitest"; -const SUPPORTED_CLI_VERSION = "2.1.72"; +const SUPPORTED_CLI_VERSION = "2.1.74"; function compareVersions(a: string, b: string): number { const aParts = a.split(".").map(Number); @@ -41,7 +41,7 @@ describe("SUPPORTED_CLI_VERSION", () => { }); it("matches the expected audited version", () => { - expect(SUPPORTED_CLI_VERSION).toBe("2.1.72"); + expect(SUPPORTED_CLI_VERSION).toBe("2.1.74"); }); }); @@ -128,7 +128,7 @@ describe("compareVersions", () => { }); it("returns 0 for exactly the supported version", () => { - expect(compareVersions("2.1.72", SUPPORTED_CLI_VERSION)).toBe(0); + expect(compareVersions("2.1.74", SUPPORTED_CLI_VERSION)).toBe(0); }); }); }); @@ -149,34 +149,34 @@ describe("updateAvailable", () => { }); it("returns false when installed is Loading...", () => { - expect(isUpdateAvailable("Loading...", "2.1.72")).toBe(false); + expect(isUpdateAvailable("Loading...", "2.1.74")).toBe(false); }); it("returns false when installed is Unknown", () => { - expect(isUpdateAvailable("Unknown", "2.1.72")).toBe(false); + expect(isUpdateAvailable("Unknown", "2.1.74")).toBe(false); }); it("returns false when installed equals latest", () => { - expect(isUpdateAvailable("2.1.72", "2.1.72")).toBe(false); + expect(isUpdateAvailable("2.1.74", "2.1.74")).toBe(false); }); it("returns false when installed is ahead of latest", () => { - expect(isUpdateAvailable("2.1.73", "2.1.72")).toBe(false); + expect(isUpdateAvailable("2.1.75", "2.1.74")).toBe(false); }); it("returns true when installed is behind latest", () => { - expect(isUpdateAvailable("2.1.70", "2.1.72")).toBe(true); + expect(isUpdateAvailable("2.1.70", "2.1.74")).toBe(true); }); it("returns true when installed has a lower minor version", () => { - expect(isUpdateAvailable("2.0.99", "2.1.72")).toBe(true); + expect(isUpdateAvailable("2.0.99", "2.1.74")).toBe(true); }); it("handles version strings with extra info like '2.1.70 (build 123)'", () => { - expect(isUpdateAvailable("2.1.70 (build 123)", "2.1.72")).toBe(true); + expect(isUpdateAvailable("2.1.70 (build 123)", "2.1.74")).toBe(true); }); it("returns false for unparseable installed version", () => { - expect(isUpdateAvailable("not-a-version", "2.1.72")).toBe(false); + expect(isUpdateAvailable("not-a-version", "2.1.74")).toBe(false); }); });