Skip to content

Releases: mikefarah/yq

Merge arrays and read multiple documents

10 Jul 11:11

Choose a tag to compare

Resolves:

  • Ability to read multiple documents in a single file: #157
  • Feature Request: Append list items instead of overwriting: #128

Fixes writing in-place with docker

27 Jun 10:06

Choose a tag to compare

Fix for #156.

Minor fix to help text, -j --tojson no longer appear as global options as the only work for the 'read' command.

Multiple Document Support!

20 Jun 07:50

Choose a tag to compare

Finally added multiple document support!

Use the '-d' argument to specify a particular document, default to 0 (first doc) if not specified.

yq r -d1 content.yaml this.deep[0].path
yq w -d1 content.yaml this.deep[0].path newValue
yq w -d'*' content.yaml this.deep[0].path newValue

Backward breaking change
A result of this is that now only the read command supports the JSON output flag, all other commands do not (as you cannot have multiple documents in a JSON file. If you still want JSON output you'll need to pipe:

yq w -d1 content.yaml this.deep[0].path newValue | yq r -d1 -

Fixed #9

Multiple Document Support!

15 Jun 10:50

Choose a tag to compare

Pre-release

Finally added multiple document support!

Use the '-d' argument to specify a particular document, default to 0 (first doc) if not specified.

yq r -d1 content.yaml this.deep[0].path
yq w -d1 content.yaml this.deep[0].path newValue

Backward breaking change
A result of this is that now only the read command supports the JSON output flag, all other commands do not (as you cannot have multiple documents in a JSON file. If you still want JSON output you'll need to pipe:

yq w -d1 content.yaml this.deep[0].path newValue | yq r -d1 -

Currently in beta and available just in Git - will promote to brew, snap etc shortly

Fixed #9

1.15.0

07 May 10:35

Choose a tag to compare

Implemented a delete command and associated tests for deleting a node from YAML input. This behaves in a similar manner as the write command.

The following functionality is not provided, although could conceivably be added with a modicum of additional effort if there is strong opinion that they are required:

Specify the node(s) to delete using a script (as with the write command)
Deleting common elements from all members of an array (deletions from individual members are supported using a path like a.b[0].name, but deleting from all instances in one pass, e.g. a.b[*].name, is not).

Thanks @mhuxtable !

Print multiline strings plainly

27 Mar 05:31

Choose a tag to compare

Multiline value fix - multi line strings no longer printed as a yaml block

Although printing the string as a yaml block can be argued to be technically correct, in practical terms it's more useful to just print out the multiline string as is.

Fixes #121 and #104

Renamed to yq

19 Dec 00:29

Choose a tag to compare

1.14.0

Rename to yq

1.13.1

25 Sep 13:37

Choose a tag to compare

28bcbd3 Release v1.13.1
9dd4503 Merge pull request #42 from mikefarah/bugfix/append-empty-array
185d1fa Bugfix: Append when array empty results in null value
7b004cb Task: Prepare for development

1.13.0

25 Sep 01:24

Choose a tag to compare

54c73eb Release v1.13.0
3b03a08 Merge pull request #40 from kenjones-cisco/task/releasing
a00e6c5 Task: Add release process
9d1a5b1 Merge pull request #39 from kenjones-cisco/feature/append-array
c5f80a1 Feature: Add append to array
c17f8df Merge pull request #38 from kenjones-cisco/task/add-merge-docs
66c8390 Task: Add merge command docs
dda9b1f Merge pull request #37 from kenjones-cisco/bugfix/read-yaml-array
683de28 Merge pull request #34 from kenjones-cisco/feature/add-version
51fa1a8 Bugfix: Read yaml array
b9ac6a3 Merge pull request #36 from kenjones-cisco/bugfix/write-empty-array
499974c Bugfix: Write empty array value
72bd88c Feature: Adds support for --version
6980be3 Feature: Adds merge command
2933ea1 Merge pull request #33 from kenjones-cisco/bugfix/acceptance
cf2f23d Bugfix: Resolve failing acceptance test
45e9ad8 Merge pull request #30 from kenjones-cisco/task/refactor-add-tests
53b2c64 Task: Increase test coverage, includes refactor
359ca5a Merge branch 'kenjones-cisco-bugfix/nonstring-keys'
79baa49 Merge branch 'bugfix/nonstring-keys' of git://github.com/kenjones-cisco/yaml into kenjones-cisco-bugfix/nonstring-keys
2cda78c Vendor shas
6d1e61c Merge branch 'master' into bugfix/nonstring-keys
86639ac Task: Simplify development
3beee3f Bugfix: Panic on non-string keys

Read and write arrays

08 Aug 22:34

Choose a tag to compare