Releases: itchyny/gojq
Releases · itchyny/gojq
Release v0.12.7
- fix precedence of try expression against operators (
try 0 * error(0)) - fix iterator suffix with optional operator (
0 | .x[]?) - fix stream option with slurp option or
input,inputsfunctions - fix the command flag parser to support equal sign in short options with argument
- fix string conversion of query including empty strings in module and import metadata
- improve performance of
isemptyfunction
Release v0.12.6
- implement options for consuming remaining arguments (
--args,--jsonargs,$ARGS.positional) - fix
delpathsfunction with overlapped paths - fix
--exit-statusflag withhalt,halt_errorfunctions - fix
input_filenamefunction with null input option - fix path value validation for
nan - fix crash on branch optimization (
if 0 then . else 0|0 end) - add validation on regular expression flags to reject unsupported ones
- improve performance of
range,join,flattenfunctions - improve constant value optimization for object with quoted keys
- remove dependency on forked
go-flagspackage
Release v0.12.5
- implement
input_filenamefunction for the command - fix priority bug of declared functions and arguments (
def g: 1; def f(g): g; f(2)) - fix label handling to catch the correct break error (
first((0, 0) | first(0))) - fix
null|erroranderror(null)to behave likeempty(null | [0, error, error(null), 1]) - fix integer division to keep precision when divisible (
1 / 1 * 1000000000000000000000) - fix modulo operator on negative number and large number (
(-1) % 10000000000) - fix combination of slurp (
--slurp) and raw input option (--raw-input) to keep newlines - change the default module paths to
~/.jq,$ORIGIN/../lib/gojq,$ORIGIN/libwhere$ORIGINis the directory where the executable is located in - improve command argument parser to recognize query with leading hyphen, allow hyphen for standard input, and force posix style on Windows
- improve
@base64dto allow input without padding characters - improve
fromdate,fromdateiso8601to parse date time strings with timezone offset - improve
halt_errorto print error values without prefix - improve
sub,gsubto allow the replacement string emitting multiple values - improve encoding
\band\fin strings - improve module loader for search path in query, and absolute path
- improve query lexer to support string literal including newlines
- improve performance of
index,rindex,indices,transpose, andwalkfunctions - improve performance of value preview in errors and debug mode
- improve runtime performance including tail call optimization
- switch Docker base image to
distroless/static:debug
Release v0.12.4
- fix numeric conversion of large floating-point numbers in modulo operator
- implement a compiler option for adding custom iterator functions
- implement
gojq.NewIterfunction for creating a new iterator from values - implement
$ARGS.namedfor listing command line variables - remove
debugandstderrfunctions from the library - stop printing newlines on
stderrfunction for jq compatibility
Release v0.12.3
- fix array slicing with infinities and large numbers (
[0][-infinite:infinite], [0][:1e20]) - fix multiplying strings and modulo by infinities on MIPS 64 architecture
- fix git revision information in Docker images
- release multi-platform Docker images for ARM 64
- switch to
distrolessimage for Docker base image
Release v0.12.2
- implement
GOJQ_COLORSenvironment variable to configure individual colors - respect
--color-output(-C) option even ifNO_COLORis set - implement
gojq.ValueErrorinterface for custom internal functions - fix crash on timestamps in YAML input
- fix calculation on
infinite(infinite-infinite | isnan) - fix comparison on
nan(nan < nan) - fix validation of
implode([-1] | implode) - fix number normalization for custom JSON module loader
- print error line numbers on invalid JSON and YAML
- improve
strftime,strptimefor time zone offsets - improve performance on reading a large JSON file given by command line argument
- improve performance and reduce memory allocation of the lexer, compiler and executor
Release v0.12.1
- skip adding
$HOME/.jqto module paths when$HOMEis unset - fix optional operator followed by division operator (
1?/1) - fix undefined format followed by optional operator (
@foo?) - fix parsing invalid consecutive dots while scanning a number (
0..[empty]) - fix panic on printing a query with
%#v - improve performance and reduce memory allocation of
query.String() - change all methods of
ModuleLoaderoptional
Release v0.12.0
- implement tab indentation option (
--tab) - implement a compiler option for adding custom internal functions
- implement
gojq.Marshalfunction for jq-flavored encoding - fix slurp option with JSON file arguments
- fix escaping characters in object keys
- fix normalizing negative
int64tointon 32-bit architecture - fix crash on continuing iteration after emitting an error
iter.Next()does not normalizeNaNand infinities anymore. Library users should take care of them. To handle them for encoding as JSON bytes, usegojq.Marshal. Also,iter.Next()does not clone values deeply anymore for performance reason. Users must not update the elements of the returned arrays and objects.- improve performance of outputting JSON values by about 3.5 times
Release v0.11.2
- fix build for 32bit architecture
- release to GitHub Container Registry
Release v0.11.1
- improve compatibility of
strftime,strptimefunctions with jq - fix YAML input with numbers in keys
- fix crash on multiplying a large number or
infiniteto a string - fix crash on error while slicing a string (
""[:{}]) - fix crash on modulo by a number near 0.0 (
1 % 0.1) - include
CREDITSfile in artifacts