github 01mf02/jaq v3.1.0
3.1

10 hours ago

This release adds support for jq's input_filename filter --- thanks to @a-n-d-r-e-w-l #432!
Furthermore, at places where jaq accepted filters like .a["b"], it now also accepts (equivalent) filters such as .a.["b"] (note the added dot after .a). #423
Finally, this release corrects the indexing of arrays with an empty array, which previously panicked #439. Thanks to @leeewee for spotting this!

API

The biggest change in this release is that calls to halt in jq filters can now be handled by users of the jaq API, instead of forcing a termination of the process. Thanks to @a-n-d-r-e-w-l #433!
This has a few implications:

  • The signature of jaq_all::data::run had to be changed, resulting in a new major version of jaq-all.
  • To preserve semantic versioning stability guarantees, the jaq_core::unwrap_valr function still terminates the current process if halt is called, but only if the std feature is enabled --- otherwise, unwrap_valr panics! You need to take action to prevent panics if all of the following conditions hold:
    1. you use jaq_core::unwrap_valr,
    2. you have disabled the std feature in jaq_core, and
    3. you run filters that may call halt.

Furthermore, this version makes it possible to clone definitions, which can speed up compiling many different jq filters. #430

Full Changelog: v3.0.0...v3.1.0

Don't miss a new jaq release

NewReleases is sending notifications on new releases.