fix(evidence): order canonical projections independently of locale

This commit is contained in:
morluto
2026-10-10 05:13:53 +08:00
parent 0f10499245
commit 614fb7681e
22 changed files with 123 additions and 81 deletions
+4 -2
View File
@@ -1,5 +1,7 @@
import { z } from "zod";
import { compareUnicodeCodePoints } from "./unicodeCodePointOrder.js";
/** Stable browser sections used by coverage and omission accounting. */
const browserSectionSchema = z.enum([
"frames",
@@ -138,6 +140,6 @@ const canonicalExclusions = (
): BrowserExclusion[] =>
[...exclusions].sort(
(left, right) =>
left.section.localeCompare(right.section) ||
left.reason.localeCompare(right.reason),
compareUnicodeCodePoints(left.section, right.section) ||
compareUnicodeCodePoints(left.reason, right.reason),
);