@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/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 schemaVersion = "http://json-schema.org/draft-04/schema";
7
+ const jsonSchemaVersion = "http://json-schema.org/draft-04/schema";
8
8
 
9
- Schema.setConfig(schemaVersion, "baseToken", "id");
10
- Schema.setConfig(schemaVersion, "embeddedToken", "id");
11
- Schema.setConfig(schemaVersion, "anchorToken", "id");
12
- Schema.setConfig(schemaVersion, "jrefToken", "$ref");
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(schemaVersion, {
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 schemaVersion = "http://json-schema.org/draft-06/schema";
6
+ const jsonSchemaVersion = "http://json-schema.org/draft-06/schema";
7
7
 
8
- Schema.setConfig(schemaVersion, "baseToken", "$id");
9
- Schema.setConfig(schemaVersion, "embeddedToken", "$id");
10
- Schema.setConfig(schemaVersion, "anchorToken", "$id");
11
- Schema.setConfig(schemaVersion, "jrefToken", "$ref");
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(schemaVersion, {
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 schemaVersion = "http://json-schema.org/draft-07/schema";
6
+ const jsonSchemaVersion = "http://json-schema.org/draft-07/schema";
7
7
 
8
- Schema.setConfig(schemaVersion, "baseToken", "$id");
9
- Schema.setConfig(schemaVersion, "embeddedToken", "$id");
10
- Schema.setConfig(schemaVersion, "anchorToken", "$id");
11
- Schema.setConfig(schemaVersion, "jrefToken", "$ref");
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(schemaVersion, {
14
+ Core.defineVocabulary(jsonSchemaVersion, {
15
15
  "validate": keywords.validate,
16
16
  "additionalItems": keywords.additionalItems6,
17
17
  "additionalProperties": keywords.additionalProperties6,
@@ -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 schemaVersion = "https://json-schema.org/draft/2019-09/schema";
12
+ const jsonSchemaVersion = "https://json-schema.org/draft/2019-09/vocab/core";
13
13
 
14
- Schema.setConfig(schemaVersion, "baseToken", "$id");
15
- Schema.setConfig(schemaVersion, "embeddedToken", "$id");
16
- Schema.setConfig(schemaVersion, "anchorToken", "$anchor");
17
- Schema.setConfig(schemaVersion, "recursiveAnchorToken", "$recursiveAnchor");
18
- Schema.setConfig(schemaVersion, "vocabularyToken", "$vocabulary");
19
- Schema.setConfig(schemaVersion, "mandatoryVocabularies", ["https://json-schema.org/draft/2019-09/vocab/core"]);
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
 
@@ -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 schemaVersion = "https://json-schema.org/draft/2020-12/schema";
14
+ const jsonSchemaVersion = "https://json-schema.org/draft/2020-12/vocab/core";
15
15
 
16
- Schema.setConfig(schemaVersion, "baseToken", "$id");
17
- Schema.setConfig(schemaVersion, "embeddedToken", "$id");
18
- Schema.setConfig(schemaVersion, "anchorToken", "$anchor");
19
- Schema.setConfig(schemaVersion, "dynamicAnchorToken", "$dynamicAnchor");
20
- Schema.setConfig(schemaVersion, "vocabularyToken", "$vocabulary");
21
- Schema.setConfig(schemaVersion, "mandatoryVocabularies", ["https://json-schema.org/draft/2020-12/vocab/core"]);
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.18.4",
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": "rm -rf dist"
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": "^11.1.0",
37
- "@rollup/plugin-node-resolve": "^7.1.3",
38
- "@types/chai": "^4.2.21",
39
- "@types/mocha": "^9.0.0",
40
- "@typescript-eslint/eslint-plugin": "^4.29.2",
41
- "@typescript-eslint/parser": "^4.29.2",
42
- "chai": "^4.3.4",
43
- "eslint": "^7.32.0",
44
- "eslint-import-resolver-node": "^0.3.6",
45
- "eslint-import-resolver-typescript": "^2.4.0",
46
- "eslint-plugin-import": "^2.24.0",
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": "^9.1.3",
49
- "rollup": "^2.50.5",
50
- "rollup-plugin-terser": "^5.3.1",
51
- "ts-node": "^10.2.0",
52
- "typescript": "^4.3.5"
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.23.4",
56
+ "@hyperjump/json-schema-core": "^0.25.0",
56
57
  "fastest-stable-stringify": "^2.0.2"
57
58
  }
58
59
  }