@hyperjump/json-schema 1.4.0 → 1.4.1

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.
package/README.md CHANGED
@@ -711,6 +711,7 @@ const types = AnnotatedInstance.annotation(instance, "type", dialectId); // => [
711
711
  AnnotatedInstance.entries(instance)
712
712
  .map(([propertyName, propertyInstance]) => {
713
713
  return { propertyName, titles: Instance.annotation(propertyInstance, "title", dialectId) }; // => (Example) { propertyName: "givenName", titles: ["Given Name", "Name"] });
714
+ });
714
715
 
715
716
  // List all locations in the instance that are deprecated
716
717
  for (const deprecated of AnnotatedInstance.annotatedWith(instance, "deprecated", dialectId)) {
@@ -15,7 +15,7 @@ export const cons = (instance, id = undefined) => ({
15
15
 
16
16
  export const annotation = (instance, keyword, dialectId = defaultDialectId) => {
17
17
  const keywordId = getKeywordId(dialectId, keyword);
18
- return instance.annotations?.[instance.pointer]?.[keywordId] || [];
18
+ return instance.annotations[instance.pointer]?.[keywordId] || [];
19
19
  };
20
20
 
21
21
  export const annotate = (instance, keyword, value) => {
@@ -6,7 +6,6 @@
6
6
  },
7
7
  "subjects": [
8
8
  {
9
- "title": "String",
10
9
  "instance": "{ \"foo\": \"bar\" }",
11
10
  "assertions": [
12
11
  {
@@ -25,7 +24,6 @@
25
24
  },
26
25
  "subjects": [
27
26
  {
28
- "title": "Any instance",
29
27
  "instance": "SGVsbG8gZnJvbSBKU09OIFNjaGVtYQ==",
30
28
  "assertions": [
31
29
  {
@@ -45,7 +43,6 @@
45
43
  },
46
44
  "subjects": [
47
45
  {
48
- "title": "String",
49
46
  "instance": "42",
50
47
  "assertions": [
51
48
  {
@@ -6,7 +6,6 @@
6
6
  },
7
7
  "subjects": [
8
8
  {
9
- "title": "String",
10
9
  "instance": "foo@bar.com",
11
10
  "assertions": [
12
11
  {
@@ -6,7 +6,6 @@
6
6
  },
7
7
  "subjects": [
8
8
  {
9
- "title": "Any instance",
10
9
  "instance": 42,
11
10
  "assertions": [
12
11
  {
@@ -25,7 +24,6 @@
25
24
  },
26
25
  "subjects": [
27
26
  {
28
- "title": "Any instance",
29
27
  "instance": 42,
30
28
  "assertions": [
31
29
  {
@@ -44,7 +42,6 @@
44
42
  },
45
43
  "subjects": [
46
44
  {
47
- "title": "Any instance",
48
45
  "instance": 42,
49
46
  "assertions": [
50
47
  {
@@ -63,7 +60,6 @@
63
60
  },
64
61
  "subjects": [
65
62
  {
66
- "title": "Any instance",
67
63
  "instance": 42,
68
64
  "assertions": [
69
65
  {
@@ -82,7 +78,6 @@
82
78
  },
83
79
  "subjects": [
84
80
  {
85
- "title": "Any instance",
86
81
  "instance": 42,
87
82
  "assertions": [
88
83
  {
@@ -101,7 +96,6 @@
101
96
  },
102
97
  "subjects": [
103
98
  {
104
- "title": "Any instance",
105
99
  "instance": 42,
106
100
  "assertions": [
107
101
  {
@@ -120,7 +114,6 @@
120
114
  },
121
115
  "subjects": [
122
116
  {
123
- "title": "Any instance",
124
117
  "instance": "Foo",
125
118
  "assertions": [
126
119
  {
@@ -7,7 +7,6 @@
7
7
  },
8
8
  "subjects": [
9
9
  {
10
- "title": "Any instance",
11
10
  "instance": 42,
12
11
  "assertions": [
13
12
  {
@@ -27,7 +26,6 @@
27
26
  },
28
27
  "subjects": [
29
28
  {
30
- "title": "Any instance",
31
29
  "instance": 42,
32
30
  "assertions": [
33
31
  {
@@ -47,7 +45,6 @@
47
45
  },
48
46
  "subjects": [
49
47
  {
50
- "title": "Any instance",
51
48
  "instance": 42,
52
49
  "assertions": [
53
50
  {
@@ -76,7 +73,6 @@
76
73
  },
77
74
  "subjects": [
78
75
  {
79
- "title": "Any instance",
80
76
  "instance": 42,
81
77
  "assertions": [
82
78
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperjump/json-schema",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "A JSON Schema validator with support for custom keywords, vocabularies, and dialects",
5
5
  "type": "module",
6
6
  "main": "./stable/index.js",
@@ -68,6 +68,7 @@
68
68
  "@hyperjump/uri": "^1.0.0",
69
69
  "content-type": "^1.0.4",
70
70
  "fastest-stable-stringify": "^2.0.2",
71
+ "just-curry-it": "^5.3.0",
71
72
  "undici": "^5.19.1",
72
73
  "uuid": "^9.0.0"
73
74
  },