Skip to content

Releases: itchyny/gojq

Release v0.12.7

01 Mar 12:41

Choose a tag to compare

  • 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, inputs functions
  • 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 isempty function

Release v0.12.6

01 Dec 13:11

Choose a tag to compare

  • implement options for consuming remaining arguments (--args, --jsonargs, $ARGS.positional)
  • fix delpaths function with overlapped paths
  • fix --exit-status flag with halt, halt_error functions
  • fix input_filename function 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, flatten functions
  • improve constant value optimization for object with quoted keys
  • remove dependency on forked go-flags package

Release v0.12.5

01 Sep 13:01

Choose a tag to compare

  • implement input_filename function 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|error and error(null) to behave like empty (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/lib where $ORIGIN is 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 @base64d to allow input without padding characters
  • improve fromdate, fromdateiso8601 to parse date time strings with timezone offset
  • improve halt_error to print error values without prefix
  • improve sub, gsub to allow the replacement string emitting multiple values
  • improve encoding \b and \f in 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, and walk functions
  • 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

01 Jun 12:01

Choose a tag to compare

  • fix numeric conversion of large floating-point numbers in modulo operator
  • implement a compiler option for adding custom iterator functions
  • implement gojq.NewIter function for creating a new iterator from values
  • implement $ARGS.named for listing command line variables
  • remove debug and stderr functions from the library
  • stop printing newlines on stderr function for jq compatibility

Release v0.12.3

01 Apr 12:00

Choose a tag to compare

  • 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 distroless image for Docker base image

Release v0.12.2

01 Mar 13:01

Choose a tag to compare

  • implement GOJQ_COLORS environment variable to configure individual colors
  • respect --color-output (-C) option even if NO_COLOR is set
  • implement gojq.ValueError interface 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, strptime for 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

17 Jan 04:03

Choose a tag to compare

  • skip adding $HOME/.jq to module paths when $HOME is 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 ModuleLoader optional

Release v0.12.0

24 Dec 12:57

Choose a tag to compare

  • implement tab indentation option (--tab)
  • implement a compiler option for adding custom internal functions
  • implement gojq.Marshal function for jq-flavored encoding
  • fix slurp option with JSON file arguments
  • fix escaping characters in object keys
  • fix normalizing negative int64 to int on 32-bit architecture
  • fix crash on continuing iteration after emitting an error
  • iter.Next() does not normalize NaN and infinities anymore. Library users should take care of them. To handle them for encoding as JSON bytes, use gojq.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

01 Oct 10:41

Choose a tag to compare

Release v0.11.1

22 Aug 12:19

Choose a tag to compare

  • improve compatibility of strftime, strptime functions with jq
  • fix YAML input with numbers in keys
  • fix crash on multiplying a large number or infinite to a string
  • fix crash on error while slicing a string (""[:{}])
  • fix crash on modulo by a number near 0.0 (1 % 0.1)
  • include CREDITS file in artifacts