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
+1 -3
View File
@@ -6,6 +6,7 @@ import type {
InspectWebPageInput,
WebPageInspection,
} from "../domain/browserObservation.js";
import { compareCodePoints } from "../domain/canonicalOrdering.js";
import { CdpConnection } from "./CdpConnection.js";
import { optionalCdpCommand } from "./CdpOptionalCommand.js";
import { recordValue, recordsValue, stringValue } from "./CdpCaptureValues.js";
@@ -484,6 +485,3 @@ const decodeBase64 = (value: string): Buffer | null => {
return null;
return Buffer.from(value, "base64");
};
const compareCodePoints = (left: string, right: string): number =>
left < right ? -1 : left > right ? 1 : 0;