Intelligent failure-value diffs (unified-diff-like) (#4) #18
Loading…
Reference in a new issue
No description provided.
Delete branch "wip/issue-04"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per #4.
src/lib/diff.ts: structural per-path unified-diff-style comparison for plain data (objects/arrays/Map/Set/primitives), with size/depth/cyclic caps andreprfallback.deepEqual/arrayIs/arrayEqualsUnsortedfailure formatting; hardenedrepr.@@/+/-lines.Verification
deepEqualnested failure shows a clear per-path diff (see PR commit); new tests inhappypath/sadpath.Closes #4
@ -0,0 +7,4 @@// @@ $.user.age @@// $.user.name = "Sufian"// - $.user.age = 30// + $.user.age = 31I would much rather have this display as:
With collapsing of multiple adjacent items that are the same in both a & b, so that if user had
name,age,birthday,height,weightfields, and there was another top-level field calledsystem(sibling of user, equal in both cases) it'd show:I'm not sure what the exact ruleset for what to show/hide should be, but please propose one. When rendered, the collapsed items should be expandable on click.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.