refactor(domain): consolidate canonical ordering and digest helpers (#624)

* refactor(domain): consolidate canonical ordering and digest helpers

Single owner for code-point ordering (domain/canonicalOrdering.ts)
and canonical JSON digests (domain/comparisonSemantics.ts). Delete
all local compareCodePoints/compareText/digestCanonical duplicates
and migrate every importer. No re-export shims.

* fix(ci): allow slower real browser startup
This commit is contained in:
morluto
2026-10-06 04:55:26 +08:00
committed by GitHub
parent 38b293329c
commit ba3869c597
74 changed files with 438 additions and 530 deletions
@@ -11,6 +11,7 @@ import type {
JavaScriptStaticStorage,
} from "./javascriptStaticAnalysisTypes.js";
import { semanticStaticPropertyName } from "./javascriptAstValues.js";
import { compareCodePoints } from "./canonicalOrdering.js";
export {
propertyName,
@@ -414,10 +415,6 @@ export const sortedUnique = <Value>(
export const sha256Text = (value: string): string =>
createHash("sha256").update(value).digest("hex");
/** Compare strings by Unicode code point for canonical ordering. */
export const compareCodePoints = (left: string, right: string): number =>
left < right ? -1 : left > right ? 1 : 0;
/** Recognized route-construction call suffixes. */
export const STATIC_ROUTE_CALL_NAMES = [
"route",