fix(javascript): report located sources with differing digests as modified (#1216)

This commit is contained in:
Jay Hemnani
2026-10-09 16:20:42 +08:00
committed by GitHub
parent c89b3a00dc
commit 01174c4a81
3 changed files with 73 additions and 1 deletions
@@ -135,6 +135,12 @@ export const candidateIdsForSource = (
return output;
};
/** Whether an indexed candidate carries any content digest to compare. */
export const candidateHasDigest = (
index: SourceToBundleCandidateIndex,
nodeId: string,
): boolean => (index.nodes.get(nodeId)?.digests.size ?? 0) > 0;
/** Score one indexed candidate from explicit, caller-visible signals. */
export const scoreSourceToBundleCandidate = (
source: SourceFile,