From cd81c7fa6bf0d061f455f67aae72dc5537f7851d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:16:33 +0000 Subject: [PATCH] Bump assets/syntaxes/02_Extra/SublimeJQ from `6870582` to `b7e53e5` (#2820) * Bump assets/syntaxes/02_Extra/SublimeJQ from `6870582` to `b7e53e5` Bumps [assets/syntaxes/02_Extra/SublimeJQ](https://github.com/zogwarg/SublimeJQ) from `6870582` to `b7e53e5`. - [Commits](https://github.com/zogwarg/SublimeJQ/compare/687058289c1a888e0895378432d66b41609a84d8...b7e53e5d86814f04a48d2e441bcf5f9fdf07e9c1) --- updated-dependencies: - dependency-name: assets/syntaxes/02_Extra/SublimeJQ dependency-type: direct:production ... Signed-off-by: dependabot[bot] * update highlighted version of sample.jq * update changelog --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Keith Hall --- CHANGELOG.md | 1 + assets/syntaxes/02_Extra/SublimeJQ | 2 +- tests/syntax-tests/highlighted/JQ/sample.jq | 32 ++++++++++----------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfc4c4dd..39cac34d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ ## Syntaxes - `cmd-help`: scope subcommands followed by other terms, and other misc improvements, see #2819 (@victor-gp) +- Upgrade JQ syntax, see #2820 (@dependabot[bot]) ## Themes diff --git a/assets/syntaxes/02_Extra/SublimeJQ b/assets/syntaxes/02_Extra/SublimeJQ index 68705828..b7e53e5d 160000 --- a/assets/syntaxes/02_Extra/SublimeJQ +++ b/assets/syntaxes/02_Extra/SublimeJQ @@ -1 +1 @@ -Subproject commit 687058289c1a888e0895378432d66b41609a84d8 +Subproject commit b7e53e5d86814f04a48d2e441bcf5f9fdf07e9c1 diff --git a/tests/syntax-tests/highlighted/JQ/sample.jq b/tests/syntax-tests/highlighted/JQ/sample.jq index ba9c853f..057e9edd 100644 --- a/tests/syntax-tests/highlighted/JQ/sample.jq +++ b/tests/syntax-tests/highlighted/JQ/sample.jq @@ -1,31 +1,31 @@ import "../imported-file" ; # With Comments ! -def weird($a; $b; $c): - [ $a, $b, $c ] | transpose | reduce .[][] as $item ( - []; - . + $item.property - ) +def weird($a; $b; $c): + [ $a, $b, $c ] | transpose | reduce .[][] as $item ( + []; + . + $item.property + ) ; -. | weird (.a; .b; .c) | +. | weird (.a; .b; .c) | ( -if (. | contains("never") ) then +if (. | contains("never") ) then  "Why yes" else  12.23 end -) as $never | +) as $never | {  hello,  why: "because", - hello: ( weird | ascii_upcase ), - format_eg: ( . | @json "My json string \( . | this | part | just | white | ascii_upcase | transpose)" ), - never: $never, + hello: ( weird | ascii_upcase ), + format_eg: ( . | @json "My json string \( . | this | part | just | white | ascii_upcase | transpose)" ), + never: $never,  "literal_key": literal_value,  "this": 12.1e12,  "part": "almost" @@ -38,8 +38,8 @@  similar: "but not quite"  }  } - ], -} | ( + ], +} | (    # And with very basic brace matching   @@ -47,13 +47,13 @@  ]     # Other invalid ends - ( [ } ] ) + ( [ } ] )  # A "valid" sequence - ( [ { key: () , other_key:( [ [] [[]] ] ), gaga } ] ) + ( [ { key: () , other_key:( [ [] [[]] ] ), gaga } ] )  # A "invalid" sequence - ( [ { key: () , other_key:( [ [] [[] ] ), gaga } ] ) + ( [ { key: () , other_key:( [ [] [[] ] ), gaga } ] )  "A string\n whith escaped characters \" because we can" )