Add jsonata-js 2.2 test parity and guardrails - #22
Merged
Conversation
- Fix $contains(str, undefined) to return undefined instead of
raising T0410
- Fix empty tuple-group joins to return {} instead of undefined,
matching upstream's "correctly handle empty joins" behavior
- Refresh testdata from the official jsonata-js v2.2.2 test suite
(coalescing/default operator array-predicate cases, $each on an
empty object, $toMillis fractional-second truncation, empty joins)
- Add Compile options WithStack, WithTimeout, and WithSequence,
matching jsonata-js's stack/timeout/sequence guardrails API
(errors D1011/D1012/D2015); defaults are unchanged when unused
- Extend the sequence guardrail to $map, $filter, $each, wildcard
(*), and descendant (**), in addition to the range operator and
$append
- Compress the README benchmark tables into one table per metric
category and drop the RPC-transport column
- Bump package version to 0.3.1
Signed-off-by: NirBarak-RecoLabs <nirb@recolabs.ai>
MickeyShnaiderman-RecoLabs
approved these changes
Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$contains(str, undefined)now returns undefined instead of raisingT0410{}instead of undefined, matching upstream's "correctly handle empty joins" fixtestdata/with the missing v2.2.2 cases: coalescing/default-operator array-predicate cases,$eachon an empty object,$toMillisfractional-second truncation, and the two new empty-join casesCompileoptionsWithStack,WithTimeout, andWithSequence, matching jsonata-js'sstack/timeout/sequenceguardrails (errorsD1011/D1012/D2015); all are opt-in and existing defaults are unchanged$map,$filter,$each, wildcard (*), and descendant (**) — not just the range operator and$appendTest plan
go test ./...passes (all suites, including 7 newtestdata/cases and the newguardrails_test.go)golangci-lint runclean$map,$filter,$each,*,**) before adding regression tests