From f2a18cafe8fd42cb88e1bf31add8e05b76e70ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Tue, 29 Jul 2025 14:55:02 +0200 Subject: [PATCH] fix: use semver sort for ccos updates --- src/routes/(app)/ccos/[device]/+page.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/(app)/ccos/[device]/+page.ts b/src/routes/(app)/ccos/[device]/+page.ts index bff4bad8..17a0b7c9 100644 --- a/src/routes/(app)/ccos/[device]/+page.ts +++ b/src/routes/(app)/ccos/[device]/+page.ts @@ -1,5 +1,6 @@ import type { PageLoad } from "./$types"; import type { DirectoryListing } from "$lib/meta/types/listing"; +import { compare } from "semver"; export const load = (async ({ fetch, params }) => { const result = await fetch( @@ -9,7 +10,7 @@ export const load = (async ({ fetch, params }) => { return { versions: (data as DirectoryListing[]).sort((a, b) => - b.name.localeCompare(a.name), + compare(b.name, a.name), ), device: params.device, };