refactor(domain): own digest and prefixed identifier shapes in one module (#547)

This commit is contained in:
morluto
2026-10-05 17:29:20 +08:00
committed by GitHub
parent 828395d510
commit ea58834940
56 changed files with 314 additions and 162 deletions
+1 -2
View File
@@ -7,6 +7,7 @@ import {
type SourceToBundleCandidate,
type SourceToBundleSignal,
} from "./sourceToBundleComparisonSchemas.js";
import { isDigest } from "./digests.js";
type SourceFile = Extract<
HistoricalSourceGraph["entries"][number],
@@ -310,7 +311,5 @@ const addIndexValue = (
index.set(key, values);
};
const isDigest = (value: string): boolean => /^[a-f0-9]{64}$/u.test(value);
const compareText = (left: string, right: string): number =>
left < right ? -1 : left > right ? 1 : 0;