jsonatapy 2.2.10__tar.gz → 2.2.11__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.
Files changed (71) hide show
  1. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/CHANGELOG.md +32 -0
  2. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/Cargo.lock +8 -8
  3. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/Cargo.toml +1 -1
  4. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/PKG-INFO +4 -4
  5. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/README.md +3 -3
  6. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/pyproject.toml +1 -1
  7. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/evaluator.rs +1 -1
  8. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/integration_test.rs +34 -0
  9. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.gitignore +0 -0
  10. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.gitmodules +0 -0
  11. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.serena/.gitignore +0 -0
  12. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.serena/memories/architecture.md +0 -0
  13. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.serena/memories/conventions.md +0 -0
  14. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.serena/memories/core.md +0 -0
  15. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.serena/memories/memory_maintenance.md +0 -0
  16. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.serena/memories/suggested_commands.md +0 -0
  17. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.serena/memories/task_completion.md +0 -0
  18. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.serena/memories/tech_stack.md +0 -0
  19. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/.serena/project.yml +0 -0
  20. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/CONTRIBUTORS.md +0 -0
  21. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/LICENSE +0 -0
  22. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/SECURITY.md +0 -0
  23. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/benches/evaluator_bench.rs +0 -0
  24. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/bindings/c/README.md +0 -0
  25. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/bindings/c/examples/smoke.c +0 -0
  26. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/bindings/c/jsonata.h +0 -0
  27. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/examples/evaluator_demo.rs +0 -0
  28. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/examples/host_functions.rs +0 -0
  29. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/examples/parser_demo.rs +0 -0
  30. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/examples/simd_json_bench.rs +0 -0
  31. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/python/jsonatapy/__init__.py +0 -0
  32. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/python/jsonatapy/__main__.py +0 -0
  33. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/python/jsonatapy/_cli/__init__.py +0 -0
  34. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/python/jsonatapy/_cli/bindings.py +0 -0
  35. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/python/jsonatapy/_cli/error_format.py +0 -0
  36. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/python/jsonatapy/_cli/mcp_server.py +0 -0
  37. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/python/jsonatapy/_cli/resolve.py +0 -0
  38. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/python/jsonatapy/_cli/run.py +0 -0
  39. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/python/jsonatapy/py.typed +0 -0
  40. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/ast.rs +0 -0
  41. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/ast_transform.rs +0 -0
  42. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/bin/jsonata/bindings.rs +0 -0
  43. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/bin/jsonata/error_format.rs +0 -0
  44. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/bin/jsonata/main.rs +0 -0
  45. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/bin/jsonata/resolve.rs +0 -0
  46. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/builtins.rs +0 -0
  47. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/capi.rs +0 -0
  48. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/compiler.rs +0 -0
  49. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/datetime.rs +0 -0
  50. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/expression.rs +0 -0
  51. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/functions.rs +0 -0
  52. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/lazy.rs +0 -0
  53. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/lib.rs +0 -0
  54. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/parser.rs +0 -0
  55. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/signature.rs +0 -0
  56. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/value.rs +0 -0
  57. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/src/vm.rs +0 -0
  58. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/study/cli_fixtures.json +0 -0
  59. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/study/cli_fixtures_testdata.json +0 -0
  60. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/study/cli_spec.md +0 -0
  61. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/cli_fixtures_test.rs +0 -0
  62. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/cli_test.rs +0 -0
  63. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/datetime_picture_suite.rs +0 -0
  64. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/fixtures/builtin_arity.json +0 -0
  65. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/fixtures/builtin_differential.json +0 -0
  66. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/fixtures/builtin_signatures.json +0 -0
  67. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/fixtures/fastpath_differential.json +0 -0
  68. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/fixtures/fastpath_known_divergences.json +0 -0
  69. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/host_functions_test.rs +0 -0
  70. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/lambda_closure_suite.rs +0 -0
  71. {jsonatapy-2.2.10 → jsonatapy-2.2.11}/tests/parent_and_focus_binding_suite.rs +0 -0
@@ -19,6 +19,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
 
20
20
  ### Security
21
21
 
22
+ ## [2.2.11] - 2026-10-02
23
+
24
+ ### Added
25
+
26
+ ### Changed
27
+ - GitHub Release notes are now the version's `CHANGELOG.md` section (via the new
28
+ `scripts/release-notes.sh`) instead of a list of every commit subject since the previous tag,
29
+ which included merge commits, superseded intermediate steps and unrelated housekeeping. The
30
+ notes also link to the full commit comparison and include the Cargo install line.
31
+ - Updated Rust dependencies: `thiserror` 2.0.20 → 2.0.21 and `rand` 0.10.2 → 0.10.3. (#175)
32
+
33
+ ### Deprecated
34
+
35
+ ### Removed
36
+
37
+ ### Fixed
38
+ - The release workflow now updates the `jsonata-core = "…"` install snippet in `README.md` when
39
+ it bumps the version. It previously went stale on every release and needed a manual follow-up
40
+ commit. The snippet is updated to 2.2.10 here.
41
+ - `$match` now returns undefined (an empty sequence, as in jsonata-js) instead of `null` when a
42
+ regex matches nothing. Since 2.2.8 made `$exists(null)` true, `$exists($match(...))` was true and
43
+ `$count($match(...))` was 1 for a failed match; they are now false and 0, and `[$match(...)]`
44
+ is `[]`. (#176, #177) Thanks to @MonkeyChap for the problem identification and fix.
45
+
46
+ ### Security
47
+ - Updated the locked Python dev dependencies `pyjwt` 2.13.0 → 2.15.1 and `urllib3` 2.7.0 → 2.8.0,
48
+ clearing 15 advisories that `pip-audit` reported against `uv.lock` and that were failing the
49
+ Security Scanning workflow. Both are transitive dependencies of optional extras (`fastmcp` and
50
+ the docs tooling), not of the published crate or of the wheel, which has no runtime
51
+ dependencies. This only changes the repository's lockfile; users of the `mcp` extra resolve
52
+ their own versions and should upgrade `pyjwt` to 2.15.1 or later. (#178)
53
+
22
54
  ## [2.2.10] - 2026-09-24
23
55
 
24
56
  ### Added
@@ -586,7 +586,7 @@ dependencies = [
586
586
 
587
587
  [[package]]
588
588
  name = "jsonata-core"
589
- version = "2.2.10"
589
+ version = "2.2.11"
590
590
  dependencies = [
591
591
  "assert_cmd",
592
592
  "base64",
@@ -600,7 +600,7 @@ dependencies = [
600
600
  "predicates",
601
601
  "proptest",
602
602
  "pyo3",
603
- "rand 0.10.2",
603
+ "rand 0.10.3",
604
604
  "regex",
605
605
  "serde",
606
606
  "serde_json",
@@ -922,9 +922,9 @@ dependencies = [
922
922
 
923
923
  [[package]]
924
924
  name = "rand"
925
- version = "0.10.2"
925
+ version = "0.10.3"
926
926
  source = "registry+https://github.com/rust-lang/crates.io-index"
927
- checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
927
+ checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af"
928
928
  dependencies = [
929
929
  "chacha20",
930
930
  "getrandom 0.4.3",
@@ -1224,18 +1224,18 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683"
1224
1224
 
1225
1225
  [[package]]
1226
1226
  name = "thiserror"
1227
- version = "2.0.20"
1227
+ version = "2.0.21"
1228
1228
  source = "registry+https://github.com/rust-lang/crates.io-index"
1229
- checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
1229
+ checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
1230
1230
  dependencies = [
1231
1231
  "thiserror-impl",
1232
1232
  ]
1233
1233
 
1234
1234
  [[package]]
1235
1235
  name = "thiserror-impl"
1236
- version = "2.0.20"
1236
+ version = "2.0.21"
1237
1237
  source = "registry+https://github.com/rust-lang/crates.io-index"
1238
- checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
1238
+ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
1239
1239
  dependencies = [
1240
1240
  "proc-macro2",
1241
1241
  "quote",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "jsonata-core"
3
- version = "2.2.10"
3
+ version = "2.2.11"
4
4
  edition = "2021"
5
5
  authors = ["txjmb <txjmb@users.noreply.github.com>"]
6
6
  description = "High-performance Rust implementation of JSONata query and transformation language"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jsonatapy
3
- Version: 2.2.10
3
+ Version: 2.2.11
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -81,7 +81,7 @@ Project-URL: Repository, https://github.com/txjmb/jsonata-core
81
81
  </a>
82
82
 
83
83
  *Click the chart for the full category-by-category tables, including jsonata-python
84
- and jsonata-rs, which are left off the chart because at 68 ms–9 s they would
84
+ and jsonata-rs, which are left off the chart because at 67 ms–9 s they would
85
85
  flatten everything else into a sliver.*
86
86
  <!-- END generated performance chart -->
87
87
 
@@ -156,10 +156,10 @@ let result = Evaluator::new().evaluate(&ast, &data)?;
156
156
  ```toml
157
157
  # Cargo.toml
158
158
  [dependencies]
159
- jsonata-core = "2.2.9" # pure Rust, no Python dependency
159
+ jsonata-core = "2.2.11" # pure Rust, no Python dependency
160
160
 
161
161
  # Optional: disable SIMD for constrained targets
162
- jsonata-core = { version = "2.2.9", default-features = false }
162
+ jsonata-core = { version = "2.2.11", default-features = false }
163
163
  ```
164
164
 
165
165
  ---
@@ -32,7 +32,7 @@
32
32
  </a>
33
33
 
34
34
  *Click the chart for the full category-by-category tables, including jsonata-python
35
- and jsonata-rs, which are left off the chart because at 68 ms–9 s they would
35
+ and jsonata-rs, which are left off the chart because at 67 ms–9 s they would
36
36
  flatten everything else into a sliver.*
37
37
  <!-- END generated performance chart -->
38
38
 
@@ -107,10 +107,10 @@ let result = Evaluator::new().evaluate(&ast, &data)?;
107
107
  ```toml
108
108
  # Cargo.toml
109
109
  [dependencies]
110
- jsonata-core = "2.2.9" # pure Rust, no Python dependency
110
+ jsonata-core = "2.2.11" # pure Rust, no Python dependency
111
111
 
112
112
  # Optional: disable SIMD for constrained targets
113
- jsonata-core = { version = "2.2.9", default-features = false }
113
+ jsonata-core = { version = "2.2.11", default-features = false }
114
114
  ```
115
115
 
116
116
  ---
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "jsonatapy"
7
- version = "2.2.10"
7
+ version = "2.2.11"
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"}
@@ -7461,7 +7461,7 @@ impl Evaluator {
7461
7461
  }
7462
7462
 
7463
7463
  if results.is_empty() {
7464
- Ok(JValue::Null)
7464
+ Ok(JValue::Undefined)
7465
7465
  } else if results.len() == 1 && !is_global {
7466
7466
  // Single match (non-global) returns the match object directly
7467
7467
  Ok(results.into_iter().next().unwrap())
@@ -2937,3 +2937,37 @@ fn test_builtin_null_handling_matches_reference() {
2937
2937
  .is_err());
2938
2938
  assert_eq!(ev("$sort([3, 1, 2])"), JValue::from(json!([1, 2, 3])));
2939
2939
  }
2940
+
2941
+ /// `$match` with no match yields undefined (an empty sequence in reference
2942
+ /// JSONata), not `null`, so `$exists`, `$count` and array construction see
2943
+ /// "nothing" rather than a single null item.
2944
+ #[test]
2945
+ fn test_match_no_match_is_undefined() {
2946
+ for expr in [
2947
+ r#"$match("xyz", /abc/)"#,
2948
+ r#"$match("xyz", /abc/g)"#,
2949
+ r#"$match("xyz", /abc/, 2)"#,
2950
+ r#"$match("xyz", function($s, $offset) { null })"#,
2951
+ ] {
2952
+ let ast = parse(expr).unwrap();
2953
+ let mut evaluator = Evaluator::new();
2954
+ let result = evaluator.evaluate(&ast, &JValue::Null).unwrap();
2955
+ assert!(result.is_undefined(), "{expr} => {result:?}");
2956
+ }
2957
+ }
2958
+
2959
+ #[test]
2960
+ fn test_match_no_match_exists_count_and_array() {
2961
+ for (expr, expected) in [
2962
+ (r#"$exists($match("xyz", /abc/))"#, json!(false)),
2963
+ (r#"$count($match("xyz", /abc/))"#, json!(0)),
2964
+ (r#"[$match("xyz", /abc/)]"#, json!([])),
2965
+ // positive control
2966
+ (r#"$exists($match("abc", /abc/))"#, json!(true)),
2967
+ ] {
2968
+ let ast = parse(expr).unwrap();
2969
+ let mut evaluator = Evaluator::new();
2970
+ let result = evaluator.evaluate(&ast, &JValue::Null).unwrap();
2971
+ assert_eq!(result, JValue::from(expected), "{expr}");
2972
+ }
2973
+ }
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