sem-jiff
A library that shows code changes while distinguishing moves, renames, and formatting edits.
What does it do?
It reads two versions of a file and returns data describing the semantic operations behind changes, collapsible regions, and corresponding patches. A diff view using this data can distinguish moves that preserve meaning from formatting changes. Changes it cannot classify confidently remain ordinary diffs. Optionally, a judgment model can review some candidates for function extraction. It works in Node without additional setup; in a browser, copy the grammar files and configure their serving path.
Key features
- Identify code moves, renames, formatting edits, extractions, and inlining across two file versions
- Return semantic operations, collapsible regions, and corresponding patches as data
- Show uncertain changes as ordinary diffs
- Review function extraction candidates with a selected judgment model
- Use in Node or configure grammar files for browser use