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:
@@ -4,6 +4,7 @@ import canonicalize from "canonicalize";
|
||||
import { z } from "zod";
|
||||
|
||||
import { artifactComparisonResultSchema } from "./artifactComparison.js";
|
||||
import { uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { evidenceSchema, parseEvidence, type Evidence } from "./evidence.js";
|
||||
import { functionComparisonResultSchema } from "./functionComparison.js";
|
||||
import type { JsonValue } from "./jsonValue.js";
|
||||
@@ -485,9 +486,6 @@ const assertUnique = (evidence: readonly Evidence[], label: string): void => {
|
||||
);
|
||||
};
|
||||
|
||||
const uniqueSorted = (values: readonly string[]): string[] =>
|
||||
[...new Set(values)].sort((left, right) => left.localeCompare(right, "en"));
|
||||
|
||||
const sha256 = (value: string): string =>
|
||||
createHash("sha256").update(value).digest("hex");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user