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
@@ -326,11 +326,11 @@ const uniquePaths = (paths: readonly CurrentPath[]): CurrentPath[] =>
path,
]),
).values(),
].sort((left, right) =>
compareUnicodeCodePoints(
`${left.kind}\0${left.value}`,
`${right.kind}\0${right.value}`,
),
].sort(
(left, right) =>
compareUnicodeCodePoints(left.kind, right.kind) ||
compareUnicodeCodePoints(left.value, right.value) ||
Number(left.allowSuffix) - Number(right.allowSuffix),
);
const pathSuffixes = (path: string): string[] => {