Skip to content

Releases

v0.7.2

Choose a tag to compare

@github-actions github-actions released this 27 Nov 10:01
v0.7.2
96f1ab4

This release fixes correctness issues in the diff options and the JSON decoding and patch paths.

  • Factorize: moves and copies are now only used when no other operation shifts the array indexes they rely on, and are kept even when the other operations merely replace values or write inside array elements.
  • Equivalent: order-independent hashing no longer sorts (and thereby mutates) the compared arrays, counts duplicate elements correctly, tags values with their type and length to avoid collisions, and supports json.Number natively.
  • Ignores: descendants of ignored fields are preserved during rationalization.
  • MergePatch: a null target is now treated as the merge patch itself.
  • Decoder: fixed object keys and strings containing escape sequences (e.g. escaped backslashes).
  • Apply: errors from failed move and copy operations are now returned instead of being discarded.

Changelog

  • 96f1ab4 fix(factorize): keep move/copy unless other operations shift array indices
  • 81c48b9 fix: factorize moves and copies against stale array indexes
  • 3345670 fix: decode keys with escape sequences in findKey
  • 8b11695 fix: tag hashed values with their type and length
  • ce0b982 fix: handle escaped backslashes when scanning strings
  • b46e8aa fix: return errors of failed move and copy operations in apply
  • 680c270 docs(README): remove Go Report Card badge
  • 7166c04 docs(README): fix inaccuracies and improve clarity
  • 350339a ci: checkout before setup-go to restore module cache
  • 2e79ce8 docs(README): explain why Ignores and LCS options should not be combined
  • bd3059d fix: preserve ignored descendants during rationalization
  • 75133ee fix: treat a null target as the merge patch itself
  • 6e9b8cb fix(hash): sort element digests instead of arrays
  • a1009ff fix: hash json.Number values
  • f2d83c4 fix: count element occurrences in Equivalent array comparison
  • f93efd5 chore(ci): pin goreleaser and golangci-lint versions
  • 40a5579 chore: bump minimum go version to 1.25
  • b4a0226 chore: upgrade dependencies
  • 4a121ee test: add go1.27 and drop go1.24 from test matrix
  • 1d8dd60 chore(ci): bump action versions
  • fc06430 refactor: modernize codebase

New Contributors

Full Changelog: v0.7.1...v0.7.2

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 01 Apr 15:26
v0.7.1
cc66287

Changelog

  • cc66287 fix: factorization dropping operations when paths share a string prefix
  • 65fb3ba test: add go1.26 to test matrix
  • 0f546ea chore: update go.mod version
  • e6ba440 ci: bump actions
  • 94490cc chore(ci): bump actions/checkout from 5 to 6
  • 6f9042a ci: remove go1.23 from test matrix
  • 8f21cb2 feat: add MergePatch generation
  • 2447970 ci: rewrite bench script to take number of runs as parameter
  • 50555ff test: use new testing.B.Loop method in benchmarks
  • 9aafc97 docs(README): update benchmark results
  • 00afab8 ci: add go1.25 to tests matrix
  • be64383 chore: delete old golangci-lint config
  • 472922f chore(ci): bump actions/setup-go from 5 to 6
  • 5f3f7f8 chore(ci): bump actions/checkout from 4 to 5

Full Changelog: v0.7.0...v0.7.1

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 09 May 11:09
v0.7.0

This release adds the Patch.Invert method.

Changelog

  • 1847e60 chore(ci): bump golangci/golangci-lint-action from 7 to 8
  • 048e9b8 feat: add patch invert method
  • b22ffc0 doc: state that the apply method is not intended for public use
  • abf5672 chore: update LICENSE header year
  • 0c1ebb2 fix: LCS and Equivalent options combination
  • b40a29e ci: update golangci-lint to v2
  • e432ee9 chore(ci): bump codecov/codecov-action from 4 to 5 (#30)

Full Changelog: v0.6.1...v0.7.0

v0.6.1

Choose a tag to compare

@github-actions github-actions released this 17 Nov 00:17
v0.6.1
4fea2d0

This release fixes the behavior of the Equivalent option for nested arrays.

Changelog

  • 4fea2d0 chore: various fixes
  • 0a42b43 ci: fix workflow file extension
  • ea38423 fix: bound check on patch insert
  • 2399596 docs(README): add Github action badge for CI workflow
  • c154e66 ci: merge test/lint jobs in a single workflow
  • 2f1f3f0 docs(README): update benchmarks results
  • 19a2a0a feat: nested array equivalence
  • dfdd539 docs(README): remove broken Github Actions badge
  • d80a84c docs(README): update playground link

Full Changelog: v0.6.0...v0.6.1

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 17 Jun 15:21
v0.6.0
9bbbc45

This release introduces the CompareWithoutMarshal function, which is similar to the existing Compare function, but doesn't marshal/unmarshal to/from JSON the given interface values. As such, it expects that the values consists ONLY of primitive Go types, such as those returned by the json.Unmarshal function.

Changelog

  • 9bbbc45 test: small improvements to coverage
  • 71ffe13 chore(ci): update goreleaser config file version
  • 0f13bba chore(ci): update lint workflow action version
  • dc22c55 chore(ci): update release workflow action version
  • a8a5843 feat: add function CompareWithoutMarshal
  • 053aeb7 chore: retract version v0.5.1

Full Changelog: v0.5.2...v0.6.0

v0.5.2

Choose a tag to compare

@github-actions github-actions released this 21 Apr 22:01
v0.5.2
5b9121a

Changelog

  • 5b9121a chore: update gjson module
  • e4e08e2 fix: remove impossible condition in apply func
  • 91dfcd6 docs(README): remove warning about LCS and Factorize options

Full Changelog: v0.5.1...v0.5.2

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 01 Mar 15:55
v0.5.1
057572e

Changelog

  • eba17e0 chore(ci): update workflows actions versions
  • 7097621 ci: add dependabot file to check Github actions
  • d3385d9 fix: factorization with LCS option
  • f20729a docs(README): use Github admonitions
  • adcd818 test: add examples from the RFC Appendix A
  • 076a95c docs(README): add table of contents for Options section

Full Changelog: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 21:34
v0.5.0
6ac8ca8

This release introduces a new experimental option LCS() (Longest Common Subsequences) as an alternative method for arrays comparison.

New Contributors

Changelog

  • 6ac8ca8 ci: increase code coverage failure threshold
  • 95e4faa style: fix linting issues
  • 9f65129 style: update comments and table driven tests variable name
  • b9ab68b test: replace evanphx/json-patch dependency with custom patch apply method
  • e8e9ed7 ci: remove windows-latest from test matrix
  • f1e0ad8 ci: update test job to use the go toolchain directly
  • 068222c test: ensure patch produce the expected result
  • 3c79dd5 docs(README): add documentation for the LCS option
  • 80dc0ed test: add more cases for the LCS option
  • 121d244 docs: document the LCS-related code
  • 0e3c674 ci: refactor Github workflows
  • a434103 feat: add LCS (Longest Common Subsequences) based array comparison
  • 5303ffa fix: do not default in-place compaction option
  • c85fb8c feat: add old value to rationalized operations (#14)
  • 0975f4a docs(README): remove references to deprecated functions

Full Changelog: v0.4.0...v0.5.0

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 05 Jun 13:41
v0.4.0
09a9689

This release focuses on improving the performances of the whole package, and more specifically of the Factorize and Rationalize options.

⚠️ Deprecations

The CompareOpts and CompareJSONOpts functions are removed. The replacement for these are the Compare and CompareJSON functions, which now take a variadic list of Option as the third argument.

Changelog

  • 09a9689 chore: remove bench job from CI workflow
  • 750f319 test: improve options coverage
  • 3297dd3 refactor: remove Compare(JSON)Opts functions
  • 5497a04 feat: add InPlaceCompaction option
  • 7130e0c test: improve coverage of side cases
  • d148a82 docs(README): update benchmarks results
  • 55095c2 refactor: overall performance improvements
  • dcc4dfa refactor: simplify JSON values hashing
  • 9b8d787 fix: avoid byte slice to string conversion
  • 4c182ec refactor: optimize structs alignment
  • d28c8f7 refactor: optimize insertion sort
  • 3ad7b8c refactor: optimize Rationalize option
  • e162604 fix: remove rationalized operations temporary slice
  • e1427f2 test: refactor benchmarks by document size
  • 354c61a test: split Differ benchmarks with/without reset
  • 73540d8 fix: conversion from JSON Pointer to GJSON Path

Full Changelog: v0.3.0...v0.4.0

v0.4.0-alpha.2

v0.4.0-alpha.2 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 02 May 22:51
v0.4.0-alpha.2
6aa85d3

This release intoduces the MarshalFunc and UnmarshalFunc options, which lets you configure custom JSON marshal/unmarshal functions.

Changelog

  • 6aa85d3 docs: remove changelog
  • 0794d4a chore(ci): disable caching and upgrade action version
  • 214348d docs(README): update benchmarks
  • d2ae431 test: improve global coverage
  • 29fbcb0 refactor: reduce string concatenations
  • cae66b8 feat: add support for json.Number type
  • b783ad6 feat: add options MarshalFunc and UnmarshalFunc
  • d01e0ea fix: replace deprecated function ioutil.ReadFile

Full Changelog: v0.4.0-alpha.1...v0.4.0-alpha.2

⌂ 换网址