adapt-authoring-jsonschema 1.4.2 → 1.4.4

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/bin/check.js CHANGED
@@ -33,6 +33,7 @@ async function check () {
33
33
 
34
34
  async function checkSchema (schema, usedKeys) {
35
35
  const props = schema.properties ?? schema?.$patch?.with?.properties ?? schema?.$merge?.with?.properties
36
+ if (!props) return
36
37
  Object.keys(props).forEach(p => {
37
38
  if (p === '_globals') return
38
39
  if (!usedKeys[p]) usedKeys[p] = []
@@ -1,6 +1,6 @@
1
1
  export default class SchemasReference {
2
- constructor (app, config, dir, utils) {
3
- this.app = app
2
+ constructor (appData, config, dir, utils) {
3
+ this.appData = appData
4
4
  this.utils = utils
5
5
  }
6
6
 
@@ -12,10 +12,10 @@ export default class SchemasReference {
12
12
  }
13
13
 
14
14
  async loadSchemas () {
15
- const schema = await this.app.waitForModule('jsonschema')
16
- return Object.keys(schema.schemas)
15
+ const { schemas, raw } = this.appData.schemas
16
+ return Object.keys(schemas)
17
17
  .sort((a, b) => a.localeCompare(b))
18
- .reduce((schemas, s) => Object.assign(schemas, { [s]: schema.schemas[s].raw }), {})
18
+ .reduce((m, s) => Object.assign(m, { [s]: raw[s] }), {})
19
19
  }
20
20
 
21
21
  generateList () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-jsonschema",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Module to add support for the JSON schema specification",
5
5
  "homepage": "https://github.com/adapt-security/adapt-authoring-jsonschema",
6
6
  "license": "GPL-3.0",
@@ -9,26 +9,18 @@
9
9
  "bin": {
10
10
  "at-schemacheck": "./bin/check.js"
11
11
  },
12
+ "scripts": {
13
+ "test": "node --test 'tests/**/*.spec.js'"
14
+ },
12
15
  "repository": "github:adapt-security/adapt-authoring-jsonschema",
13
16
  "dependencies": {
14
- "adapt-schemas": "github:cgkineo/adapt-schemas#issue/12"
17
+ "adapt-authoring-core": "^2.0.0",
18
+ "adapt-schemas": "^1.2.0"
15
19
  },
16
20
  "peerDependencies": {
17
21
  "adapt-authoring-config": "^1.1.4",
18
- "adapt-authoring-core": "^2.0.0",
19
22
  "adapt-authoring-errors": "^1.1.2"
20
23
  },
21
- "peerDependenciesMeta": {
22
- "adapt-authoring-config": {
23
- "optional": true
24
- },
25
- "adapt-authoring-core": {
26
- "optional": true
27
- },
28
- "adapt-authoring-errors": {
29
- "optional": true
30
- }
31
- },
32
24
  "devDependencies": {
33
25
  "@semantic-release/git": "^10.0.1",
34
26
  "conventional-changelog-eslint": "^6.0.0",
@@ -51,18 +43,7 @@
51
43
  ],
52
44
  "@semantic-release/npm",
53
45
  "@semantic-release/github",
54
- [
55
- "@semantic-release/git",
56
- {
57
- "assets": [
58
- "package.json"
59
- ],
60
- "message": "Chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
61
- }
62
- ]
46
+ "@semantic-release/git"
63
47
  ]
64
- },
65
- "scripts": {
66
- "test": "node --test 'tests/**/*.spec.js'"
67
48
  }
68
49
  }