Releases: homeport/dyff
dyff version v0.4-alpha
Introduced multi-document support for YAMLs
Added multi-document support and test cases.
Updated vendor directory.
Added support for root level simple lists.
Cleaned up the test cases to have a nice list helper function.
In the output, the document index should only be visible if there are
multiple documents loaded.
dyff version v0.3-alpha
Fixed duplicate newline issue
The usage of newlines in output details was not implemented in a
common fashion resulting in different numbers of newlines in
different output scenarios. This was fixed by using a common style
and by avoiding newlines in the helper functions. Instead, before
each path is displayed, the first separating newline is produced.
Added fixed terminal width option
There might be cases where a fixed terminal width is helpful,
especially if the terminal width detection fails
Added missing copyright header
Most of the core Go files and the shell script were missing the
copyright header. Not that this is very important at the moment,
but it was a nice way to enforce all files to have it and to be
UTF-8 at the same time.
Whitespace only changes in table style
Changes the code so that whitespace only changes are also displayed
in table style if terminal size permits. The output should look
similar to the other output styles. Added a couple of TODOs for
improvement of the code.
Simplified output code
Removed Cols
usage by using already existing code from
createStringWithPrefix
to get string with a common prefix
and correct multi-line indentation.
Added convenience download script
A convenience script to download the latest dyff
compiled
version from GitHub was added. It will perform a GitHub API
call to get the latest version tag and then perform a simple
download via curl
. For the GitHub API call the jq
tool
is used to parse the JSON.
Fixed shellcheck issues
The shell check tool reported minor issues in the compile script
that were fixed. Added ANSI coloring for better readability.
Fixed terminal width issue (again)
Reverted back to
golang.org/x/crypto/ssh/terminal
as the package to get the terminal size for both Linux and Windows
systems.
dyff version v0.2-alpha
Switched terminal width detection
Changed code to detect terminal width to be more operating system independent.
Updated vendor directory
Pulled in updates for vendor directory that contain updates to
the https://github.com/spf13 package.
Improved cert delta output
Removed github.com/grantae/certinfo
dependency in favour
for an output that looks like the summary from
https://www.sslshopper.com/certificate-decoder.html.
Output improvements for certificates
Added flag --no-cert-inspection
to disable certificate decoding
for content comparision. This will result in raw-text compare. This
fix includes another output improvement that tries to display
multi-line strings next to each other.
Added restructure feature
If dealing with generated YAML files leaves you with reordered
hashes that render the output hard to read, you can now let this
tools reorder some known keys into a more human pleasing order.
Fixed nice location output
The nice location function returned paths like /dev/fd
as
URIs even though they are clearly file system paths. This was
fixed by checking the file existence with stats first.
Fixed location loading
There was an issue with the order of checks while loading the
input data. It was reworked and separated into two functions
so that there is a clear path what is checked in which order.
Reworked use of panic
Introduced a function to Exit with a provided error and switched
to this function as much as possible. There are only a couple of
panic calls left, all at positions where they should be deadcode.
Initial update to avoid panic output
Added function to exit program with a text and the provided error
text from the actual Go error. Reworked the file loading part to
return a proper error if the file cannot be found. This will now
be displayed on STDOUT and a non-zero exit status.
Add swap flag
Added flag for between
subcommand to swap both input arguments.
There are actually use cases where this is helpful, believe it or not.
Ignore order changes in hashs as diffs
The order of keys in hashes is interesting for a human, but does not matter
from a semantic point of view. Therefore, in simple lists dyff will convert
MapSlices into maps before creating a hash of the entry so that the order
does not matter.
Support order change detection in simple lists
Added code to detect order changes in simple lists based on the hash
of the respective entries. The output currently displays the order of
the entries that are common to both lists. This might be subject to
changes in the future if this turn out to be too much data to be
displayed.
Terminal output improvement
Checks were added to verify the terminal width is big enough to display
elements next to each other. This includes the order change output,
which is most likely to use a lot of horizontal space. Order changes
output lists will either be displayed as a single line if they consume
less than 50 % of the terminal width, or multi line otherwise.
Added cross-compile script
The new compile script will compile dyff for various platforms
dyff version v0.1-alpha
Initial release of dyff
with core features implemented:
- Show difference between two provided YAML files in BOSH v1 look-a-like style.
- Support for JSON as input files.
- Support for URIs as input locations.
- YAML to JSON and vice versa conversion while preserving the order in hashes.
- X509 certificates are decoded to show differences of the certificate content.
- Order changes in named entry lists are shown.