( oldFile: string, newFile: string, filename: string, )
| 15 | }; |
| 16 | |
| 17 | async function collectDiffs( |
| 18 | oldFile: string, |
| 19 | newFile: string, |
| 20 | filename: string, |
| 21 | ): Promise<{ ourDiffs: DiffLine[]; myersDiffs: any }> { |
| 22 | const ourDiffs: DiffLine[] = []; |
| 23 | |
| 24 | for (const diffLine of (await deterministicApplyLazyEdit({ |
| 25 | oldFile, |
| 26 | newLazyFile: newFile, |
| 27 | filename, |
| 28 | })) ?? []) { |
| 29 | ourDiffs.push(diffLine); |
| 30 | } |
| 31 | |
| 32 | const myersDiffs = myersDiff(oldFile, newFile); |
| 33 | |
| 34 | return { ourDiffs, myersDiffs }; |
| 35 | } |
| 36 | |
| 37 | function displayDiff(diff: DiffLine[]) { |
| 38 | return diff |
no test coverage detected