yaml-diff-patch
yaml-diff-patch copied to clipboard
Apply a JSON diff/patch to YAML while preserving whitespace, comments and overall structure
I encountered an error because a yaml anchor was not detected before its reference in `YAML`'s `document.toString()`. This wasn't because of an error in the yaml document at hand, but...
Follow-on to https://github.com/grantila/yaml-diff-patch/pull/1 which only addressed top-level paths. Without this, it fails if there is an escaped segment deeper in the path.
The current implementation generates a file named `-` .
Hello! Awesome project, really loving it! We've got an internal project using lots of YAML configuration files and using this patch to modify them is really awesome! One thing we...
I thought about setting `lineWidth` to `0` by default to fix #4 but this has the side-effect of removing line breaks automatically which might not be desired. Instead I thought...
## Test 1 (Extra new lines are removed) ```ts const yaml = ` a: 1 b: 1 `; const result = yamlOverwrite(yaml, { a: 2, b: 2 }); console.log(result); ```...