From b008e010a53d4fefafb1dd96d29e15fc07a2645a Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 7 Nov 2026 22:03:20 +0100 Subject: [PATCH] fix(native): sort the offline manifest with localeCompare, so Sonar's reliability gate holds --- client/src/native/offlineShell.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/native/offlineShell.ts b/client/src/native/offlineShell.ts index e30b9b1d3..8bc1bf6bd 100644 --- a/client/src/native/offlineShell.ts +++ b/client/src/native/offlineShell.ts @@ -88,7 +88,7 @@ export async function keepOfflineShellFresh(fetchImpl: typeof fetch = fetch, lan if (!response.ok) return; const files = manifestFiles(await response.json(), language); // The build and the language together: a new language needs its own chunk. - const build = `${[...files].sort().find((f) => /index-[^/]+\.js$/.test(f)) ?? files.length}:${language ?? 'en'}`; + const build = `${[...files].sort((a, b) => a.localeCompare(b)).find((f) => /index-[^/]+\.js$/.test(f)) ?? files.length}:${language ?? 'en'}`; if (warmedBuild() === build) return; const complete = await warmCache(files, (path) => fetchImpl(path, { priority: 'low' } as RequestInit).then((r) => r.blob())