Repository navigation
fix(jq): null-path assignment, array growth, join, scan groups, from_entries and tostream like jq - #2602
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | f8b7f42 | Commit Preview URL Branch Preview URL |
Oct 07 2026, 09:32 PM |
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Михайло · project thread
What changed
null | .a.b = 1,.[2] = 1,+=, slice updates. An index past the end pads the array with null. Negative and too-large indexes and iterating a scalar now use jq's error texts.joinfollows jq 1.7: null becomes an empty string, and numbers and booleans are stringified.scanwith capture groups returns the groups. Unmatched groups inmatch/capturegive null strings with offset -1.ltrimstr/rtrimstrmatch jq on non-string input.from_entriesacceptskey/Key/name/Nameandvalue/Value.IN/1,IN/2,tostream,fromstreamandtruncate_stream.\x7f) is escaped on output.Why
Adopting the Debian-oracle jq cases from pseudo-linus (bench scored against jq 1.7.1 goldens). These are common agent filter idioms that errored or gave wrong output.
Before / After
null | .a.b = 1Cannot iterate over null (null){"a":{"b":1}}[1] | .[3] = 2index 3 out of bounds[1,null,null,2]["a",1,null] | join("-")"a-1-null""a-1-""a1b2" | [scan("([a-z])([0-9])")]["a1","b2"][["a","1"],["b","2"]][{name:"k",value:1}] | from_entries{"null":1}{"k":1}{a:[1]} | [tostream]tostream/0 is not defined[[["a",0],1],[["a",0]],[["a"]]]The Debian-oracle jq score went from 75.8% to 84.0% (lenient).
Risk
Checklist
Generated by Claude Code