Thanks for helping improve @krkarma777/string-diff.
Source tests use Node.js 24 because the test runner executes TypeScript files directly. The published ESM and CommonJS bundles support Node.js 16 and later; CI smoke-tests the built output on Node.js 16, 18, 20, and 22.
npm ciUse test-driven development for behavior changes:
- Add the smallest test that demonstrates the expected behavior.
- Run it and confirm it fails for the expected reason.
- Implement the smallest change that makes it pass.
- Run the complete verification gate.
The suite includes seeded fuzz round-trips, shortest-edit-script optimality checks against a reference dynamic program, and an oracle that compares the optimized scanner with the generic token pipeline. Preserve those invariants when changing tokenization or the Myers core.
Run the full local gate before opening a pull request:
npm run typecheck
npm test
npm run buildFor performance-sensitive changes, also run:
npm run perf:smoke
npm run benchBenchmark comparisons must use the existing scenarios and report the environment, command, and median results. Do not replace measured results with theoretical estimates.
- Keep each pull request focused on one behavior or repository concern.
- Include tests for behavior changes and regression fixes.
- Update
CHANGELOG.mdfor user-visible changes. - Include benchmark results when changing tokenization, allocation behavior, search logic, or heuristic thresholds.
- Do not add runtime dependencies without first discussing the bundle-size and compatibility impact in an issue.
Include both input strings, the complete options object, the package and runtime versions, and the expected and actual entries. A minimal executable reproduction is the fastest way to make a report actionable.