Bot releases are hidden (Show)
Published by HeavyWombat over 6 years ago
Fixed missing usage information and harmonised the shorthand and long flag names.
Changed the certificate output by adding grouping to subject and validation period as well as improvement to the coloring of the changes.
The vertical indent helper guide lines can now be omitted in the output by using the respective flag.
Clean-up of test cases and unification of styles within the test cases. Code refactoring of the path code, which was moved into its own source file for readability.
Published by HeavyWombat over 6 years ago
Add function to guess the identifier if the default identifier name,
key, or id do not work. It will guess based on the fact if there is
a string key with string value, where each value is unique in the
list as long as the list has more than n
values with n
currently
being 3. This threshold might be subject to change in the future or
become configurable.
Published by HeavyWombat over 6 years ago
Add checks to spot empty structures such as empty map or empty list
to properly display its empty inline JSON style in the YAML output.
Published by HeavyWombat over 6 years ago
Use more than just 16 colors to highlight changes.
Only use true color if terminal supports it. Add new flags to enforce colors or disable them.
Rewrite of the output of YAML strings to avoid having a fork dependency.
In case true color is not supported, dyff
will fall back to 16 colors and automatically check which of the reduced color sets matches best.
Added checks to verify remote location loading is properly handled.
Published by HeavyWombat over 6 years ago
Replaced the previous ANSI coloring library with a new internal package that comes with True Color support.
If only a certain percentage of a string was changed, use a different output in the human style report to better visualise the minor change in the string. Currently, this threshold is configured to be roughly 10 %.
Published by HeavyWombat over 6 years ago
Add flags and implementation code to support changing the root level of a given input file, or both. Depending on the actual object that is referenced by the path that serves as the new root level, there are use cases where a list should be translated into documents, or where the list is used as the root level itself.
This enables diffs between YAMLs (or JSON) with different types of structures, for example:
---
a: foo
---
a: bar
compared with
{
"items": [
{"a": "Foo"},
{"a": "bar"}
]
}
Big thanks to @adamdecaf for the idea.
Published by HeavyWombat over 6 years ago
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.
Published by HeavyWombat over 6 years ago
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.
There might be cases where a fixed terminal width is helpful,
especially if the terminal width detection fails
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.
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.
Removed Cols
usage by using already existing code from
createStringWithPrefix
to get string with a common prefix
and correct multi-line indentation.
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.
The shell check tool reported minor issues in the compile script
that were fixed. Added ANSI coloring for better readability.
Reverted back to
golang.org/x/crypto/ssh/terminal
as the package to get the terminal size for both Linux and Windows
systems.
Published by HeavyWombat over 6 years ago
Changed code to detect terminal width to be more operating system independent.
Pulled in updates for vendor directory that contain updates to
the https://github.com/spf13 package.
Removed github.com/grantae/certinfo
dependency in favour
for an output that looks like the summary from
https://www.sslshopper.com/certificate-decoder.html.
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.
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.
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.
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.
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.
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.
Added flag for between
subcommand to swap both input arguments.
There are actually use cases where this is helpful, believe it or not.
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.
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.
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.
The new compile script will compile dyff for various platforms
Published by HeavyWombat over 6 years ago
Initial release of dyff
with core features implemented: