(opts: DiffWithDeps)
| 117 | } |
| 118 | |
| 119 | export async function diffWith(opts: DiffWithDeps): Promise<string> { |
| 120 | const entries = await collectDiffEntries(opts); |
| 121 | const chunks: string[] = []; |
| 122 | for (const e of entries) { |
| 123 | const patch = opts.createPatch(e.path, e.oldText, e.newText, "", ""); |
| 124 | if (patch.trim().length > 0) chunks.push(patch); |
| 125 | } |
| 126 | return chunks.join("\n"); |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Per-file summary of the same change set `diffWith` renders, |