jsonatapy 2.2.6__tar.gz → 2.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/CHANGELOG.md +29 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/Cargo.lock +44 -33
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/Cargo.toml +1 -1
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/PKG-INFO +1 -1
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/pyproject.toml +1 -1
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/evaluator.rs +23 -8
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.gitignore +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.gitmodules +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.serena/.gitignore +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.serena/memories/architecture.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.serena/memories/conventions.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.serena/memories/core.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.serena/memories/memory_maintenance.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.serena/memories/suggested_commands.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.serena/memories/task_completion.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.serena/memories/tech_stack.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/.serena/project.yml +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/LICENSE +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/README.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/benches/evaluator_bench.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/bindings/c/README.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/bindings/c/examples/smoke.c +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/bindings/c/jsonata.h +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/examples/evaluator_demo.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/examples/host_functions.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/examples/parser_demo.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/examples/simd_json_bench.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/python/jsonatapy/__init__.py +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/python/jsonatapy/__main__.py +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/python/jsonatapy/_cli/__init__.py +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/python/jsonatapy/_cli/bindings.py +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/python/jsonatapy/_cli/error_format.py +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/python/jsonatapy/_cli/mcp_server.py +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/python/jsonatapy/_cli/resolve.py +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/python/jsonatapy/_cli/run.py +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/python/jsonatapy/py.typed +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/ast.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/ast_transform.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/bin/jsonata/bindings.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/bin/jsonata/error_format.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/bin/jsonata/main.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/bin/jsonata/resolve.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/capi.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/compiler.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/datetime.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/functions.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/lazy.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/lib.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/parser/README.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/parser.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/signature.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/value.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/src/vm.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/study/cli_fixtures.json +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/study/cli_fixtures_testdata.json +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/study/cli_spec.md +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/tests/cli_fixtures_test.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/tests/cli_test.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/tests/datetime_picture_suite.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/tests/host_functions_test.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/tests/integration_test.rs +0 -0
- {jsonatapy-2.2.6 → jsonatapy-2.2.7}/tests/parent_and_focus_binding_suite.rs +0 -0
|
@@ -19,6 +19,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
19
19
|
|
|
20
20
|
### Security
|
|
21
21
|
|
|
22
|
+
## [2.2.7] - 2026-07-21
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Dependabot no longer auto-bumps the `tests/jsonata-js` reference submodule (removed the
|
|
28
|
+
`gitsubmodule` ecosystem entry). Reference-suite updates are handled by the
|
|
29
|
+
`sync-jsonata.yml` workflow, which runs the conformance suite against each new jsonata-js
|
|
30
|
+
release and opens a tracking issue (or a clean PR) — avoiding context-free failing bump
|
|
31
|
+
PRs like #82.
|
|
32
|
+
|
|
33
|
+
### Deprecated
|
|
34
|
+
|
|
35
|
+
### Removed
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
- Ensures compliance with the **jsonata-js 2.2.2** reference test suite (reference submodule
|
|
39
|
+
bumped to `6c7e95f`); the full reference suite — 1686 cases — passes. Three behavior
|
|
40
|
+
changes were required to match jsonata-js 2.2.2:
|
|
41
|
+
- `$contains(str, token)` now returns `undefined` when either argument is undefined,
|
|
42
|
+
instead of raising a type error (jsonata-js #809).
|
|
43
|
+
- `$each(obj, fn)` now returns `undefined` when its first argument is undefined, instead
|
|
44
|
+
of raising `each() first argument must be an object`.
|
|
45
|
+
- An object constructor (group-by) applied to an empty or undefined sequence now yields
|
|
46
|
+
an empty object `{}` instead of `undefined` (jsonata-js #817, "correctly handle empty
|
|
47
|
+
joins"); `null` input still returns `null` and non-empty grouping is unchanged.
|
|
48
|
+
|
|
49
|
+
### Security
|
|
50
|
+
|
|
22
51
|
## [2.2.6] - 2026-07-20
|
|
23
52
|
|
|
24
53
|
### Added
|
|
@@ -240,9 +240,9 @@ dependencies = [
|
|
|
240
240
|
|
|
241
241
|
[[package]]
|
|
242
242
|
name = "clap"
|
|
243
|
-
version = "4.6.
|
|
243
|
+
version = "4.6.3"
|
|
244
244
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
245
|
-
checksum = "
|
|
245
|
+
checksum = "0fb99565819980999fb7b4a1796046a5c949e6d4ff132cf5fadf5a641e20d776"
|
|
246
246
|
dependencies = [
|
|
247
247
|
"clap_builder",
|
|
248
248
|
"clap_derive",
|
|
@@ -250,9 +250,9 @@ dependencies = [
|
|
|
250
250
|
|
|
251
251
|
[[package]]
|
|
252
252
|
name = "clap_builder"
|
|
253
|
-
version = "4.6.
|
|
253
|
+
version = "4.6.2"
|
|
254
254
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
255
|
-
checksum = "
|
|
255
|
+
checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b"
|
|
256
256
|
dependencies = [
|
|
257
257
|
"anstream",
|
|
258
258
|
"anstyle",
|
|
@@ -262,14 +262,14 @@ dependencies = [
|
|
|
262
262
|
|
|
263
263
|
[[package]]
|
|
264
264
|
name = "clap_derive"
|
|
265
|
-
version = "4.6.
|
|
265
|
+
version = "4.6.3"
|
|
266
266
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
267
|
-
checksum = "
|
|
267
|
+
checksum = "32f2392eae7f16557a3d727ef3a12e57b2b2ca6f98566a5f4fb41ffe305df077"
|
|
268
268
|
dependencies = [
|
|
269
269
|
"heck",
|
|
270
270
|
"proc-macro2",
|
|
271
271
|
"quote",
|
|
272
|
-
"syn",
|
|
272
|
+
"syn 2.0.118",
|
|
273
273
|
]
|
|
274
274
|
|
|
275
275
|
[[package]]
|
|
@@ -586,7 +586,7 @@ dependencies = [
|
|
|
586
586
|
|
|
587
587
|
[[package]]
|
|
588
588
|
name = "jsonata-core"
|
|
589
|
-
version = "2.2.
|
|
589
|
+
version = "2.2.7"
|
|
590
590
|
dependencies = [
|
|
591
591
|
"assert_cmd",
|
|
592
592
|
"base64",
|
|
@@ -849,7 +849,7 @@ dependencies = [
|
|
|
849
849
|
"proc-macro2",
|
|
850
850
|
"pyo3-macros-backend",
|
|
851
851
|
"quote",
|
|
852
|
-
"syn",
|
|
852
|
+
"syn 2.0.118",
|
|
853
853
|
]
|
|
854
854
|
|
|
855
855
|
[[package]]
|
|
@@ -861,7 +861,7 @@ dependencies = [
|
|
|
861
861
|
"heck",
|
|
862
862
|
"proc-macro2",
|
|
863
863
|
"quote",
|
|
864
|
-
"syn",
|
|
864
|
+
"syn 2.0.118",
|
|
865
865
|
]
|
|
866
866
|
|
|
867
867
|
[[package]]
|
|
@@ -983,14 +983,14 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
|
|
|
983
983
|
dependencies = [
|
|
984
984
|
"proc-macro2",
|
|
985
985
|
"quote",
|
|
986
|
-
"syn",
|
|
986
|
+
"syn 2.0.118",
|
|
987
987
|
]
|
|
988
988
|
|
|
989
989
|
[[package]]
|
|
990
990
|
name = "regex"
|
|
991
|
-
version = "1.13.
|
|
991
|
+
version = "1.13.1"
|
|
992
992
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
993
|
-
checksum = "
|
|
993
|
+
checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
|
|
994
994
|
dependencies = [
|
|
995
995
|
"aho-corasick",
|
|
996
996
|
"memchr",
|
|
@@ -1000,9 +1000,9 @@ dependencies = [
|
|
|
1000
1000
|
|
|
1001
1001
|
[[package]]
|
|
1002
1002
|
name = "regex-automata"
|
|
1003
|
-
version = "0.4.
|
|
1003
|
+
version = "0.4.16"
|
|
1004
1004
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1005
|
-
checksum = "
|
|
1005
|
+
checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad"
|
|
1006
1006
|
dependencies = [
|
|
1007
1007
|
"aho-corasick",
|
|
1008
1008
|
"memchr",
|
|
@@ -1063,9 +1063,9 @@ dependencies = [
|
|
|
1063
1063
|
|
|
1064
1064
|
[[package]]
|
|
1065
1065
|
name = "serde"
|
|
1066
|
-
version = "1.0.
|
|
1066
|
+
version = "1.0.229"
|
|
1067
1067
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1068
|
-
checksum = "
|
|
1068
|
+
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
1069
1069
|
dependencies = [
|
|
1070
1070
|
"serde_core",
|
|
1071
1071
|
"serde_derive",
|
|
@@ -1073,29 +1073,29 @@ dependencies = [
|
|
|
1073
1073
|
|
|
1074
1074
|
[[package]]
|
|
1075
1075
|
name = "serde_core"
|
|
1076
|
-
version = "1.0.
|
|
1076
|
+
version = "1.0.229"
|
|
1077
1077
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1078
|
-
checksum = "
|
|
1078
|
+
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
1079
1079
|
dependencies = [
|
|
1080
1080
|
"serde_derive",
|
|
1081
1081
|
]
|
|
1082
1082
|
|
|
1083
1083
|
[[package]]
|
|
1084
1084
|
name = "serde_derive"
|
|
1085
|
-
version = "1.0.
|
|
1085
|
+
version = "1.0.229"
|
|
1086
1086
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1087
|
-
checksum = "
|
|
1087
|
+
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
1088
1088
|
dependencies = [
|
|
1089
1089
|
"proc-macro2",
|
|
1090
1090
|
"quote",
|
|
1091
|
-
"syn",
|
|
1091
|
+
"syn 3.0.2",
|
|
1092
1092
|
]
|
|
1093
1093
|
|
|
1094
1094
|
[[package]]
|
|
1095
1095
|
name = "serde_json"
|
|
1096
|
-
version = "1.0.
|
|
1096
|
+
version = "1.0.151"
|
|
1097
1097
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1098
|
-
checksum = "
|
|
1098
|
+
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
|
|
1099
1099
|
dependencies = [
|
|
1100
1100
|
"indexmap",
|
|
1101
1101
|
"itoa",
|
|
@@ -1167,6 +1167,17 @@ dependencies = [
|
|
|
1167
1167
|
"unicode-ident",
|
|
1168
1168
|
]
|
|
1169
1169
|
|
|
1170
|
+
[[package]]
|
|
1171
|
+
name = "syn"
|
|
1172
|
+
version = "3.0.2"
|
|
1173
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1174
|
+
checksum = "a207d6d6a2b7fc470b80443726053f18a2481b7e1eee970597051596567987a3"
|
|
1175
|
+
dependencies = [
|
|
1176
|
+
"proc-macro2",
|
|
1177
|
+
"quote",
|
|
1178
|
+
"unicode-ident",
|
|
1179
|
+
]
|
|
1180
|
+
|
|
1170
1181
|
[[package]]
|
|
1171
1182
|
name = "target-lexicon"
|
|
1172
1183
|
version = "0.13.5"
|
|
@@ -1194,22 +1205,22 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683"
|
|
|
1194
1205
|
|
|
1195
1206
|
[[package]]
|
|
1196
1207
|
name = "thiserror"
|
|
1197
|
-
version = "2.0.
|
|
1208
|
+
version = "2.0.19"
|
|
1198
1209
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1199
|
-
checksum = "
|
|
1210
|
+
checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9"
|
|
1200
1211
|
dependencies = [
|
|
1201
1212
|
"thiserror-impl",
|
|
1202
1213
|
]
|
|
1203
1214
|
|
|
1204
1215
|
[[package]]
|
|
1205
1216
|
name = "thiserror-impl"
|
|
1206
|
-
version = "2.0.
|
|
1217
|
+
version = "2.0.19"
|
|
1207
1218
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1208
|
-
checksum = "
|
|
1219
|
+
checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd"
|
|
1209
1220
|
dependencies = [
|
|
1210
1221
|
"proc-macro2",
|
|
1211
1222
|
"quote",
|
|
1212
|
-
"syn",
|
|
1223
|
+
"syn 3.0.2",
|
|
1213
1224
|
]
|
|
1214
1225
|
|
|
1215
1226
|
[[package]]
|
|
@@ -1312,7 +1323,7 @@ dependencies = [
|
|
|
1312
1323
|
"bumpalo",
|
|
1313
1324
|
"proc-macro2",
|
|
1314
1325
|
"quote",
|
|
1315
|
-
"syn",
|
|
1326
|
+
"syn 2.0.118",
|
|
1316
1327
|
"wasm-bindgen-shared",
|
|
1317
1328
|
]
|
|
1318
1329
|
|
|
@@ -1387,7 +1398,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
|
|
|
1387
1398
|
dependencies = [
|
|
1388
1399
|
"proc-macro2",
|
|
1389
1400
|
"quote",
|
|
1390
|
-
"syn",
|
|
1401
|
+
"syn 2.0.118",
|
|
1391
1402
|
]
|
|
1392
1403
|
|
|
1393
1404
|
[[package]]
|
|
@@ -1398,7 +1409,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
|
|
|
1398
1409
|
dependencies = [
|
|
1399
1410
|
"proc-macro2",
|
|
1400
1411
|
"quote",
|
|
1401
|
-
"syn",
|
|
1412
|
+
"syn 2.0.118",
|
|
1402
1413
|
]
|
|
1403
1414
|
|
|
1404
1415
|
[[package]]
|
|
@@ -1457,7 +1468,7 @@ checksum = "e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5"
|
|
|
1457
1468
|
dependencies = [
|
|
1458
1469
|
"proc-macro2",
|
|
1459
1470
|
"quote",
|
|
1460
|
-
"syn",
|
|
1471
|
+
"syn 2.0.118",
|
|
1461
1472
|
]
|
|
1462
1473
|
|
|
1463
1474
|
[[package]]
|
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "jsonatapy"
|
|
7
|
-
version = "2.2.
|
|
7
|
+
version = "2.2.7"
|
|
8
8
|
description = "High-performance Python/Rust implementation of JSONata query and transformation language"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "txjmb", email = "txjmb@users.noreply.github.com"}
|
|
@@ -2177,8 +2177,13 @@ fn call_pure_builtin(
|
|
|
2177
2177
|
"contains() requires exactly 2 arguments".to_string(),
|
|
2178
2178
|
));
|
|
2179
2179
|
}
|
|
2180
|
+
// jsonata-js #809: $contains returns undefined when either argument
|
|
2181
|
+
// (the string OR the pattern) is undefined.
|
|
2182
|
+
if effective_args[0].is_undefined() || effective_args[1].is_undefined() {
|
|
2183
|
+
return Ok(JValue::Undefined);
|
|
2184
|
+
}
|
|
2180
2185
|
match &effective_args[0] {
|
|
2181
|
-
JValue::Null
|
|
2186
|
+
JValue::Null => Ok(JValue::Null),
|
|
2182
2187
|
JValue::String(s) => Ok(functions::string::contains(s, &effective_args[1])?),
|
|
2183
2188
|
_ => Err(EvaluatorError::TypeError(
|
|
2184
2189
|
"contains() requires a string as the first argument".to_string(),
|
|
@@ -3900,15 +3905,20 @@ impl Evaluator {
|
|
|
3900
3905
|
self.keep_tuple_stream = saved_keep;
|
|
3901
3906
|
let input_value = input_value?;
|
|
3902
3907
|
|
|
3903
|
-
//
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
//
|
|
3908
|
+
// Handle array input - process each item.
|
|
3909
|
+
//
|
|
3910
|
+
// jsonata-js #817 ("correctly handle empty joins"): an object
|
|
3911
|
+
// constructor (group-by) applied to an empty or undefined
|
|
3912
|
+
// sequence must yield an empty object `{}`, not undefined.
|
|
3913
|
+
// jsonata-js wraps the input via `createSequence`, so an
|
|
3914
|
+
// undefined input becomes an *empty* sequence that flows through
|
|
3915
|
+
// grouping and produces `{}`. We mirror that by mapping undefined
|
|
3916
|
+
// to an empty item list here (rather than short-circuiting), and
|
|
3917
|
+
// let the empty-input handling below generate the `{}`.
|
|
3909
3918
|
let items: Vec<JValue> = match input_value {
|
|
3910
3919
|
JValue::Array(ref arr) => (**arr).clone(),
|
|
3911
3920
|
JValue::Null => return Ok(JValue::Null),
|
|
3921
|
+
JValue::Undefined => Vec::new(),
|
|
3912
3922
|
other => vec![other],
|
|
3913
3923
|
};
|
|
3914
3924
|
|
|
@@ -7742,7 +7752,9 @@ impl Evaluator {
|
|
|
7742
7752
|
if evaluated_args[0].is_null() {
|
|
7743
7753
|
return Ok(JValue::Null);
|
|
7744
7754
|
}
|
|
7745
|
-
|
|
7755
|
+
// jsonata-js #809: $contains returns undefined when either argument
|
|
7756
|
+
// (the string OR the pattern) is undefined.
|
|
7757
|
+
if evaluated_args[0].is_undefined() || evaluated_args[1].is_undefined() {
|
|
7746
7758
|
return Ok(JValue::Undefined);
|
|
7747
7759
|
}
|
|
7748
7760
|
match &evaluated_args[0] {
|
|
@@ -9392,6 +9404,9 @@ impl Evaluator {
|
|
|
9392
9404
|
Ok(JValue::array(result))
|
|
9393
9405
|
}
|
|
9394
9406
|
JValue::Null => Ok(JValue::Null),
|
|
9407
|
+
// jsonata-js: $each returns undefined when its first argument
|
|
9408
|
+
// is undefined (e.g. a path that resolves to nothing).
|
|
9409
|
+
JValue::Undefined => Ok(JValue::Undefined),
|
|
9395
9410
|
_ => Err(EvaluatorError::TypeError(
|
|
9396
9411
|
"each() first argument must be an object".to_string(),
|
|
9397
9412
|
)),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|