Tags: homeport/dyff
Tags
Omit YAML document start marker for single-document output Single-document YAML output no longer includes a leading `---` marker by default, aligning with standard YAML conventions. Multi-document files still emit the marker for each document. A new `--enforce-document-start-marker` flag is added to opt back into always printing the marker. Signed-off-by: Matthias Diester <mddiester@gmail.com>
Fix incorrect diff for mixing types in a list Bump `neat` to include fix for quoting numbers. Include scalar tag in hash calculation to differentiate between types. Simplify variables declarations. Move `createLookUpMap` function into `simpleLists` to avoid unnecessary method on `compare`, since it's only used in one function.
Fix grab issue with non-standard identifier Code detected a non-standard identifier for a named entry list. The non- standard identifier contained dots and slashes in its name. Using grab function interpreted the dots as path separators and not as text and therefore tried to search the structure, which failed. Replace grab with simple mapping context key/value search, since in this use case it is safe to assume that it's a mapping context with keys and values an no deep structure. Simplified some variable declarations.
Refactor flag usage and defaults Rename newly introduced marshal flag to `--format-strings`. Introduce flag grouping to improve help/usage documentation. Refactor report preferences into struct with defaults to have settings and defaults in one place. Add missing test case for string formatting. Refactor new formatting code to only follow through if both from and to value can be formatted. Removed `min` function to use built-in version.
refactor: extract Colorizer interface for pluggable diff coloring Introduce an exported `Colorizer` interface that encapsulates all color operations used by the human-readable diff output. `HumanReport` gets a `Colorizer` field that defaults to `BuntColorizer` (preserving existing behavior) when nil. This allows downstream consumers to swap in alternative coloring backends (e.g. `mgutz/ansi`) without forking, by implementing the interface and setting `report.Colorizer`. Changes: - `colors.go`: define `Colorizer` interface (15 methods) and `BuntColorizer` as the default implementation - `output.go`: deleted, YAML color functions moved to `BuntColorizer` - `output_human.go`: thread colorizer through `HumanReport`, convert `highlightRemovals`, `highlightAdditions`, and `showWhitespaceCharacters` to receiver methods
PreviousNext