feat(smartdiff): Migrate package to ESM, replace fast-diff with and add rich diff APIs + formatters

This commit is contained in:
2025-12-14 12:33:23 +00:00
parent 742a8c734d
commit 46dbef319b
11 changed files with 8306 additions and 6299 deletions

33
changelog.md Normal file
View File

@@ -0,0 +1,33 @@
# Changelog
## 2025-12-14 - 1.1.0 - feat(smartdiff)
Migrate package to ESM, replace fast-diff with `diff` and add rich diff APIs + formatters
- Set package to ESM (added "type": "module" to package.json)
- Replaced legacy fast-diff usage with the maintained `diff` package and exported it via plugins
- Added backward-compatible compact API: createDiff(original, revision) and applyPatch(original, diff)
- Introduced character/word/line/unified diff helpers (getCharDiff, getWordDiff, getLineDiff, createUnifiedDiff)
- Added console and HTML formatters (ANSI color output and HTML span/div output) and getDefaultDiffCss helper
- Expanded and modernized test suite (many new tests) and switched test tooling to @git.zone/tstest
- Updated devDependencies and author metadata, and updated npmextra.json release metadata and registries
- Removed legacy CI configuration (.gitlab-ci.yml) and cleaned up TypeScript config
## 2024-05-29 - 1.0.3 - maintenance
Consolidated maintenance, metadata and config updates.
- Update package description.
- Update TypeScript configuration (tsconfig).
- Update npmextra.json githost settings (applied across multiple commits).
- Switch to new organization scheme.
- Multiple duplicate/housekeeping commits across 20212024 were consolidated into this release.
## 2021-12-17 - 1.0.2 - fix(core)
Core fixes and small updates.
- fix(core): update — applied core fixes (details not present in commit message).
- Release/tag commits around 2021-12-162021-12-17 consolidated here.
## 2021-12-16 - 1.0.1 - fix(core)
Initial patch with core updates.
- fix(core): update — core update/fix included.