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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user