Skip to content

Releases: gongfarmer/janeway

0.6.0

05 Feb 18:24
Compare
Choose a tag to compare

New library features

  • Enumerator#insert - add new values to the input data at location specified by a jsonpath query
  • Enumerator#replace - replace values matched by a jsonpath query
  • Enumerator#delete_if - delete values matched by query if the given block returns a truthy value

New features in janeway command-line tool:

  • --insert option to add new values to the input data at location specified by jsonpath query
  • --replace option to replace values matched by the jsonpath query
  • --paths option to list normalized paths for values matched by the jsonpath query

0.5.0

30 Jan 17:45
Compare
Choose a tag to compare
  • Minor fixes to "require" paths, which caused load error when run with bundle exec
  • Fix or defer unit tests that fail on truffleruby.
  • rename the Janeway::Query#on method to Janeway::Query#enum_for to match the rename of Janeway.on in previous release

0.4.0

29 Jan 17:04
Compare
Choose a tag to compare

The README.md has been updated to describe these changes in detail.

Ruby library changes

New Enumerator class which adds new features:
  • iteration over results with #each, which yields value, parent, index and normalized path for each match
  • deletion of matched values with #delete
  • all Enumerable module methods: #map, #select, #reject, #filter_map, #find, #find_all, etc.
Breaking change:
  • Janeway.find_all method is renamed to #search and moved to the Enumerator class (method name #find_all is already used by the Enumerable module)

Janeway command-line tool changes

New features:
  • new option to print the entire input with the matched values deleted
  • allow query to be provided for parsing, without requiring input

0.3.0

22 Jan 16:04
Compare
Choose a tag to compare
* new method `Janeway#each` to iterate over matched values without collecting them all first
* performance improvements.

Rewrote the interpreter stage in preparation for later work.

Previously it was a set of methods that interpreted an element then used switch statements and "send" to forward the results to the next filter method. Each time a filter method ran, it had to do some work to figure out where to send its output.

Now it first builds a pipeline of expression interpreters which just forward their output to the next element in the pipeline.
All the work of deciding "what comes next" is done once up front, instead of being repeatedly done during interpretation.
This significantly sped up every query, and is especially noticeable on large data sets.

janeway-jsonpath-0.2.0.gem

14 Jan 06:00
Compare
Choose a tag to compare

Bugfixes:

* fix incorrect parsing of queries where name selector follows filter selector
* fix incorrect parsing of queries where name selector follows array slice selector
* fix incorrect interpretation of wildcard queries, which were sometimes consuming too many tokens