Repository navigation
Releases
Releases Β· itchyny/gojq
Release v0.12.20
- implement
gojq.ToIntandgojq.ToFloat64for converting number values - fix destructuring alternative operator (
?//) to reset variables of
later alternatives, and to propagatebreakandhalterrors - fix update-assignment operator against object with overlapping paths
- fix
delpathsfunction to delete ancestor paths before descendant paths - fix
getpathfunction against string input - fix indexing and slicing a number literal written after a unary operator
- fix slice indices of floating point numbers for jq compatibility
- fix date and time functions against fractional, non-finite, and out of range numbers
- fix
strptimefunction to accept the zero time instant - fix
match,test, andcapturefunctions to support array arguments - fix
matchfunction to report an empty match after a non-empty one - fix
split/1function against empty input string - fix math functions against large number literals like
1e1000 - fix
jn/2andyn/2functions to avoid long recurrence on large orders - fix
absfunction against non-numbers for jq compatibility - fix
isnanfunction to return false for non-numbers for jq compatibility - fix
halt_errorfunction not to print a newline after non-string values - fix
--argjsonand--jsonargsoptions to reject empty and multiple JSON values - fix
--streamoption error message against unterminated input - fix JSON parse error message after a large value in non-seekable input like stdin
- fix offset of YAML parse error on multi-byte characters
- fix panic on continuing iteration after an invalid path error
- fix data race on input iterator when running code concurrently
- fix
addfunction to handle a nil map and slice as the first value - support destructuring alternative operator (
?//) inreduceandforeachsyntax - allow optional operator followed by alternative operator without spaces (
.a?//1) - improve performance of function calls by avoiding copies of scope values,
and path tracking inpath,paths,|=, anddelby reducing allocations
Release v0.12.19
- fix
gsubandsubwhen the replacement emits multiple values - fix
fmax,fmin,modffunctions against NaN and infinities - fix
join/1to useadd/0implementation and handle null separator - fix
delanddelpathson null to emit null - fix arithmetic operations on the minimum integer
- fix
significandfunction against subnormal numbers - fix handling of
--in cli flag parsing for jq compatibility - fix
flatten/1to emit error when the depth is NaN - fix array slice update to validate index types
- fix string repetition boundary check to match jq behavior
- implement
splits/2usingmatch/2for better jq compatibility - implement
to_entriesandfrom_entriesin jq for simplicity - improve performance of regexp functions by caching compiled regexps
Release v0.12.18
- implement
trimstr/1,toboolean/0function - fix
last/1to be included inbuiltins/0 - fix
--indent 0to preserve newlines - fix string repetition to emit error when the result is too large
- increase the array index limit to 536870912 (
2^29) - stop numeric normalization for concurrent execution (see 1ace748)
- support binding expressions with binary operators (
1 + 2 as $x | -$x) - improve
gojq.NewIterto be a generic function - improve logic for getting file contents on JSON parse error
- improve JSON parsing to preserve the precision of floating-point numbers
- improve YAML parsing performance and preserve the precision of large integers
- improve performance and reduce memory allocation of long-running queries
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