Skip to content

Release v2.1.6

Choose a tag to compare

@github-actions github-actions released this 07 Jul 14:26
· 614 commits to main since this release

Release v2.1.6

🎯 Highlight: genuine 100% JSONata reference-suite compatibility β€” 1682/1682

Every previous release, including 2.1.5, silently ran an incomplete reference suite. The
test loader only collected files matching case*.json; the real suite (submodule
tests/jsonata-js) also ships spec files under other names β€” parent.json,
formatInteger.json, issueNNN.json, and similar β€” none of which matched that glob. This bug
predates and is unrelated to any 2.2.x version bump; the affected files date back to 2018–2019.
As a result, 408 of the suite's 1682 real test cases (24%) were never loaded or run at all,
so "1258/1258" / "1274/1274" passing was never actually the full suite β€” it was 1274/1682
(75.7%), just never measured against the true total.

Once those 408 cases were finally run, 325 of them failed, uncovering real, previously
invisible bugs:

  • Two crash bugs (Rust panics reachable from ordinary input, not edge cases) in datetime
    picture-string parsing β€” an unchecked slice index in parse_with_components that panics when a
    picture string has more components than the input has characters for.
  • $formatInteger and $parseInteger were completely unimplemented β€” recognized as builtin
    names but with no dispatch logic, failing every call with "Unknown function."
  • The % parent-reference operator was completely unimplemented β€” the lexer only ever
    treated % as binary modulo, so any expression using it as a parent reference (e.g.
    %.OrderID) failed to parse outright.
  • The @/# focus- and index-binding (tuple-stream) operators were partially broken: some
    expression shapes failed to parse, and others parsed but leaked an internal tuple-wrapper
    object into the final result instead of collapsing it correctly.
  • $fromMillis/$toMillis's picture-string (2-arg) forms were rejected outright or failed to
    parse valid date strings.
  • A handful of smaller stragglers in array-constructor semantics, $distinct, and array
    flattening.

All of the above are now fixed and verified against real jsonata-js behavior. jsonata-core now
passes 1682/1682 β€” the actual full reference suite, with zero cases silently skipped and zero
xfails remaining.

New language features

  • % (parent-reference) and @/# (focus/index-binding) operators β€” implemented from the
    lexer up through the AST and a new tuple-aware evaluator path.
  • Datetime picture-string formatting engine for $fromMillis/$toMillis.
  • $formatInteger / $parseInteger.

Also in this release

  • Fixed a benchmark harness bug where jsonata-js's evaluate() calls weren't awaited,
    making JavaScript look implausibly fast on array-heavy workloads; jsonata-python is now
    measured via its documented Context reuse path instead of a one-off call that
    re-bootstraps its embedded JS engine on every invocation.
  • Release pipeline now verifies the release tag matches the commit actually being released,
    failing loudly instead of silently building, testing, publishing, or benchmarking a stale ref.
  • Durable cross-implementation benchmark comparison infrastructure β€” results now persist across
    releases instead of being wiped by every docs deploy.
  • Versioned documentation via mike.
  • jsonata-js 2.2.1 compatibility, Phase 1: signature-engine rewrite for +/- support (work in
    progress toward full 2.2.1 parity; Phase 2 is deliberately deferred).

Installation

pip install jsonatapy==2.1.6

Verification

import jsonatapy
print(jsonatapy.__version__)  # Should print: 2.1.6