@hyperjump/json-schema 0.18.4 → 0.20.0
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 +1 -1
- package/dist/json-schema-amd.js +4191 -3081
- package/dist/json-schema-amd.js.map +1 -1
- package/dist/json-schema-amd.min.js +2 -1
- package/dist/json-schema-amd.min.js.map +1 -1
- package/dist/json-schema-cjs.js +2403 -1293
- package/dist/json-schema-cjs.js.map +1 -1
- package/dist/json-schema-cjs.min.js +2 -1
- package/dist/json-schema-cjs.min.js.map +1 -1
- package/dist/json-schema-esm.js +2404 -1281
- package/dist/json-schema-esm.js.map +1 -1
- package/dist/json-schema-esm.min.js +2 -1
- package/dist/json-schema-esm.min.js.map +1 -1
- package/dist/json-schema-iife.js +4195 -3085
- package/dist/json-schema-iife.js.map +1 -1
- package/dist/json-schema-iife.min.js +2 -1
- package/dist/json-schema-iife.min.js.map +1 -1
- package/dist/json-schema-system.js +4194 -3071
- package/dist/json-schema-system.js.map +1 -1
- package/dist/json-schema-system.min.js +2 -1
- package/dist/json-schema-system.min.js.map +1 -1
- package/dist/json-schema-umd.js +4194 -3084
- package/dist/json-schema-umd.js.map +1 -1
- package/dist/json-schema-umd.min.js +2 -1
- package/dist/json-schema-umd.min.js.map +1 -1
- package/lib/draft-04.js +6 -6
- package/lib/draft-06.js +6 -6
- package/lib/draft-07.js +6 -6
- package/lib/draft-2019-09.js +7 -7
- package/lib/draft-2020-12.js +7 -7
- package/package.json +20 -19
package/lib/draft-04.js
CHANGED
|
@@ -4,15 +4,15 @@ const metaSchema = require("../meta/draft-04/schema");
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
// JSON Schema Draft-04
|
|
7
|
-
const
|
|
7
|
+
const jsonSchemaVersion = "http://json-schema.org/draft-04/schema";
|
|
8
8
|
|
|
9
|
-
Schema.setConfig(
|
|
10
|
-
Schema.setConfig(
|
|
11
|
-
Schema.setConfig(
|
|
12
|
-
Schema.setConfig(
|
|
9
|
+
Schema.setConfig(jsonSchemaVersion, "baseToken", "id");
|
|
10
|
+
Schema.setConfig(jsonSchemaVersion, "embeddedToken", "id");
|
|
11
|
+
Schema.setConfig(jsonSchemaVersion, "anchorToken", "id");
|
|
12
|
+
Schema.setConfig(jsonSchemaVersion, "jrefToken", "$ref");
|
|
13
13
|
|
|
14
14
|
Schema.add(JSON.parse(metaSchema));
|
|
15
|
-
Core.defineVocabulary(
|
|
15
|
+
Core.defineVocabulary(jsonSchemaVersion, {
|
|
16
16
|
"validate": keywords.validate,
|
|
17
17
|
"additionalItems": keywords.additionalItems,
|
|
18
18
|
"additionalProperties": keywords.additionalProperties,
|
package/lib/draft-06.js
CHANGED
|
@@ -3,15 +3,15 @@ const keywords = require("./keywords");
|
|
|
3
3
|
const metaSchema = require("../meta/draft-06/schema");
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const jsonSchemaVersion = "http://json-schema.org/draft-06/schema";
|
|
7
7
|
|
|
8
|
-
Schema.setConfig(
|
|
9
|
-
Schema.setConfig(
|
|
10
|
-
Schema.setConfig(
|
|
11
|
-
Schema.setConfig(
|
|
8
|
+
Schema.setConfig(jsonSchemaVersion, "baseToken", "$id");
|
|
9
|
+
Schema.setConfig(jsonSchemaVersion, "embeddedToken", "$id");
|
|
10
|
+
Schema.setConfig(jsonSchemaVersion, "anchorToken", "$id");
|
|
11
|
+
Schema.setConfig(jsonSchemaVersion, "jrefToken", "$ref");
|
|
12
12
|
|
|
13
13
|
Schema.add(JSON.parse(metaSchema));
|
|
14
|
-
Core.defineVocabulary(
|
|
14
|
+
Core.defineVocabulary(jsonSchemaVersion, {
|
|
15
15
|
"validate": keywords.validate,
|
|
16
16
|
"additionalItems": keywords.additionalItems6,
|
|
17
17
|
"additionalProperties": keywords.additionalProperties6,
|
package/lib/draft-07.js
CHANGED
|
@@ -3,15 +3,15 @@ const keywords = require("./keywords");
|
|
|
3
3
|
const metaSchema = require("../meta/draft-07/schema");
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const jsonSchemaVersion = "http://json-schema.org/draft-07/schema";
|
|
7
7
|
|
|
8
|
-
Schema.setConfig(
|
|
9
|
-
Schema.setConfig(
|
|
10
|
-
Schema.setConfig(
|
|
11
|
-
Schema.setConfig(
|
|
8
|
+
Schema.setConfig(jsonSchemaVersion, "baseToken", "$id");
|
|
9
|
+
Schema.setConfig(jsonSchemaVersion, "embeddedToken", "$id");
|
|
10
|
+
Schema.setConfig(jsonSchemaVersion, "anchorToken", "$id");
|
|
11
|
+
Schema.setConfig(jsonSchemaVersion, "jrefToken", "$ref");
|
|
12
12
|
|
|
13
13
|
Schema.add(JSON.parse(metaSchema));
|
|
14
|
-
Core.defineVocabulary(
|
|
14
|
+
Core.defineVocabulary(jsonSchemaVersion, {
|
|
15
15
|
"validate": keywords.validate,
|
|
16
16
|
"additionalItems": keywords.additionalItems6,
|
|
17
17
|
"additionalProperties": keywords.additionalProperties6,
|
package/lib/draft-2019-09.js
CHANGED
|
@@ -9,14 +9,14 @@ const formatMetaSchema = require("../meta/draft/2019-09/meta/format");
|
|
|
9
9
|
const contentMetaSchema = require("../meta/draft/2019-09/meta/content");
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const jsonSchemaVersion = "https://json-schema.org/draft/2019-09/vocab/core";
|
|
13
13
|
|
|
14
|
-
Schema.setConfig(
|
|
15
|
-
Schema.setConfig(
|
|
16
|
-
Schema.setConfig(
|
|
17
|
-
Schema.setConfig(
|
|
18
|
-
Schema.setConfig(
|
|
19
|
-
Schema.setConfig(
|
|
14
|
+
Schema.setConfig(jsonSchemaVersion, "baseToken", "$id");
|
|
15
|
+
Schema.setConfig(jsonSchemaVersion, "embeddedToken", "$id");
|
|
16
|
+
Schema.setConfig(jsonSchemaVersion, "anchorToken", "$anchor");
|
|
17
|
+
Schema.setConfig(jsonSchemaVersion, "recursiveAnchorToken", "$recursiveAnchor");
|
|
18
|
+
Schema.setConfig(jsonSchemaVersion, "vocabularyToken", "$vocabulary");
|
|
19
|
+
Schema.setConfig(jsonSchemaVersion, "mandatoryVocabularies", ["https://json-schema.org/draft/2019-09/vocab/core"]);
|
|
20
20
|
|
|
21
21
|
Schema.add(JSON.parse(metaSchema));
|
|
22
22
|
|
package/lib/draft-2020-12.js
CHANGED
|
@@ -11,14 +11,14 @@ const contentMetaSchema = require("../meta/draft/2020-12/meta/content");
|
|
|
11
11
|
const unevaluatedMetaSchema = require("../meta/draft/2020-12/meta/unevaluated");
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const jsonSchemaVersion = "https://json-schema.org/draft/2020-12/vocab/core";
|
|
15
15
|
|
|
16
|
-
Schema.setConfig(
|
|
17
|
-
Schema.setConfig(
|
|
18
|
-
Schema.setConfig(
|
|
19
|
-
Schema.setConfig(
|
|
20
|
-
Schema.setConfig(
|
|
21
|
-
Schema.setConfig(
|
|
16
|
+
Schema.setConfig(jsonSchemaVersion, "baseToken", "$id");
|
|
17
|
+
Schema.setConfig(jsonSchemaVersion, "embeddedToken", "$id");
|
|
18
|
+
Schema.setConfig(jsonSchemaVersion, "anchorToken", "$anchor");
|
|
19
|
+
Schema.setConfig(jsonSchemaVersion, "dynamicAnchorToken", "$dynamicAnchor");
|
|
20
|
+
Schema.setConfig(jsonSchemaVersion, "vocabularyToken", "$vocabulary");
|
|
21
|
+
Schema.setConfig(jsonSchemaVersion, "mandatoryVocabularies", ["https://json-schema.org/draft/2020-12/vocab/core"]);
|
|
22
22
|
|
|
23
23
|
Schema.add(JSON.parse(metaSchema));
|
|
24
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperjump/json-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "A JSON Schema Validator",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"test": "mocha --require ts-node/register 'lib/**/*.spec.ts'",
|
|
14
14
|
"build": "rollup --config rollup.config.js",
|
|
15
15
|
"prepublishOnly": "npm run build",
|
|
16
|
-
"postinstall": "
|
|
16
|
+
"postinstall": "npx rimraf dist"
|
|
17
17
|
},
|
|
18
18
|
"repository": "github:hyperjump-io/json-schema-validator",
|
|
19
19
|
"keywords": [
|
|
@@ -33,26 +33,27 @@
|
|
|
33
33
|
"url": "https://github.com/sponsors/jdesrosiers"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@rollup/plugin-commonjs": "
|
|
37
|
-
"@rollup/plugin-node-resolve": "
|
|
38
|
-
"@types/chai": "
|
|
39
|
-
"@types/mocha": "
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "
|
|
41
|
-
"@typescript-eslint/parser": "
|
|
42
|
-
"chai": "
|
|
43
|
-
"eslint": "
|
|
44
|
-
"eslint-import-resolver-node": "
|
|
45
|
-
"eslint-import-resolver-typescript": "
|
|
46
|
-
"eslint-plugin-import": "
|
|
36
|
+
"@rollup/plugin-commonjs": "*",
|
|
37
|
+
"@rollup/plugin-node-resolve": "*",
|
|
38
|
+
"@types/chai": "*",
|
|
39
|
+
"@types/mocha": "*",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "*",
|
|
41
|
+
"@typescript-eslint/parser": "*",
|
|
42
|
+
"chai": "*",
|
|
43
|
+
"eslint": "*",
|
|
44
|
+
"eslint-import-resolver-node": "*",
|
|
45
|
+
"eslint-import-resolver-typescript": "*",
|
|
46
|
+
"eslint-plugin-import": "*",
|
|
47
47
|
"json-schema-test-suite": "github:json-schema-org/JSON-Schema-Test-Suite",
|
|
48
|
-
"mocha": "
|
|
49
|
-
"
|
|
50
|
-
"rollup
|
|
51
|
-
"
|
|
52
|
-
"
|
|
48
|
+
"mocha": "*",
|
|
49
|
+
"rimraf": "*",
|
|
50
|
+
"rollup": "*",
|
|
51
|
+
"rollup-plugin-terser": "*",
|
|
52
|
+
"ts-node": "*",
|
|
53
|
+
"typescript": "*"
|
|
53
54
|
},
|
|
54
55
|
"dependencies": {
|
|
55
|
-
"@hyperjump/json-schema-core": "^0.
|
|
56
|
+
"@hyperjump/json-schema-core": "^0.25.0",
|
|
56
57
|
"fastest-stable-stringify": "^2.0.2"
|
|
57
58
|
}
|
|
58
59
|
}
|