corvus_json_schema 0.1.4-aarch64-linux-gnu → 0.2.0-aarch64-linux-gnu
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.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/THIRD-PARTY-NOTICES.txt +15 -14
- data/VERSIONHISTORY.md +9 -0
- data/lib/corvus_json_schema/3.3/corvus_json_schema.so +0 -0
- data/lib/corvus_json_schema/3.4/corvus_json_schema.so +0 -0
- data/lib/corvus_json_schema/4.0/corvus_json_schema.so +0 -0
- data/lib/corvus_json_schema/version.rb +1 -1
- data/lib/corvus_json_schema.rb +8 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1261db29344a5a875d88f34058ef33484dcf53d41e25fa4c52c93d54ec2159ae
|
|
4
|
+
data.tar.gz: 7b2476f0f749ad9922263b507e85bfc28bb81c36c4f085bccec885cfa3394072
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6e8908eb1d392fc099c63dc4ad7b8b36af5af84b18f353f7f3694a07e68044ccbd93bfd1167046d5fad6639015e5e04da01e80cf43ae9b9c9c370616c8db10b
|
|
7
|
+
data.tar.gz: e03a0c1bb986dc365db591467f9532175d4cedd650ce1c2db94b39848229707c69b23c796772b2603b0c57d0be0d29287b515a77e5a6d72d03bb24febd8e2d5d
|
data/README.md
CHANGED
|
@@ -54,6 +54,8 @@ Its options:
|
|
|
54
54
|
| `entry_point` | `nil` | A reference to the subschema to validate against, such as `"#/$defs/item"`. |
|
|
55
55
|
| `max_depth` | `128` | The deepest the evaluator recurses in place before it raises `DepthError`. |
|
|
56
56
|
| `pattern_match_limit` | `1.0` | The seconds one match of a `pattern` or `patternProperties` regular expression against one string may take before the validation raises `PatternMatchLimitError`. `nil` or `0` turns the limit off, for a caller who trusts both the schema and the instances. |
|
|
57
|
+
| `regex_edition` | `:dialect` | The edition of ECMA-262 `pattern`, `patternProperties` and the `regex` format are read with: `:dialect` (ECMAScript 2020 for 2019-09 and 2020-12, which name it, today's for the drafts before them), `:current` or `:es2020`. Under ECMAScript 2020 a modifier group such as `(?i:...)` is not valid. |
|
|
58
|
+
| `regex_unicode_version` | `:default` | The version of Unicode patterns are read with: `:default` (the version of the V8 the answers are held to, 17 today), `:latest`, `13`, `17` or `18`. |
|
|
57
59
|
|
|
58
60
|
A `Validator` is immutable and can be shared between threads.
|
|
59
61
|
|
|
@@ -114,7 +116,7 @@ repository's submodule (or `JSON_SCHEMA_TEST_SUITE`).
|
|
|
114
116
|
|
|
115
117
|
Apache-2.0
|
|
116
118
|
|
|
117
|
-
The gem is built on the `corvus-json-schema` Rust crate,
|
|
118
|
-
Database, which is under the Unicode License V3.
|
|
119
|
-
and the one of the `regress` crate
|
|
120
|
-
native gem, beside `LICENSE`.
|
|
119
|
+
The gem is built on the `corvus-json-schema` Rust crate, which matches patterns with the `corvus-regex-ecma262` crate,
|
|
120
|
+
whose Unicode tables are derived from the Unicode Character Database, which is under the Unicode License V3.
|
|
121
|
+
[THIRD-PARTY-NOTICES.txt](THIRD-PARTY-NOTICES.txt) has that notice, and the one of the `regress` crate, from whose
|
|
122
|
+
tables those were written. The file is in the source gem and in every native gem, beside `LICENSE`.
|
data/THIRD-PARTY-NOTICES.txt
CHANGED
|
@@ -13,14 +13,16 @@ License notice for the Unicode Character Database
|
|
|
13
13
|
|
|
14
14
|
The gem is built on the corvus-json-schema Rust crate. The source gem holds
|
|
15
15
|
the crate's sources (ext/corvus_json_schema/vendor/corvus-json-schema), and a
|
|
16
|
-
native gem holds the extension compiled from them.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
native gem holds the extension compiled from them. That crate matches patterns
|
|
17
|
+
with the corvus-regex-ecma262 crate, which is compiled in with it.
|
|
18
|
+
corvus-regex-ecma262 holds tables derived from the data files of the Unicode
|
|
19
|
+
Character Database, versions 13.0.0, 17.0.0 and 18.0.0
|
|
20
|
+
(https://www.unicode.org/Public/), and from its emoji sequence files: the
|
|
21
|
+
General_Category values, the binary properties, the Script and
|
|
22
|
+
Script_Extensions values, the simple case folding, the simple uppercase
|
|
23
|
+
mapping and the properties of strings. The data files are licensed under the
|
|
24
|
+
Unicode License V3 (SPDX-License-Identifier: Unicode-3.0), as
|
|
25
|
+
https://www.unicode.org/license.txt gives it:
|
|
24
26
|
|
|
25
27
|
UNICODE LICENSE V3
|
|
26
28
|
|
|
@@ -65,12 +67,11 @@ authorization of the copyright holder.
|
|
|
65
67
|
License notice for https://github.com/ridiculousfish/regress
|
|
66
68
|
-------------------------------
|
|
67
69
|
|
|
68
|
-
The tables of
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
corvus-json-schema crate depends on it.
|
|
70
|
+
The tables of the corvus-regex-ecma262 crate were written, through the tables
|
|
71
|
+
of the Corvus Go module, from the property tables of regress (its gen-unicode
|
|
72
|
+
tool), which are generated from the Unicode Character Database. regress is
|
|
73
|
+
licensed under the MIT license or the Apache License, Version 2.0, at the
|
|
74
|
+
user's option. Neither the gem nor the crates it is built on depend on it.
|
|
74
75
|
|
|
75
76
|
MIT License
|
|
76
77
|
|
data/VERSIONHISTORY.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
The version history of the `corvus_json_schema` Ruby gem. It is versioned independently of the Corvus NuGet packages and of the [corvus-json-schema](../../src-rs/corvus-json-schema/VERSIONHISTORY.md) Rust crate it is built on.
|
|
4
4
|
|
|
5
|
+
## V0.2.0
|
|
6
|
+
|
|
7
|
+
V0.2.0 takes version 0.2.0 of the `corvus-json-schema` crate, which matches patterns with the [`corvus-regex-ecma262`](https://crates.io/crates/corvus-regex-ecma262) crate and reads them in the grammar of the dialect. It is a minor version because under 2019-09 and 2020-12 a pattern that uses what ECMAScript added after 2020 is no longer valid. Everything else that was there is unchanged, and there are two new options.
|
|
8
|
+
|
|
9
|
+
- **The grammar of the dialect.** JSON Schema 2019-09 and 2020-12 name the grammar of ECMAScript 2020, and patterns under them are now read with it: a modifier group such as `(?i:...)`, or a group name used by two groups, is not valid, and `CorvusJsonSchema.compile` raises `CompilationError` for a schema with one in a `pattern`. A property escape that the tables of 2020 do not have (`\p{Script=Yezidi}`) is not valid with the `u` flag, so the pattern is read without it, where `\p` is the letter `p`, as a pattern with `\&` is. The `regex` format reads only the grammar of the flag. Drafts 4 to 7 read today's grammar, as before.
|
|
10
|
+
- **`regex_edition:`** (`:dialect`, the default, `:current` or `:es2020`) chooses the edition for every dialect, and **`regex_unicode_version:`** (`:default`, the default, `:latest`, `13`, `17` or `18`) the version of Unicode. Another value raises `ArgumentError`.
|
|
11
|
+
- **The engine.** Every pattern that no dedicated matcher of the crate takes is matched by `corvus-regex-ecma262`, whose answers are V8's for the whole of the ECMA-262 regular expression test data. The limits are those of 0.1.4. Over the jsonschema-benchmark corpora the crate validates in 0.98 of the time of 0.1.7 once warm, and takes 1.06 of it for the first validation and 1.05 to compile, since the engine builds a pattern's automaton on its first match.
|
|
12
|
+
- **Notices.** `THIRD-PARTY-NOTICES.txt` names the tables of `corvus-regex-ecma262`, which the native gems now hold in place of the crate's own. The source gem no longer carries a copy of the crate's notice, which the crate no longer has.
|
|
13
|
+
|
|
5
14
|
## V0.1.4
|
|
6
15
|
|
|
7
16
|
V0.1.4 takes version 0.1.7 of the `corvus-json-schema` crate. That fixes wrong results for several forms of pattern and a validation that did not end, replaces the crate's regular expression engine, and gives every match of a pattern a limit of time. The functions and types that were there are unchanged, and there are additions for the limit. Versions 0.1.0 to 0.1.3 are affected.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/corvus_json_schema.rb
CHANGED
|
@@ -39,16 +39,21 @@ module CorvusJsonSchema
|
|
|
39
39
|
# "#/$defs/item"), max_depth (of in-place recursion, default 128) and pattern_match_limit (the seconds one match of
|
|
40
40
|
# a pattern or patternProperties regular expression may take, default 1. A match that takes longer is abandoned and
|
|
41
41
|
# the validation raises PatternMatchLimitError. nil or 0 turns the limit off, for a caller who trusts both the
|
|
42
|
-
# schema and the instances)
|
|
42
|
+
# schema and the instances), regex_edition (the edition of ECMA-262 patterns are read with: :dialect, the default,
|
|
43
|
+
# which is ECMAScript 2020 for 2019-09 and 2020-12 and today's for the drafts before them, :current or :es2020) and
|
|
44
|
+
# regex_unicode_version (the version of Unicode they are read with: :default, Unicode 17 today, :latest, 13, 17 or
|
|
45
|
+
# 18).
|
|
43
46
|
#
|
|
44
47
|
# A schema that does not compile raises CompilationError, and one with a regular expression over a limit of size
|
|
45
48
|
# (1,048,576 bytes of pattern, 1,000 levels of groups) raises PatternTooLargeError, which is a CompilationError.
|
|
46
49
|
def self.compile(schema, default_dialect: :draft202012, assert_format: nil, assert_format_in_legacy_drafts: false,
|
|
47
50
|
assert_content: true, formats: nil, resolver: nil, base_uri: nil, entry_point: nil, max_depth: 128,
|
|
48
|
-
pattern_match_limit: DEFAULT_PATTERN_MATCH_LIMIT
|
|
51
|
+
pattern_match_limit: DEFAULT_PATTERN_MATCH_LIMIT, regex_edition: :dialect,
|
|
52
|
+
regex_unicode_version: :default)
|
|
49
53
|
dialect = DIALECTS.fetch(default_dialect) { raise ArgumentError, "unknown dialect #{default_dialect.inspect}" }
|
|
50
54
|
Native.compile(schema, dialect, assert_format, assert_format_in_legacy_drafts, assert_content, formats, resolver,
|
|
51
|
-
base_uri, entry_point, Integer(max_depth), pattern_match_limit&.to_f
|
|
55
|
+
base_uri, entry_point, Integer(max_depth), pattern_match_limit&.to_f, regex_edition.to_s,
|
|
56
|
+
regex_unicode_version.to_s)
|
|
52
57
|
end
|
|
53
58
|
|
|
54
59
|
# The version of the corvus-json-schema crate the extension was built from.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: corvus_json_schema
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: aarch64-linux-gnu
|
|
6
6
|
authors:
|
|
7
7
|
- endjin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: 'JSON Schema validation for Ruby with the corvus-json-schema Rust crate:
|
|
14
14
|
drafts 4, 6, 7, 2019-09 and 2020-12, results and annotations, Ruby values read in
|