Releases: itchyny/gojq
Releases Β· itchyny/gojq
Release v0.12.17
- implement
add/1,skip/2functions - implement
--library-pathoption as the alias of-Loption - fix
reducesyntax to emit results for each initial value - fix
last/1to yield no values when the argument yields no values - fix
limit/2to emit an error on negative count - fix
@uriand@uridformats not to convert space between plus sign - fix resolving search paths of import statements in the query
- improve time functions to accept fewer element arrays
Release v0.12.16
- fix offset of query parsing error on multi-byte characters
- fix tests of
exp10andatan2failing on some platforms - fix
debug/1to be available only whendebug/0is defined - improve parser to allow binary operators as object values
- improve compiler to emit error if query is missing
Release v0.12.15
- implement
ltrim,rtrim, andtrimfunctions - implement
gojq.ParseErrorfor getting the offset and token of query parsing error - implement
gojq.HaltErrorfor detecting halt errors and stopping outer iteration - fix object construction with duplicate keys (
{x:0,y:1} | {a:.x,a:.y}) - fix
haltandhalt_errorfunctions to stop the command execution immediately - fix variable scope of binding syntax (
"a" as $v | def f: $v; "b" as $v | f) - fix pre-defined variables to be available in initial modules (
$ARGSin~/.jq) - fix
ltrimstrandrtrimstrfunctions to emit error on non-string input - fix
nearbyintandrintfunctions to round ties to even - improve parser to allow
reduce,foreach,if,try-catchsyntax as object values - remove
pow10in favor ofexp10, definescalbnandscalblnbyldexp
Release v0.12.14
- implement
abs,pick, anddebug/1functions - implement
--raw-output0option, and remove--nul-output(-0) option - fix string multiplication by zero to emit an empty string
- fix zero divided by zero to emit an error, not
nan - fix modulo operator to emit
nanif either side isnan - fix
implodefunction to emit replacement characters on invalid code points - fix
stderrfunction to output strings in raw format - fix
errorfunction to throw an error even fornull - fix
walkfunction on multiple outputs arguments - fix
--from-fileoption to work with--argsand--jsonargsoptions - fix the default module search path
../librelative to the executable - improve query parser to support comment continuation with backslash
- improve
modulemetafunction to include defined function names in the module - improve search path of
importandincludedirectives to support$ORIGINexpansion - remove deprecated
leaf_pathsfunction
Release v0.12.13
- implement
@uridformat string to decode URI values - fix functions returning arrays not to emit nil slices (
flatten,group_by,
unique,unique_by,nth,indices,path, andmodulemeta.deps)
Release v0.12.12
- fix assignment operator (
=) with overlapping paths and multiple values ([[]] | .. = ..) - fix crash on multiplying large numbers to an empty string (
9223372036854775807 * "") - improve zsh completion file
Release v0.12.11
- fix crash on the assignment operator (
=) with multiple values (. = (0,0)) - fix
isnormalandnormalsfunctions against subnormal numbers
Release v0.12.10
- fix
breakintry-catchquery (label $x | try break $x catch .) - fix path value validation for
getpathfunction (path(getpath([[0]][0]))) - fix path value validation for custom iterator functions
- fix
walkfunction with argument emitting multiple values ([1],{x:1} | walk(.,0)) - fix
@csv,@tsv,@shto escape the null character (["\u0000"] | @csv,@tsv,@sh) - improve performance of assignment operator (
=), update-assignment operator (|=),
map_values,del,delpaths,walk,ascii_downcase, andascii_upcasefunctions
Release v0.12.9
- fix
fromjsonto emit error on unexpected trailing string - fix path analyzer on variable argument evaluation (
def f($x): .y; path(f(.x))) - fix raw input option
--raw-input(-R) to keep carriage returns and support 64KiB+ lines
Release v0.12.8
- implement
gojq.Comparefor comparing values in custom internal functions - implement
gojq.TypeOffor obtaining type name of values in custom internal functions - implement
gojq.Previewfor previewing values for error messages of custom internal functions - fix query lexer to parse string literals as JSON to support surrogate pairs (
"\ud83d\ude04") - fix priority bug of declared and builtin functions (
def empty: .; null | select(.)) - fix string indexing by index out of bounds to emit
null("abc" | .[3]) - fix array binding pattern not to match against strings (
"abc" as [$a] ?// $a | $a) - fix
subandgsubfunctions to emit results in the same order of jq - fix
fromjsonto keep integer precision ("10000000000000000" | fromjson + 1) - fix stream option to raise error against incomplete JSON input
- improve array updating index and string repetition to increase limitations
- improve
mktimeto support nanoseconds, just likegmtimeandnow - improve query lexer to report unterminated string literals
- improve performance of string indexing and slicing by reducing allocations
- improve performance of object and array indexing, slicing, and iteration,
by validating path values by comparing data addresses. This change improves jq
compatibility of path value validation ({} | {}.x = 0,[0] | [.[]][] = 1).
Also optimize constant indexing and slicing by specialized instruction - improve performance of
add(on array of strings),flatten,min,max,
sort,unique,join,to_entries,from_entries,indices,index,
rindex,startswith,endswith,ltrimstr,rtrimstr,explode,
capture,sub, andgsubfunctions