Skip to content

v0.2.2

Latest

Choose a tag to compare

@NirBarak-RecoLabs NirBarak-RecoLabs released this 26 Apr 07:32
9e12a48

What's Changed

New APIs

  • Expression.EvalMap and Expression.EvalBytesWithVars — evaluate expressions against a pre-parsed map[string]any or JSON bytes with variable bindings, without re-serializing on the way in.
  • WASM exports — the browser build now exposes evalMap and evalBytesWithVars, letting JS callers bind variables and pass already-parsed objects without round-tripping through JSON strings.

Conformance Fixes

  • Function signatures — tightened parsing and call-time validation of variadic, optional, context (-), union (u), and lambda (l) parameters. Malformed function calls that previously slipped through now correctly raise the spec-defined errors.
  • $split — non-string input now returns T0410, matching the JSONata spec and jsonata-js.
  • Deterministic raw-map key ordering — iteration over Go-native map[string]any (e.g. via $keys, $spread, $each) now uses a stable sorted key order, removing non-determinism caused by Go's randomized map iteration.

Performance

  • Signatures are now pre-parsed at registration time instead of on every call.
  • Eval hot-path optimizations: float64 arithmetic fast-path, DeepEqual short-circuit for primitives, HOF argument-buffer reuse, and reduced allocations via slices.Clip.

Build / CI

  • Bump GitHub Actions to Node 24 versions (#7)
  • Fix Publish NPM workflow broken by the bundled-npm self-upgrade step (#15)

Full Changelog: v0.2.1...v0.2.2