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::runhad to be changed, resulting in a new major version ofjaq-all. - To preserve semantic versioning stability guarantees, the
jaq_core::unwrap_valrfunction still terminates the current process ifhaltis called, but only if thestdfeature is enabled --- otherwise,unwrap_valrpanics! You need to take action to prevent panics if all of the following conditions hold:- you use
jaq_core::unwrap_valr, - you have disabled the
stdfeature injaq_core, and - you run filters that may call
halt.
- you use
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