Commit Graph

61 Commits

Author SHA1 Message Date
Mike Farah 38d35185bc Can overwrite and append with merge 2020-01-06 16:27:00 +13:00
Mike Farah d8c29b26c1 Merge can allow empty merges! 2020-01-06 16:22:24 +13:00
Mike Farah 690da9ee74 Fixed merge new array 2020-01-06 10:12:30 +13:00
Mike Farah 1f7f1b0def Merge arrays! 2020-01-05 17:28:24 +13:00
Mike Farah 1aa5ec1d40 Merge! wip 2020-01-05 17:14:14 +13:00
Mike Farah a065a47b37 Fixed tests 2020-01-05 16:22:18 +13:00
Mike Farah 625cfdac75 wip; 2019-12-31 15:21:39 +13:00
Mike Farah 4dbdd4a805 Deep splat! 2019-12-30 16:51:07 +13:00
Mike Farah 8a6af1720d Fixed modify array issue! 2019-12-30 11:21:21 +13:00
Mike Farah df52383ffb Delete works! needs refactor 2019-12-28 10:51:54 +13:00
Mike Farah cf389bed4a Refactor wip 2019-12-27 19:06:08 +11:00
Mike Farah ff5b23251b Refactor wip 2019-12-25 12:11:04 +11:00
Mike Farah 9925b26b9d Added Key and Value printing tests 2019-12-24 10:46:21 +11:00
Mike Farah 93dbe80a77 wip 2019-12-24 10:35:57 +11:00
Mike Farah 949bf1c1d7 Merge anchors - wip 2019-12-22 15:15:15 +11:00
Mike Farah 290579ac7f Handle simple aliases 2019-12-16 20:38:55 +11:00
Mike Farah d7392f7b58 Refactoring 2019-12-16 16:46:20 +11:00
Mike Farah a3cebec2fd Added prefix command 2019-12-16 16:17:01 +11:00
Mike Farah 53a4a47ce3 wip - prefix splat 2019-12-15 18:38:40 +11:00
Mike Farah 5988d0cffa Simplified 2019-12-15 18:24:23 +11:00
Mike Farah 9771e7001c splatting 2019-12-09 13:44:53 +11:00
Conor Nosal 5fc13bdccd update imports for v2 module path 2019-12-06 13:58:56 +11:00
Conor Nosal 64d1e58f97 test coverage and linting 2019-12-06 13:58:56 +11:00
Conor Nosal 26a09e6ec0 Move implementation files to yqlib and test packages to allow for imports:
- Move data_navigator, json_converter, merge, and path_parser to pkg/yqlib
- Extract yamlToString from yq to pkg/yqlib/yaml_converter
- Move utils_test to test/utils
2019-12-06 13:58:56 +11:00
Elliot d1cec1ad18 fix to make it work with modules 2019-10-31 08:21:19 +11:00
Mike Farah 84de9c078d Improved handling of numeric keys
When there is no match at a given path, numeric keys are assumed to be strings.
To create an array '+' must be used.

e.g: yq n thing[+].cat fred
will create an array under thing, whereas
yq n thing[0].cat fred
will create a map under thing, with a key '0'
2019-05-16 10:03:54 +10:00
Georgi Knox 6e35356a84 add help description 2019-05-16 09:35:16 +10:00
Mike Farah b2fe3e6738 fixing delete splat 2019-05-14 11:20:41 +10:00
Mike Farah 774badfef4 Can delete splat!
Fixes https://github.com/mikefarah/yq/issues/175
2019-05-13 09:48:05 +10:00
Mike Farah 323089eb64 fixed tests for write array splat 2019-05-13 09:13:45 +10:00
Mike Farah 53289366a5 Write array splat 2019-05-01 08:55:44 +10:00
Mike Farah cda9a82906 Refactoring write command to allow splat 2019-05-01 08:40:35 +10:00
Renzo Crisóstomo 23543ee031 Add test for --allow-empty flag in merge command 2019-03-22 09:13:39 +11:00
Mike Farah 77c8f22a79 Bump golang version to 1.11 2019-01-21 09:37:22 +11:00
Kyle Titus 478208b7c4 Added Windows support for the "--inplace" command flag 2019-01-07 10:07:08 +11:00
Mike Farah 16bde80334 Prefix now supports arrays 2018-11-20 09:47:17 +11:00
matfax 48dcc15281 feat: add prefix command 2018-11-20 08:53:25 +11:00
Thad Craft a9ade5a832 fixing test lint 2018-10-25 15:46:57 +11:00
Thad Craft 8d6e3a6a75 copying file permissions from original file when inline merging - Closes #180 2018-10-25 15:46:57 +11:00
Mike Farah d84254c30f moar tests 2018-07-08 22:04:31 +10:00
Mike Farah 18bb4eee96 moar tests 2018-07-08 21:57:56 +10:00
Mike Farah 86b9fe3ef9 Can read from all documents 2018-07-08 21:47:01 +10:00
Mike Farah 2c15048ddb Added merge with append 2018-07-07 15:26:56 +10:00
Mike Farah b3b60665e4 Fixed toJson command line option, should only apply to read command 2018-06-26 14:09:56 +10:00
Mike Farah fb87f638f2 Multi doc supports updating all docs 2018-06-20 11:45:51 +10:00
Mike Farah 6d6e476ac8 Use gopkg managed versions of dependencies, for better go get support 2018-06-18 11:37:42 +10:00
Mike Farah c38f19e0a9 Enabled multi document support for merge (first document only) 2018-06-15 16:48:36 +10:00
Mike Farah 8ca85b1c64 Simplified merge command 2018-06-15 16:40:52 +10:00
Mike Farah 1a4064429d Delete now supports multi docs! 2018-06-15 09:43:20 +10:00
Mike Farah 297522cbdd Write supports multidoc yaml, better use of yaml library streaming 2018-06-15 08:39:59 +10:00