@ossl-dev/differens-narrate
The narration engine turnsEditActions into human-readable text. It is template-based, so the output is deterministic. It returns a SemanticChange[], where each entry pairs the raw action with an English description.
Install:
Exports
narrate
Updates for the same rename are collapsed. Renaming a function reports it once, with the named node winning, instead of once per identifier occurrence.
Vocabulary
Kinds are canonicalized at the extractor layer.humanizeKind renders them for display, splitting camelCase and underscores and lowercasing. Language-specific node names map to the same canonical kind:
Narration shapes:
added function \parseConfig“removed class \RetryPolicy“renamed function \foo` to `bar“changed value of config key \host` from `localhost` to `0.0.0.0“moved function \parseConfig` from utils.ts to config.ts`- Scoped:
removed variable \timeout` from function `connect“. The nearest named ancestor is included when it adds information.