chore: bump supported CLI version to 2.1.74
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m9s
CI / Lint & Test (pull_request) Successful in 18m25s
CI / Build Linux (pull_request) Has been cancelled
CI / Build Windows (cross-compile) (pull_request) Has been cancelled

This commit is contained in:
2026-03-13 00:40:52 -07:00
committed by Naomi Carrigan
parent cadbf73d80
commit 5c16037f8b
2 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -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<string | null>(null);
+11 -11
View File
@@ -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);
});
});