diffparser is a robust JavaScript library specifically engineered for parsing unified diff format strings, which are the standard output for showing changes between files in version control systems like Git. Currently stable at version 2.0.1, the project appears to follow a feature-driven release cadence, with its latest major iteration focusing on modern JavaScript (ES2015) syntax and module patterns. A primary differentiator of diffparser is its capability to generate position information for individual changes, which is a critical requirement for integrating with services such as the GitHub Comments API for precise inline commenting. Furthermore, it offers an optional but powerful rename detection feature, allowing users to accurately identify files that have been renamed within a diff. This package serves as an actively maintained, ES2015-native spiritual successor to the earlier parse-diff project, providing a clean API and a comprehensive test suite for reliable diff processing in both Node.js and browser environments.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Since v2.0.0, diffparser is distributed as an ES module. CommonJS `require()` is not supported. Ensure your project is configured for ESM.
Demonstrates parsing a basic unified diff and an example with rename detection.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.
No traffic data recorded yet.