Commit Graph

46 Commits

Author SHA1 Message Date
Steven WdV
904215ef4d
Fix key overriding in regular maps for traversing 2025-07-20 15:37:45 +02:00
Steven WdV
41cc4fb4ac
Merge remote-tracking branch 'stevenwdv/merge-anchor-fix' into merge-anchor-fix
# Conflicts:
#	pkg/yqlib/doc/operators/anchor-and-alias-operators.md
#	pkg/yqlib/operator_anchors_aliases_test.go
2025-07-20 15:00:23 +02:00
Steven WdV
3431aebb2c
Add tests for accessing !!str << 2025-07-20 13:28:14 +02:00
stevenwdv
5e75db824b
UK spelling 2025-07-17 11:43:28 +02:00
Steven WdV
08ecd39a1e
Add tests for invalid merge key handling for traverse 2025-07-16 18:07:16 +02:00
Steven WdV
a5b8ef6cb1
Add some tests regarding override behavior.
The one in fixedTraversePathOperatorScenarios still fails
2025-07-16 17:56:56 +02:00
Steven WdV
a47e882c8f
Flag for fixed list merge key traverse override behavior,
and fix traversing map with merge key that would override local key (completes #2110 fix)
2025-07-16 16:00:16 +02:00
Steven WdV
8c06478ade
Remove now-unused badAliasSample 2025-07-10 15:03:44 +02:00
Steven WdV
fa6dc5c9fb
Move new merge test comments to description field 2025-07-10 15:03:41 +02:00
Steven WdV
4d88d51b1b
Fix precedence of merge anchor sequence for traverse (explode was already correct) 2025-06-16 13:36:42 +02:00
Steven WdV
31628e7324
Make merge anchor errors for traversing nonfatal 2025-06-16 13:33:42 +02:00
Steven WdV
c3782799c5
Merge anchor traversing: add test for aliased sequence, cleanup 2025-06-16 09:56:10 +02:00
Steven WdV
162ea5437c
Fix merge anchor traversing
- Allow inline maps instead of just aliases
- Disallow nested sequences
- Disallow other types

Closes #2386
2025-06-13 19:08:36 +02:00
Mike Farah
b84fd47934 More goccy progress 2025-06-07 15:23:38 +10:00
Mike Farah
5273715428 Fixed panic error #2211 2024-12-07 16:20:45 +11:00
Mike Farah
8cde0c837c Can now retrieve the alias names of merge anchors #1942 2024-02-09 17:24:59 +11:00
Mike Farah
13d1bbb45f
Generic ast (#1829)
Remove dependency on yaml.Node for internal AST representation. Yaml decoder is now just another decoder.
2023-10-18 12:11:53 +11:00
Mike Farah
a389bb64b8 Fixed bug when splatting empty array #1613 2023-03-31 16:24:23 +11:00
Abel Sen
fa6fac1a76
Minor typos (#1595)
* Remove extra backtick

* Reword explanation of update

* Reword explanation of relative update

* Change "remaple" to "remain"

* Change "clovver" to "clobber"

* Reword explanation of update for comment operators

* Reword explanation of relative update for comment operators

* Change "array" to "expression"

* Change "the golangs" to "Golang's"

* Change "golangs" to "Golang's"

* Change "can durations" to "can add durations"

* Change "array scalars" to "arrays"

* Change "beit" to "be it"

* Fix typo in `eval` tip

* Fix typo in header for `has` operation

* Add space before pipe in `line` operator example

* Fix typos in explanation of deep array merges

* Change "is now used" to "is now used."

* Change "object," to "object."

* Changes "indexes" to "indices"

* Remove extraneous copied text from `..` article

* Reword explanation of `...` operator

* Change "your are" to "you are"

* Add link to `string` operator docs in `select` article

* Change "is a" to "parameter specifies" in `string` operators article

* Change "new line" to "newline"

* Change "golang regex" to "Golang's regex"

* Change "golang" to "Golang"

* Add period

* Remove comma in `subtract` article

* Remove duplicate number subtraction example

* Remove comma in `traverse` operator article

* Clarify use of brackets when `read`ing with special characters
2023-03-16 13:39:36 +11:00
Mike Farah
62d167c141
Variable loop - Fixes #1566 (#1577)
* Variable loop wip

* Variable loop wip

* Variable loop wip

* Variable loop wip

* Fixed variable operator to work like jq
2023-02-28 16:40:38 +11:00
Mike Farah
83c5e1bc83 Include blank new lines in leading header preprocessing #1462 2022-12-08 13:33:06 +11:00
Mike Farah
be05df03b5 Fixing usage of quoted numeric keys #1247 2022-06-23 19:22:11 +10:00
Mike Farah
26529fae94 Nicer error message when trying to use merge anchor tags other than maps #1184 2022-04-27 14:46:52 +10:00
Mike Farah
b11075ec98 now assumes yaml idiomatic formatting when adding to empty maps/arrays 2022-04-15 08:27:22 +10:00
Mike Farah
df32baedf1
Added XML decoder (#1044) 2021-12-21 15:02:07 +11:00
Mike Farah
0557439765 Update document generation script 2021-11-03 22:37:07 +11:00
Mike Farah
da47318f42 Fixed newline issue https://github.com/mikefarah/yq/issues/855 2021-06-12 08:26:27 +10:00
Mike Farah
88bee2809f Fixed issue on creating objects using [] 2021-06-11 14:27:44 +10:00
Mike Farah
09c5ed24be Updating docs 2021-06-10 08:35:41 +10:00
Mike Farah
78af68f436 Added nested traversal examples 2021-06-10 08:31:26 +10:00
Mike Farah
d18a6963f6 Fixes nested array indexing #824 2021-05-21 14:18:24 +10:00
Mike Farah
179c44aacc Fixing readonly ops not to modify context when paths dont exist 2021-05-16 14:36:13 +10:00
Mike Farah
bb3ffd40b5 Added optional traverse flag 2021-05-09 15:36:33 +10:00
Mike Farah
cc08afc435 Added with_entries 2021-05-09 15:12:50 +10:00
Mike Farah
e02ad4d7e8 Added space example to docs 2021-02-11 10:58:40 +11:00
Mike Farah
cfcac6d1dc improving docs 2021-02-11 10:58:40 +11:00
Mike Farah
a5ddbca97f Fixing special character example 2021-02-11 10:58:40 +11:00
Mike Farah
85ec32e3db Added variables 2021-02-11 10:58:40 +11:00
Mike Farah
7a184bef78 Env Ops! 2021-02-11 10:58:40 +11:00
Mike Farah
9e9e15df73 More scenarios 2020-12-27 23:00:46 +11:00
Mike Farah
6cc6fdf322 Cleaning code 2020-12-27 22:56:15 +11:00
Mike Farah
a88c2dc5d3 Traverse Array Operator 2020-12-27 22:48:20 +11:00
Mike Farah
3a030651a3 Added append equals, merge append. Fixed creating numeric arrays 2020-11-28 11:24:16 +11:00
Mike Farah
aed598c736 Fixing docs 2020-11-22 13:16:54 +11:00
Mike Farah
dcacad1e7e docs 2020-11-18 10:32:30 +11:00
Mike Farah
b1f139c965 refactored 2020-11-04 10:48:43 +11:00