Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package dyff for openSUSE:Factory checked in at 2026-01-13 21:23:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dyff (Old) and /work/SRC/openSUSE:Factory/.dyff.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dyff" Tue Jan 13 21:23:57 2026 rev:15 rq:1326684 version:1.10.3 Changes: -------- --- /work/SRC/openSUSE:Factory/dyff/dyff.changes 2025-08-20 13:27:16.289303686 +0200 +++ /work/SRC/openSUSE:Factory/.dyff.new.1928/dyff.changes 2026-01-13 21:24:26.318867091 +0100 @@ -1,0 +2,51 @@ +Mon Jan 12 06:35:29 UTC 2026 - Johannes Kastl <[email protected]> + +- Update to version 1.10.3: + * docs(README): add mise alternative method installation + * Add test case for issue 525 + * fix: correct indentation for added list entry in testbed files + * fix: use dynamic indentation in + generateHumanDetailOutputAddition since it was used everywhere + else + * fix: ensure deterministic order of keys in + getNonStandardIdentifierFromNamedLists + * Add issue 525 test files + * Address `golangci-lint` findings + * Bump Go version and `golang.org/x` dependencies + * build(deps): bump github.com/BurntSushi/toml from 1.5.0 to + 1.6.0 + * build(deps): bump github.com/onsi/ginkgo/v2 from 2.27.2 to + 2.27.3 + * build(deps): bump github.com/onsi/gomega from 1.38.2 to 1.38.3 + * build(deps): bump github.com/spf13/cobra from 1.10.1 to 1.10.2 + * build(deps): bump actions/checkout from 5 to 6 + * build(deps): bump golangci/golangci-lint-action from 8 to 9 + * build(deps): bump github.com/onsi/ginkgo/v2 from 2.27.1 to + 2.27.2 + * build(deps): bump github.com/onsi/ginkgo/v2 from 2.26.0 to + 2.27.1 + * build(deps): bump github.com/onsi/ginkgo/v2 from 2.25.3 to + 2.26.0 + * build(deps): bump github.com/lucasb-eyer/go-colorful from 1.2.0 + to 1.3.0 + * build(deps): bump actions/setup-go from 5 to 6 + * build(deps): bump github.com/spf13/cobra from 1.9.1 to 1.10.1 + * build(deps): bump github.com/onsi/ginkgo/v2 from 2.25.2 to + 2.25.3 + * build(deps): bump github.com/spf13/pflag from 1.0.7 to 1.0.10 + * build(deps): bump github.com/onsi/ginkgo/v2 from 2.25.1 to + 2.25.2 + * build(deps): bump github.com/stretchr/testify from 1.11.0 to + 1.11.1 + * build(deps): bump github.com/onsi/gomega from 1.38.0 to 1.38.2 + * build(deps): bump github.com/stretchr/testify from 1.10.0 to + 1.11.0 + * build(deps): bump github.com/onsi/ginkgo/v2 from 2.24.0 to + 2.25.1 + * build(deps): bump github.com/Masterminds/semver/v3 from 3.3.1 + to 3.4.0 + * build(deps): bump github.com/onsi/ginkgo/v2 from 2.23.4 to + 2.24.0 + * build(deps): bump actions/checkout from 4 to 5 + +------------------------------------------------------------------- Old: ---- dyff-1.10.2.obscpio New: ---- dyff-1.10.3.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dyff.spec ++++++ --- /var/tmp/diff_new_pack.CNSMhZ/_old 2026-01-13 21:24:27.922933297 +0100 +++ /var/tmp/diff_new_pack.CNSMhZ/_new 2026-01-13 21:24:27.926933462 +0100 @@ -1,7 +1,7 @@ # # spec file for package dyff # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: dyff -Version: 1.10.2 +Version: 1.10.3 Release: 0 Summary: Diff tool for YAML files, and sometimes JSON License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.CNSMhZ/_old 2026-01-13 21:24:27.986935938 +0100 +++ /var/tmp/diff_new_pack.CNSMhZ/_new 2026-01-13 21:24:27.994936268 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/homeport/dyff</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v1.10.2</param> + <param name="revision">v1.10.3</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.CNSMhZ/_old 2026-01-13 21:24:28.022937424 +0100 +++ /var/tmp/diff_new_pack.CNSMhZ/_new 2026-01-13 21:24:28.030937754 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/homeport/dyff</param> - <param name="changesrevision">10b4f3613a3083e60efcef897aa63d2b413aecc4</param></service></servicedata> + <param name="changesrevision">d56a668e86f453bbdb50e3bc13e6ef83d6ddb702</param></service></servicedata> (No newline at EOF) ++++++ dyff-1.10.2.obscpio -> dyff-1.10.3.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/.golangci.yml new/dyff-1.10.3/.golangci.yml --- old/dyff-1.10.2/.golangci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/dyff-1.10.3/.golangci.yml 2025-12-24 15:43:05.000000000 +0100 @@ -0,0 +1,11 @@ +--- +version: "2" + +linters: + default: standard + + exclusions: + rules: + - path: _test\.go + linters: + - errcheck diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/README.md new/dyff-1.10.3/README.md --- old/dyff-1.10.2/README.md 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/README.md 2025-12-24 15:43:05.000000000 +0100 @@ -131,6 +131,14 @@ brew install homeport/tap/dyff ``` +### Mise + +Using [mise](https://github.com/jdx/mise) you could do: + +```bash +mise use -g dyff@latest +``` + ### MacPorts On macOS, `dyff` is also [available via MacPorts](https://ports.macports.org/port/dyff/): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/assets/issues/issue-525/from.yaml new/dyff-1.10.3/assets/issues/issue-525/from.yaml --- old/dyff-1.10.2/assets/issues/issue-525/from.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/dyff-1.10.3/assets/issues/issue-525/from.yaml 2025-12-24 15:43:05.000000000 +0100 @@ -0,0 +1,28 @@ +name: a-type-of-file +allowed: + - digest: sha256:1111111111111111111111111111111111111111111111111111111111111111 + image: name/container + registry: ghcr.io + tag: 1.2.3 + field: + - test + - digest: sha256:22222222222222222222222222222222222222222222222222222222222222222 + image: yes/i-am-an-image + registry: docker.io + tag: 1.2.3-test_with.symbols + - digest: sha256:33333333333333333333333333333333333333333333333333333333333333333 + image: another/image + registry: gcr.io + tag: 3.2.1 + - digest: sha256:4444444444444444444444444444444444444444444444444444444444444444 + image: oh-look/another-image + registry: quay.io + tag: 3.1.2-test-with-dashes + - digest: sha256:5555555555555555555555555555555555555555555555555555555555555555 + image: you-would-not/guess + registry: docker.io + tag: 1.3.2 + - digest: sha256:6666666666666666666666666666666666666666666666666666666666666666 + image: no-way/this-is-an-image + registry: guess.io + tag: latest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/assets/issues/issue-525/to.yaml new/dyff-1.10.3/assets/issues/issue-525/to.yaml --- old/dyff-1.10.2/assets/issues/issue-525/to.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/dyff-1.10.3/assets/issues/issue-525/to.yaml 2025-12-24 15:43:05.000000000 +0100 @@ -0,0 +1,32 @@ +name: a-type-of-file +allowed: + - digest: sha256:1111111111111111111111111111111111111111111111111111111111111111 + image: name/container + registry: ghcr.io + tag: 1.2.4 + field: + - test + - digest: sha256:22222222222222222222222222222222222222222222222222222222222222222 + image: yes/i-am-an-image + registry: docker.io + tag: 1.2.4-test_with.symbols + - digest: sha256:33333333333333333333333333333333333333333333333333333333333333333 + image: another/image + registry: gcr.io + tag: 3.2.1 + - digest: sha256:4444444444444444444444444444444444444444444444444444444444444444 + image: oh-look/another-flaky + registry: quay.io + tag: 3.1.2-test-with-dashes + - digest: sha256:0000000000000000000000000000000000000000000000000000000000000000 + image: you-would-not/guess + registry: docker.io + tag: 1.3.2 + - digest: sha256:6666666666666666666666666666666666666666666666666666666666666666 + image: no-way/this-is-an-image + registry: guess.io + tag: latest + - digest: sha256:6666666666666666666666666666666666666666666666666666666666666666 + image: additional/image + registry: new.io + tag: 9.8.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/assets/testbed/expected-dyff-gopatch.github new/dyff-1.10.3/assets/testbed/expected-dyff-gopatch.github --- old/dyff-1.10.2/assets/testbed/expected-dyff-gopatch.github 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/assets/testbed/expected-dyff-gopatch.github 2025-12-24 15:43:05.000000000 +0100 @@ -82,5 +82,5 @@ - - name: one - - name: two ! + one list entry added: -+ - name: three ++ - name: three diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/assets/testbed/expected-dyff-spruce.github new/dyff-1.10.3/assets/testbed/expected-dyff-spruce.github --- old/dyff-1.10.2/assets/testbed/expected-dyff-spruce.github 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/assets/testbed/expected-dyff-spruce.github 2025-12-24 15:43:05.000000000 +0100 @@ -82,5 +82,5 @@ - - name: one - - name: two ! + one list entry added: -+ - name: three ++ - name: three diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/go.mod new/dyff-1.10.3/go.mod --- old/dyff-1.10.2/go.mod 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/go.mod 2025-12-24 15:43:05.000000000 +0100 @@ -1,8 +1,6 @@ module github.com/homeport/dyff -go 1.23.0 - -toolchain go1.24.1 +go 1.24.9 require ( github.com/gonvenience/bunt v1.4.2 @@ -11,11 +9,11 @@ github.com/gonvenience/term v1.0.4 github.com/gonvenience/text v1.0.9 github.com/gonvenience/ytbx v1.4.7 - github.com/lucasb-eyer/go-colorful v1.2.0 + github.com/lucasb-eyer/go-colorful v1.3.0 github.com/mitchellh/hashstructure v1.1.0 - github.com/onsi/ginkgo/v2 v2.23.4 - github.com/onsi/gomega v1.38.0 - github.com/spf13/cobra v1.9.1 + github.com/onsi/ginkgo/v2 v2.27.3 + github.com/onsi/gomega v1.38.3 + github.com/spf13/cobra v1.10.2 github.com/texttheater/golang-levenshtein v1.0.1 gopkg.in/yaml.v3 v3.0.1 ) @@ -27,29 +25,30 @@ require github.com/sergi/go-diff v1.4.0 require ( - github.com/BurntSushi/toml v1.5.0 // indirect + github.com/BurntSushi/toml v1.6.0 // indirect + github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/go-cmp v0.7.0 // indirect - github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect + github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/kr/pretty v0.3.1 // indirect github.com/mattn/go-ciede2000 v0.0.0-20170301095244-782e8c62fec3 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-ps v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/spf13/pflag v1.0.7 // indirect - github.com/stretchr/testify v1.10.0 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/stretchr/testify v1.11.1 // indirect github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 // indirect - go.uber.org/automaxprocs v1.6.0 // indirect - golang.org/x/net v0.43.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/sys v0.35.0 // indirect - golang.org/x/term v0.34.0 // indirect - golang.org/x/text v0.28.0 // indirect - golang.org/x/tools v0.36.0 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/mod v0.31.0 // indirect + golang.org/x/net v0.48.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.39.0 // indirect + golang.org/x/term v0.38.0 // indirect + golang.org/x/text v0.32.0 // indirect + golang.org/x/tools v0.40.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/go.sum new/dyff-1.10.3/go.sum --- old/dyff-1.10.2/go.sum 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/go.sum 2025-12-24 15:43:05.000000000 +0100 @@ -1,17 +1,26 @@ -github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= -github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= +github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo= github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gkampitakis/ciinfo v0.3.2 h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs= +github.com/gkampitakis/ciinfo v0.3.2/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo= +github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZdC4M= +github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= +github.com/gkampitakis/go-snaps v0.5.15 h1:amyJrvM1D33cPHwVrjo9jQxX8g/7E2wYdZ+01KS3zGE= +github.com/gkampitakis/go-snaps v0.5.15/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw= +github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/gonvenience/bunt v1.4.2 h1:nTgkFZsw38SIJKABhLj8aXj2rqion9Zo1so/EBkbFBY= github.com/gonvenience/bunt v1.4.2/go.mod h1:WjyEO2rSYR+OLZg67Ucl+gjdXPs8GpFl63SCA02XDyI= github.com/gonvenience/idem v0.0.2 h1:jWHknjPfSbiWgYKre9wB2FhMgVLd1RWXCXzVq+7VIWg= @@ -26,12 +35,14 @@ github.com/gonvenience/ytbx v1.4.7/go.mod h1:ZmAU727eOTYeC4aUJuqyb9vogNAN7NiSKfw6Aoxbqys= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f h1:HU1RgM6NALf/KW9HEY6zry3ADbDKcmpQ+hJedoNGQYQ= +github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f/go.mod h1:67FPmZWbr+KDT/VlpWtw6sO9XSjpJmLuHpoLmWiTGgY= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE= +github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -39,64 +50,75 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= -github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag= +github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= +github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= github.com/mattn/go-ciede2000 v0.0.0-20170301095244-782e8c62fec3 h1:BXxTozrOU8zgC5dkpn3J6NTRdoP+hjok/e+ACr4Hibk= github.com/mattn/go-ciede2000 v0.0.0-20170301095244-782e8c62fec3/go.mod h1:x1uk6vxTiVuNt6S5R2UYgdhpj3oKojXvOXauHZ7dEnI= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= +github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA= -github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= -github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= -github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY= -github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/onsi/ginkgo/v2 v2.27.3 h1:ICsZJ8JoYafeXFFlFAG75a7CxMsJHwgKwtO+82SE9L8= +github.com/onsi/ginkgo/v2 v2.27.3/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.38.3 h1:eTX+W6dobAYfFeGC2PV6RwXRu/MyT+cQguijutvkpSM= +github.com/onsi/gomega v1.38.3/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= -github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 h1:JwtAtbp7r/7QSyGz8mKUbYJBg2+6Cd7OjM8o/GNOcVo= github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74/go.mod h1:RmMWU37GKR2s6pgrIEB4ixgpVCt/cf7dnJv3fuH1J1c= -go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= -go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= -golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= -golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI= +golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg= +golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= -golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= -golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= -golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= -golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= -golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= +golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= +golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA= +golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= +google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= +google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/internal/cmd/common.go new/dyff-1.10.3/internal/cmd/common.go --- old/dyff-1.10.2/internal/cmd/common.go 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/internal/cmd/common.go 2025-12-24 15:43:05.000000000 +0100 @@ -23,6 +23,7 @@ import ( "bufio" "bytes" + "errors" "fmt" "io" "os" @@ -154,7 +155,7 @@ } // Write the buffered output to the provided input file (override in place) - bufWriter.Flush() + _ = bufWriter.Flush() if err := os.WriteFile(filename, buf.Bytes(), 0644); err != nil { return fmt.Errorf("failed to overwrite %s in place: %w", humanReadableFilename(filename), err) } @@ -179,10 +180,10 @@ if err != nil { return err } - fmt.Fprintf(writer, "%s\n", output) + _, _ = fmt.Fprintln(writer, output) case w.PlainMode && w.OutputStyle == "yaml": - fmt.Fprintln(writer, "---") + _, _ = fmt.Fprintln(writer, "---") encoder := yamlv3.NewEncoder(writer) encoder.SetIndent(2) @@ -199,14 +200,14 @@ if err != nil { return err } - fmt.Fprintf(writer, "%s\n", output) + _, _ = fmt.Fprintln(writer, output) case w.OutputStyle == "yaml": output, err := neat.NewOutputProcessor(!w.OmitIndentHelper, true, &neat.DefaultColorSchema).ToYAML(document) if err != nil { return err } - fmt.Fprintf(writer, "%s\n", output) + _, _ = fmt.Fprintln(writer, output) } } @@ -293,7 +294,7 @@ } default: - return fmt.Errorf("unknown output style %s: %w", reportOptions.style, fmt.Errorf(cmd.UsageString())) + return fmt.Errorf("unknown output style %s: %w", reportOptions.style, errors.New(cmd.UsageString())) } if err := reportWriter.WriteReport(os.Stdout); err != nil { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/pkg/dyff/colors.go new/dyff-1.10.3/pkg/dyff/colors.go --- old/dyff-1.10.2/pkg/dyff/colors.go 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/pkg/dyff/colors.go 2025-12-24 15:43:05.000000000 +0100 @@ -46,49 +46,61 @@ return fmt.Sprintf(format, a...) } -func green(format string, a ...interface{}) string { - return colored(additionGreen, render(format, a...)) +func green(text string) string { + return colored(additionGreen, text) } -func red(format string, a ...interface{}) string { - return colored(removalRed, render(format, a...)) +func greenf(format string, a ...interface{}) string { + return coloredf(additionGreen, format, a...) } -func yellow(format string, a ...interface{}) string { - return colored(modificationYellow, render(format, a...)) +func red(text string) string { + return colored(removalRed, text) } -func lightgreen(format string, a ...interface{}) string { - return colored(bunt.LightGreen, render(format, a...)) +func redf(format string, a ...interface{}) string { + return coloredf(removalRed, format, a...) } -func lightred(format string, a ...interface{}) string { - return colored(bunt.LightSalmon, render(format, a...)) +func yellowf(format string, a ...interface{}) string { + return coloredf(modificationYellow, format, a...) } -func dimgray(format string, a ...interface{}) string { - return colored(bunt.DimGray, render(format, a...)) +func lightgreen(text string) string { + return colored(bunt.LightGreen, text) } -func bold(format string, a ...interface{}) string { - return bunt.Style( - fmt.Sprintf(format, a...), +func lightred(text string) string { + return colored(bunt.LightSalmon, text) +} + +func dimgray(text string) string { + return colored(bunt.DimGray, text) +} + +func bold(text string) string { + return bunt.Style(text, bunt.EachLine(), bunt.Bold(), ) } -func italic(format string, a ...interface{}) string { - return bunt.Style( - render(format, a...), +func italic(text string) string { + return bunt.Style(text, bunt.EachLine(), bunt.Italic(), ) } -func colored(color colorful.Color, format string, a ...interface{}) string { - return bunt.Style( - render(format, a...), +func colored(color colorful.Color, text string) string { + return bunt.Style(text, + bunt.EachLine(), + bunt.Foreground(color), + ) +} + +func coloredf(color colorful.Color, format string, a ...interface{}) string { + return bunt.Style(render(format, a...), bunt.EachLine(), bunt.Foreground(color), ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/pkg/dyff/compare_test.go new/dyff-1.10.3/pkg/dyff/compare_test.go --- old/dyff-1.10.2/pkg/dyff/compare_test.go 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/pkg/dyff/compare_test.go 2025-12-24 15:43:05.000000000 +0100 @@ -1124,6 +1124,20 @@ Expect(results).ToNot(BeNil()) Expect(results.Diffs).To(HaveLen(0)) }) + + It("should produce deterministic results when lists with non-standard identifiers are compared", func() { + from, to, err := ytbx.LoadFiles(assets("issues", "issue-525", "from.yaml"), assets("issues", "issue-525", "to.yaml")) + Expect(err).To(BeNil()) + Expect(from).ToNot(BeNil()) + Expect(to).ToNot(BeNil()) + + for range 100 { + results, err := dyff.CompareInputFiles(from, to) + Expect(err).NotTo(HaveOccurred()) + Expect(results).ToNot(BeNil()) + Expect(results.Diffs).To(HaveLen(4)) + } + }) }) }) }) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/pkg/dyff/core.go new/dyff-1.10.3/pkg/dyff/core.go --- old/dyff-1.10.2/pkg/dyff/core.go 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/pkg/dyff/core.go 2025-12-24 15:43:05.000000000 +0100 @@ -946,7 +946,15 @@ counterA := createKeyCountMap(listA) counterB := createKeyCountMap(listB) - for keyA, countA := range counterA { + // Sort the keys to ensure deterministic order + keysA := make([]string, 0, len(counterA)) + for keyA := range counterA { + keysA = append(keysA, keyA) + } + sort.Strings(keysA) + + for _, keyA := range keysA { + countA := counterA[keyA] if countB, ok := counterB[keyA]; ok { if countA == listALength && countB == listBLength && countA > compare.settings.NonStandardIdentifierGuessCountThreshold { return &singleField{keyA} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/pkg/dyff/output_brief.go new/dyff-1.10.3/pkg/dyff/output_brief.go --- old/dyff-1.10.2/pkg/dyff/output_brief.go 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/pkg/dyff/output_brief.go 2025-12-24 15:43:05.000000000 +0100 @@ -44,7 +44,7 @@ // WriteReport writes a brief summary to the provided writer func (report *BriefReport) WriteReport(out io.Writer) error { writer := bufio.NewWriter(out) - defer writer.Flush() + defer func() { _ = writer.Flush() }() noOfChanges := bunt.Style(text.Plural(len(report.Diffs), "change"), bunt.Bold()) niceFrom := ytbx.HumanReadableLocationInformation(report.From) @@ -59,11 +59,7 @@ template = twoline } - _, _ = writer.WriteString(fmt.Sprintf(template, - noOfChanges, - niceFrom, - niceTo, - )) + _, _ = fmt.Fprintf(writer, template, noOfChanges, niceFrom, niceTo) // Finish with one last newline so that we do not end next to the prompt _, _ = writer.WriteString("\n") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/pkg/dyff/output_diff_syntax.go new/dyff-1.10.3/pkg/dyff/output_diff_syntax.go --- old/dyff-1.10.2/pkg/dyff/output_diff_syntax.go 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/pkg/dyff/output_diff_syntax.go 2025-12-24 15:43:05.000000000 +0100 @@ -39,7 +39,7 @@ // WriteReport writes a human readable report to the provided writer func (report *DiffSyntaxReport) WriteReport(out io.Writer) error { writer := bufio.NewWriter(out) - defer writer.Flush() + defer func() { _ = writer.Flush() }() // Only show the document index if there is more than one document to show showPathRoot := len(report.From.Documents) > 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dyff-1.10.2/pkg/dyff/output_human.go new/dyff-1.10.3/pkg/dyff/output_human.go --- old/dyff-1.10.2/pkg/dyff/output_human.go 2025-08-10 22:16:09.000000000 +0200 +++ new/dyff-1.10.3/pkg/dyff/output_human.go 2025-12-24 15:43:05.000000000 +0100 @@ -66,7 +66,7 @@ // WriteReport writes a human readable report to the provided writer func (report *HumanReport) WriteReport(out io.Writer) error { writer := bufio.NewWriter(out) - defer writer.Flush() + defer func() { _ = writer.Flush() }() // Only show the document index if there is more than one document to show showPathRoot := len(report.From.Documents) > 1 @@ -166,19 +166,19 @@ switch detail.To.Kind { case yamlv3.DocumentNode: - _, _ = fmt.Fprint(&output, yellow("%c %s added:\n", + _, _ = fmt.Fprint(&output, yellowf("%c %s added:\n", ADDITION, text.Plural(len(detail.To.Content), "document"), )) case yamlv3.SequenceNode: - _, _ = output.WriteString(yellow("%c %s added:\n", + _, _ = output.WriteString(yellowf("%c %s added:\n", ADDITION, text.Plural(len(detail.To.Content), "list entry", "list entries"), )) case yamlv3.MappingNode: - _, _ = output.WriteString(yellow("%c %s added:\n", + _, _ = output.WriteString(yellowf("%c %s added:\n", ADDITION, text.Plural(len(detail.To.Content)/2, "map entry", "map entries"), )) @@ -190,7 +190,7 @@ return "", err } - report.writeTextBlocks(&output, 2, yamlOutput) + report.writeTextBlocks(&output, report.Indent, yamlOutput) return output.String(), nil } @@ -200,18 +200,18 @@ switch detail.From.Kind { case yamlv3.DocumentNode: - _, _ = fmt.Fprint(&output, yellow("%c %s removed:\n", + _, _ = fmt.Fprint(&output, yellowf("%c %s removed:\n", REMOVAL, text.Plural(len(detail.From.Content), "document"), )) case yamlv3.SequenceNode: text := text.Plural(len(detail.From.Content), "list entry", "list entries") - _, _ = output.WriteString(yellow("%c %s removed:\n", REMOVAL, text)) + _, _ = output.WriteString(yellowf("%c %s removed:\n", REMOVAL, text)) case yamlv3.MappingNode: text := text.Plural(len(detail.From.Content)/2, "map entry", "map entries") - _, _ = output.WriteString(yellow("%c %s removed:\n", REMOVAL, text)) + _, _ = output.WriteString(yellowf("%c %s removed:\n", REMOVAL, text)) } ytbx.RestructureObject(detail.From) @@ -250,29 +250,29 @@ return "", err } - _, _ = output.WriteString(yellow("%c content change\n", MODIFICATION)) + _, _ = output.WriteString(yellowf("%c content change\n", MODIFICATION)) if report.PrefixMultiline { report.writeTextBlocks(&output, 0, - red("%s", createStringWithContinuousPrefix("- ", hex.Dump(from), report.Indent)), - green("%s", createStringWithContinuousPrefix("+ ", hex.Dump(to), report.Indent)), + red(createStringWithContinuousPrefix("- ", hex.Dump(from), report.Indent)), + green(createStringWithContinuousPrefix("+ ", hex.Dump(to), report.Indent)), ) } else { report.writeTextBlocks(&output, 0, - red("%s", createStringWithPrefix("- ", hex.Dump(from), report.Indent)), - green("%s", createStringWithPrefix("+ ", hex.Dump(to), report.Indent)), + red(createStringWithPrefix("- ", hex.Dump(from), report.Indent)), + green(createStringWithPrefix("+ ", hex.Dump(to), report.Indent)), ) } default: if fromType != toType { - _, _ = output.WriteString(yellow("%c type change from %s to %s\n", + _, _ = output.WriteString(yellowf("%c type change from %s to %s\n", MODIFICATION, italic(fromType), italic(toType), )) } else { - _, _ = output.WriteString(yellow("%c value change\n", + _, _ = output.WriteString(yellowf("%c value change\n", MODIFICATION, )) } @@ -287,8 +287,8 @@ return "", err } - _, _ = output.WriteString(red("%s", createStringWithPrefix("- ", strings.TrimRight(from, "\n"), report.Indent))) - _, _ = output.WriteString(green("%s", createStringWithPrefix("+ ", strings.TrimRight(to, "\n"), report.Indent))) + _, _ = output.WriteString(red(createStringWithPrefix("- ", strings.TrimRight(from, "\n"), report.Indent))) + _, _ = output.WriteString(green(createStringWithPrefix("+ ", strings.TrimRight(to, "\n"), report.Indent))) } return output.String(), nil @@ -297,7 +297,7 @@ func (report *HumanReport) generateHumanDetailOutputOrderchange(detail Detail) (string, error) { var output bytes.Buffer - _, _ = output.WriteString(yellow("%c order changed\n", ORDERCHANGE)) + _, _ = output.WriteString(yellowf("%c order changed\n", ORDERCHANGE)) switch detail.From.Kind { case yamlv3.SequenceNode: asStringList := func(sequenceNode *yamlv3.Node) ([]string, error) { @@ -331,13 +331,13 @@ fromSingleLineLength := stringArrayLen(from) + ((len(from) - 1) * plainTextLength(singleLineSeparator)) toStringleLineLength := stringArrayLen(to) + ((len(to) - 1) * plainTextLength(singleLineSeparator)) if estimatedLength := max(fromSingleLineLength, toStringleLineLength); estimatedLength < threshold { - _, _ = output.WriteString(red(strings.Repeat(" ", report.Indent)+"- %s\n", strings.Join(from, singleLineSeparator))) - _, _ = output.WriteString(green(strings.Repeat(" ", report.Indent)+"+ %s\n", strings.Join(to, singleLineSeparator))) + _, _ = output.WriteString(redf(strings.Repeat(" ", report.Indent)+"- %s\n", strings.Join(from, singleLineSeparator))) + _, _ = output.WriteString(greenf(strings.Repeat(" ", report.Indent)+"+ %s\n", strings.Join(to, singleLineSeparator))) } else { _, _ = output.WriteString(CreateTableStyleString(" ", 2, - red("%s", strings.Join(from, "\n")), - green("%s", strings.Join(to, "\n")))) + red(strings.Join(from, "\n")), + green(strings.Join(to, "\n")))) } } @@ -349,14 +349,14 @@ switch { case err == nil: - _, _ = output.WriteString(yellow("%c certificate change\n", MODIFICATION)) + _, _ = output.WriteString(yellowf("%c certificate change\n", MODIFICATION)) _, _ = output.WriteString(report.highlightByLine(fromCertText, toCertText)) case isWhitespaceOnlyChange(from, to): - _, _ = output.WriteString(yellow("%c whitespace only change\n", MODIFICATION)) + _, _ = output.WriteString(yellowf("%c whitespace only change\n", MODIFICATION)) report.writeTextBlocks(output, 0, - red("%s", createStringWithPrefix("- ", showWhitespaceCharacters(from), report.Indent)), - green("%s", createStringWithPrefix("+ ", showWhitespaceCharacters(to), report.Indent)), + red(createStringWithPrefix("- ", showWhitespaceCharacters(from), report.Indent)), + green(createStringWithPrefix("+ ", showWhitespaceCharacters(to), report.Indent)), ) case isMultiLine(from, to): @@ -407,21 +407,21 @@ } } _, _ = output.WriteString( - yellow("%c value change in multiline text (%s, %s)\n", + yellowf("%c value change in multiline text (%s, %s)\n", MODIFICATION, text.Plural(ins, "insert"), text.Plural(del, "deletion"))) _, _ = output.WriteString(buf.String()) _, _ = output.WriteString("\n") case isMinorChange(from, to, report.MinorChangeThreshold): - _, _ = output.WriteString(yellow("%c value change\n", MODIFICATION)) + _, _ = output.WriteString(yellowf("%c value change\n", MODIFICATION)) diffs := diffmatchpatch.New().DiffMain(from, to, false) _, _ = output.WriteString(highlightRemovals(diffs, report.Indent)) _, _ = output.WriteString(highlightAdditions(diffs, report.Indent)) default: - _, _ = output.WriteString(yellow("%c value change\n", MODIFICATION)) - _, _ = output.WriteString(red("%s", createStringWithPrefix("- ", from, report.Indent))) - _, _ = output.WriteString(green("%s", createStringWithPrefix("+ ", to, report.Indent))) + _, _ = output.WriteString(yellowf("%c value change\n", MODIFICATION)) + _, _ = output.WriteString(red(createStringWithPrefix("- ", from, report.Indent))) + _, _ = output.WriteString(green(createStringWithPrefix("+ ", to, report.Indent))) } } @@ -445,8 +445,8 @@ if report.PrefixMultiline { report.writeTextBlocks(&buf, 0, - createStringWithContinuousPrefix(red("- "), strings.Join(fromLines, "\n"), report.Indent), - createStringWithContinuousPrefix(green("+ "), strings.Join(toLines, "\n"), report.Indent)) + createStringWithContinuousPrefix(redf("- "), strings.Join(fromLines, "\n"), report.Indent), + createStringWithContinuousPrefix(greenf("+ "), strings.Join(toLines, "\n"), report.Indent)) } else { report.writeTextBlocks(&buf, 0, createStringWithPrefix(red("- "), strings.Join(fromLines, "\n"), report.Indent), @@ -455,8 +455,8 @@ } else { report.writeTextBlocks(&buf, 0, - red("%s", createStringWithPrefix("- ", from, report.Indent)), - green("%s", createStringWithPrefix("+ ", to, report.Indent)), + red(createStringWithPrefix("- ", from, report.Indent)), + green(createStringWithPrefix("+ ", to, report.Indent)), ) } @@ -497,14 +497,14 @@ func highlightRemovals(diffs []diffmatchpatch.Diff, indent int) string { var buf bytes.Buffer - buf.WriteString(red("%s- ", strings.Repeat(" ", indent))) + buf.WriteString(redf("%s- ", strings.Repeat(" ", indent))) for _, part := range diffs { switch part.Type { case diffmatchpatch.DiffEqual: - buf.WriteString(lightred("%s", part.Text)) + buf.WriteString(lightred(part.Text)) case diffmatchpatch.DiffDelete: - buf.WriteString(bold("%s", red("%s", part.Text))) + buf.WriteString(bold(red(part.Text))) } } @@ -515,14 +515,14 @@ func highlightAdditions(diffs []diffmatchpatch.Diff, indent int) string { var buf bytes.Buffer - buf.WriteString(green("%s+ ", strings.Repeat(" ", indent))) + buf.WriteString(greenf("%s+ ", strings.Repeat(" ", indent))) for _, part := range diffs { switch part.Type { case diffmatchpatch.DiffEqual: - buf.WriteString(lightgreen("%s", part.Text)) + buf.WriteString(lightgreen(part.Text)) case diffmatchpatch.DiffInsert: - buf.WriteString(bold("%s", green("%s", part.Text))) + buf.WriteString(bold(green(part.Text))) } } @@ -640,7 +640,13 @@ } func showWhitespaceCharacters(text string) string { - return strings.Replace(strings.Replace(text, "\n", bold("↵\n"), -1), " ", bold("·"), -1) + return strings.ReplaceAll( + strings.ReplaceAll(text, + "\n", + bold("↵\n")), + " ", + bold("·"), + ) } // createStringWithContinuousPrefix adds the defined prefix to each line of the ++++++ dyff.obsinfo ++++++ --- /var/tmp/diff_new_pack.CNSMhZ/_old 2026-01-13 21:24:28.418953769 +0100 +++ /var/tmp/diff_new_pack.CNSMhZ/_new 2026-01-13 21:24:28.422953934 +0100 @@ -1,5 +1,5 @@ name: dyff -version: 1.10.2 -mtime: 1754856969 -commit: 10b4f3613a3083e60efcef897aa63d2b413aecc4 +version: 1.10.3 +mtime: 1766587385 +commit: d56a668e86f453bbdb50e3bc13e6ef83d6ddb702 ++++++ vendor.tar.gz ++++++ ++++ 64964 lines of diff (skipped)
