(diff: DiffSource)
| 28 | const patchFileDiffCache = new Map<string, FileDiffMetadata>() |
| 29 | |
| 30 | export function resolveFileDiff(diff: DiffSource) { |
| 31 | if (typeof diff.patch === "string") return fileDiffFromPatch(diff.file, diff.patch) |
| 32 | return fileDiffFromContent( |
| 33 | diff.file, |
| 34 | typeof diff.before === "string" ? diff.before : "", |
| 35 | typeof diff.after === "string" ? diff.after : "", |
| 36 | ) |
| 37 | } |
| 38 | |
| 39 | export function normalize(diff: ReviewDiff): ViewDiff { |
| 40 | return { |
no test coverage detected