Skip to main content

Module diff_parser

Module diff_parser 

Source
Expand description

TypeScript DiffParser implementation.

Parses git diffs between two refs and extracts all functions whose bodies changed. This processes SOURCE files (.ts/.tsx), not .d.ts declaration files.

§Flow

  1. git diff --name-status from_ref..to_ref → list of changed files
  2. Filter to .ts/.tsx/.js/.jsx source files (skip tests, configs, .d.ts)
  3. For each file, git show from_ref:path and git show to_ref:path
  4. Parse both versions with OXC
  5. Extract all function-like declarations from both ASTs
  6. Match by qualified name, compare bodies
  7. Return Vec<ChangedFunction> for all functions with differing bodies

Structs§

TsDiffParser
TypeScript/JavaScript DiffParser implementation.