Release Diff Tools 0.2.0
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-09-02 04:43:16 +02:00
parent a1380cfba2
commit 46fc10f745
37 changed files with 2722 additions and 455 deletions
+10 -3
View File
@@ -3,7 +3,10 @@
Diff Tools is a static React application with a relocatable `./` build. Its comparison pipeline is deliberately separated from the view:
1. The workbench captures strings or decodes a selected file as strict UTF-8 after a byte-size check.
2. A fresh module worker receives a plain comparison request. Changing input cancels and terminates the preceding worker; the last successful result remains on screen until a replacement succeeds.
2. A fresh module worker receives a typed shared worker-job request. Changing
input cancels and terminates the preceding worker; job IDs exclude stale
messages, and a 15-second hard deadline bounds the whole worker. The last
successful result remains on screen until a replacement succeeds.
3. A mode-specific pure comparator produces display rows and diagnostics. Normalized rows are first-class output, not discarded state.
4. The orchestrator adds exact input metadata, a bounded unified patch and a schema-labelled portable report.
5. React renders values as text. The app never consumes or inserts HTML produced by a diff or parser library.
@@ -16,7 +19,11 @@ When `Worker` is unavailable, such as in unit tests, the same pure comparator ru
- JSON uses `lossless-json`, rejects duplicate and prototype-affecting keys, and compares numbers without converting to IEEE-754. Object member order is semantically ignored but reported.
- XML rejects active declaration/include syntax and preflights structure before `@xmldom/xmldom` builds an inert DOM. Elements and attributes compare by expanded name when selected.
- CSV/TSV uses Papa Parse in string mode. Unique composite keys align rows; no spreadsheet type inference is performed.
- Directory manifests strip the one common browser-selected root, validate every relative path and conservative case/Unicode collision key, then hash file bytes with SHA-256 under count, per-file, aggregate and concurrency ceilings. The sorted, versioned JSON artifact can be compared later without the files.
- Three-way merge independently derives bounded token edits from base to ours and base to theirs. Non-overlapping regions compose; overlapping regions are compared against each other and the base before conflict markers are emitted. It does not claim semantic structured-data merging.
All report and patch formats are generated locally. `de.add-ideas.diff-tools.report.v1` is the portable report schema identifier.
All report and patch formats are generated locally. `de.add-ideas.diff-tools.report.v1`, `de.add-ideas.diff-tools.directory-manifest.v1` and `de.add-ideas.diff-tools.merge-report.v1` identify the portable artifacts.
The planned shared `@add-ideas/toolbox-helpers` package is not yet published at a compatible version, so v0.1 keeps its bounded domain functions inside `src/core`. They can be extracted without changing the worker protocol or report schema.
Diff algorithms, semantic models and reports remain bounded domain functions in
`src/core`. Generic byte-size display, safe Blob downloads and cancellable
worker lifecycle come from `@add-ideas/toolbox-helpers` 0.2.0.