@adobe/jsonschema2md 7.1.4 → 7.1.6

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/.eslintrc.cjs CHANGED
@@ -11,20 +11,7 @@
11
11
  */
12
12
 
13
13
  module.exports = {
14
- env: {
15
- node: true,
16
- es6: true,
17
- },
18
- // this is the root project for all sub modules. stop searching for any
19
- // eslintrc files in parent directories.
20
14
  root: true,
21
- parserOptions: {
22
- sourceType: 'module',
23
- ecmaVersion: 2020,
24
- },
25
- plugins: [
26
- 'header',
27
- ],
28
15
  extends: '@adobe/helix',
29
16
  rules: {
30
17
  strict: 0,
@@ -47,5 +34,8 @@ module.exports = {
47
34
  argsIgnorePattern: '^_.*$',
48
35
  caughtErrorsIgnorePattern: '^_.*$',
49
36
  }],
37
+
38
+ 'import/no-named-as-default-member': 0,
39
+ 'default-param-last': 0,
50
40
  },
51
41
  };
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## [7.1.6](https://github.com/adobe/jsonschema2md/compare/v7.1.5...v7.1.6) (2024-03-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @adobe/helix-log to v6.0.1 ([b54415a](https://github.com/adobe/jsonschema2md/commit/b54415a0ae4a66a8ec5da9d433403cf46b0cf351))
7
+ * **deps:** update external fixes ([f515169](https://github.com/adobe/jsonschema2md/commit/f5151691a394c139f07ecaf8ec465e71dba49631))
8
+ * **deps:** update external fixes ([e23d8f0](https://github.com/adobe/jsonschema2md/commit/e23d8f01666fedc12442fa2f9bab660c5aa58d8a))
9
+ * **deps:** update external major ([#516](https://github.com/adobe/jsonschema2md/issues/516)) ([d7d72e6](https://github.com/adobe/jsonschema2md/commit/d7d72e61e2b65f0a790b8945d756082bf2fd3bcf))
10
+
11
+ ## [7.1.5](https://github.com/adobe/jsonschema2md/compare/v7.1.4...v7.1.5) (2022-12-12)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * fix typo in 'any of the following' text ([d7039b9](https://github.com/adobe/jsonschema2md/commit/d7039b9a7a636262c3c6ef86b34d0924329f49f5))
17
+
1
18
  ## [7.1.4](https://github.com/adobe/jsonschema2md/compare/v7.1.3...v7.1.4) (2022-11-29)
2
19
 
3
20
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # JSON Schema Markdown Tools
2
2
 
3
- [![CircleCI](https://circleci.com/gh/adobe/jsonschema2md.svg?style=svg)](https://circleci.com/gh/adobe/jsonschema2md)
3
+ [![GitHub Actions](https://img.shields.io/github/actions/workflow/status/adobe/jsonschema2md/main.yaml)](https://github.com/adobe/jsonschema2md/actions/workflows/main.yaml)
4
4
 
5
5
  Documenting and validating complex JSON Schemas can be hard. This tool makes it easier by providing a number of scripts that can turn JSON Schema files into readable Markdown documentation that is ready for consumption on GitHub or processed using Jekyll or other static site generators.
6
6
 
@@ -45,10 +45,11 @@ Supported languages are:
45
45
  If you want to provide a translation of your own, [please use GitLocalize](https://gitlocalize.com/repo/3622)
46
46
 
47
47
  ## Display custom attributes in the property description
48
- `jsonschema2md` displays only the attributes of an property which are defined by the JSON Schema standard. If you want to display additional attributes in the property description you could provide a comma separated list with your custom attributes.
48
+ `jsonschema2md` displays only the attributes of an property which are defined by the JSON Schema standard. If you want to display additional attributes in the property description you could provide these with the `--properties` (or `-p`) parameter.
49
49
 
50
50
  ```bash
51
- $ jsonschema2md -d examples/schemas -o examples/docs -p version,test
51
+ # include both the `version` and the `test` attribute
52
+ $ jsonschema2md -d examples/schemas -o examples/docs -p version -p test
52
53
  ```
53
54
 
54
55
  ## Disable header template
@@ -109,8 +110,8 @@ This will run our Jasmine test suite as well as lint the JavaScript according to
109
110
 
110
111
  ### CI
111
112
 
112
- Continuous integration runs on [CircleCI](https://circleci.com/gh/adobe/jsonschema2md).
113
- All pull requests automatically trigger a job that runs the [tests](#tests) by executing the [`config.yml`](.circleci/config.yml).
113
+ Continuous integration runs on Github Actions.
114
+ All pull requests automatically trigger a job that runs the [tests](#tests) by executing the [`main.yml`](.github/workflows/main.yaml).
114
115
 
115
116
  ### Code Coverage
116
117
 
@@ -73,7 +73,7 @@
73
73
  "and all following items may follow any schema": "und alle weiteren Bestandteile der Liste müssen keinem bestimmten Schema folgen",
74
74
  "and all following items must follow the schema: ": "und alle weiteren Bestandteile der Liste müssen diesem Schema folgen: ",
75
75
  "any of": "irgendeines",
76
- "any of the folllowing: ": "irgendeines der folgenden Schemas: ",
76
+ "any of the following: ": "irgendeines der folgenden Schemas: ",
77
77
  "can be null": "darf null sein",
78
78
  "cannot be null": "darf nicht null sein",
79
79
  "check the specification": "Spezifikation ansehen",
@@ -73,7 +73,7 @@
73
73
  "and all following items may follow any schema": "and all following items may follow any schema",
74
74
  "and all following items must follow the schema: ": "and all following items must follow the schema: ",
75
75
  "any of": "any of",
76
- "any of the folllowing: ": "any of the folllowing: ",
76
+ "any of the following: ": "any of the following: ",
77
77
  "can be null": "can be null",
78
78
  "cannot be null": "cannot be null",
79
79
  "check the specification": "check the specification",
@@ -73,7 +73,7 @@
73
73
  "and all following items may follow any schema": "en alle volgende items kunnen elk schema volgen:",
74
74
  "and all following items must follow the schema: ": "en alle volgende items moeten het schema volgen:",
75
75
  "any of": "een van",
76
- "any of the folllowing: ": "een van de volgende:",
76
+ "any of the following: ": "een van de volgende:",
77
77
  "can be null": "kan null zijn",
78
78
  "cannot be null": "Kan niet null zijn",
79
79
  "check the specification": "controleer de specificatie",
@@ -398,11 +398,11 @@ export default function build({
398
398
  return [listItem(paragraph(text(i18n`and all following items may follow any schema`)))];
399
399
  } else if (typeof additional === 'object') {
400
400
  return [listItem(paragraph([text(i18n`and all following items must follow the schema: `),
401
- link(
402
- `${additional[s.slug]}.md`,
403
- i18n`check type definition`,
404
- text(gentitle(additional[s.titles], additional[keyword`type`])),
405
- )]))];
401
+ link(
402
+ `${additional[s.slug]}.md`,
403
+ i18n`check type definition`,
404
+ text(gentitle(additional[s.titles], additional[keyword`type`])),
405
+ )]))];
406
406
  }
407
407
  return [];
408
408
  })(),
@@ -437,7 +437,7 @@ export default function build({
437
437
  } else if (singletype && firsttype && typeof firsttype === 'string') {
438
438
  return [inlineCode(firsttype + isarray)];
439
439
  } else if (!singletype) {
440
- return [text(isarray ? i18n`an array of the following:` : i18n`any of the folllowing: `), ...flist(flat(realtypes.map((mytype, index) => [inlineCode(mytype || i18n`not defined`), text(index === realtypes.length - 1 ? '' : i18n` or `)])))];
440
+ return [text(isarray ? i18n`an array of the following:` : i18n`any of the following: `), ...flist(flat(realtypes.map((mytype, index) => [inlineCode(mytype || i18n`not defined`), text(index === realtypes.length - 1 ? '' : i18n` or `)])))];
441
441
  } else if (merged) {
442
442
  return [text(isarray ? 'an array of merged types' : i18n`merged type`)];
443
443
  }
@@ -664,12 +664,12 @@ export default function build({
664
664
  if (schema[keyword`minContains`] !== undefined && schema[keyword`contains`]) {
665
665
  // console.log('minContains!', schema[s.filename], schema[s.pointer]);
666
666
  constraints.push(paragraph([strong(text(i18n`minimum number of contained items`)), text(': '), text(`${i18n`this array may not contain fewer than ${String(schema[keyword`minContains`])} items that validate against the schema:`} `),
667
- link(`${schema[keyword`contains`][s.slug]}.md`, i18n`check type definition`, text(gentitle(schema[keyword`contains`][s.titles], schema[keyword`contains`][keyword`type`])))]));
667
+ link(`${schema[keyword`contains`][s.slug]}.md`, i18n`check type definition`, text(gentitle(schema[keyword`contains`][s.titles], schema[keyword`contains`][keyword`type`])))]));
668
668
  }
669
669
  if (schema[keyword`maxContains`] !== undefined && schema[keyword`contains`]) {
670
670
  // console.log('maxContains!', schema[s.filename], schema[s.pointer]);
671
671
  constraints.push(paragraph([strong(text(i18n`maximum number of contained items`)), text(': '), text(`${i18n`this array may not contain more than ${String(schema[keyword`maxContains`])} items that validate against the schema:`} `),
672
- link(`${schema[keyword`contains`][s.slug]}.md`, i18n`check type definition`, text(gentitle(schema[keyword`contains`][s.titles], schema[keyword`contains`][keyword`type`])))]));
672
+ link(`${schema[keyword`contains`][s.slug]}.md`, i18n`check type definition`, text(gentitle(schema[keyword`contains`][s.titles], schema[keyword`contains`][keyword`type`])))]));
673
673
  }
674
674
 
675
675
  // https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.5
@@ -165,8 +165,7 @@ const handler = ({
165
165
  let subschema;
166
166
  if (subschemas.has(retval)) {
167
167
  subschema = subschemas.get(retval);
168
- }
169
- else {
168
+ } else {
170
169
  subschema = new Proxy(retval, handler({
171
170
  root: `${root}/${prop}`,
172
171
  parent: receiver,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adobe/jsonschema2md",
3
3
  "description": "Validate and document complex JSON Schemas the easy way.",
4
- "version": "7.1.4",
4
+ "version": "7.1.6",
5
5
  "main": "lib/index.js",
6
6
  "typings": "types",
7
7
  "bin": {
@@ -21,49 +21,47 @@
21
21
  "prepare": "husky install"
22
22
  },
23
23
  "dependencies": {
24
- "@adobe/helix-log": "6.0.0",
24
+ "@adobe/helix-log": "6.0.1",
25
25
  "@types/json-schema": "^7.0.8",
26
- "@types/mdast": "^3.0.4",
26
+ "@types/mdast": "^4.0.0",
27
27
  "es2015-i18n-tag": "1.6.1",
28
28
  "ferrum": "1.9.4",
29
- "fs-extra": "11.0.0",
29
+ "fs-extra": "11.2.0",
30
30
  "github-slugger": "2.0.0",
31
31
  "js-yaml": "4.1.0",
32
32
  "json-schema": "^0.4.0",
33
33
  "mdast-builder": "1.1.1",
34
- "mdast-util-to-string": "3.1.0",
34
+ "mdast-util-to-string": "4.0.0",
35
35
  "readdirp": "3.6.0",
36
36
  "remark-gfm": "^3.0.0",
37
- "remark-parse": "10.0.1",
38
- "remark-stringify": "10.0.2",
37
+ "remark-parse": "10.0.2",
38
+ "remark-stringify": "10.0.3",
39
39
  "unified": "10.1.2",
40
- "unist-util-inspect": "7.0.1",
41
- "yargs": "17.6.2"
40
+ "unist-util-inspect": "8.0.0",
41
+ "yargs": "17.7.2"
42
42
  },
43
43
  "devDependencies": {
44
- "@adobe/eslint-config-helix": "1.3.2",
45
- "@semantic-release/changelog": "6.0.1",
44
+ "@adobe/eslint-config-helix": "2.0.6",
45
+ "@semantic-release/changelog": "6.0.3",
46
46
  "@semantic-release/git": "10.0.1",
47
- "@semantic-release/github": "8.0.6",
48
- "@types/fs-extra": "9.0.13",
47
+ "@semantic-release/github": "9.2.6",
48
+ "@types/fs-extra": "11.0.4",
49
49
  "@types/github-slugger": "1.3.0",
50
- "@types/js-yaml": "4.0.5",
51
- "@types/node": "18.11.9",
52
- "@types/yargs": "17.0.14",
53
- "c8": "7.12.0",
54
- "commitizen": "4.2.5",
50
+ "@types/js-yaml": "4.0.9",
51
+ "@types/node": "18.19.26",
52
+ "@types/yargs": "17.0.32",
53
+ "c8": "8.0.1",
54
+ "commitizen": "4.3.0",
55
55
  "cz-conventional-changelog": "3.3.0",
56
- "eslint": "8.28.0",
57
- "eslint-plugin-header": "3.1.1",
58
- "eslint-plugin-import": "2.26.0",
59
- "husky": "8.0.2",
56
+ "eslint": "8.57.0",
57
+ "husky": "8.0.3",
60
58
  "i18n-tag-schema": "2.5.0",
61
59
  "json-logic-js": "axa-ch/cyclic-schemas-test",
62
- "lint-staged": "13.0.4",
63
- "mocha": "10.1.0",
64
- "semantic-release": "19.0.5",
65
- "typescript": "4.9.3",
66
- "unist-util-select": "4.0.1"
60
+ "lint-staged": "14.0.1",
61
+ "mocha": "10.3.0",
62
+ "semantic-release": "21.1.2",
63
+ "typescript": "5.4.3",
64
+ "unist-util-select": "5.1.0"
67
65
  },
68
66
  "engines": {
69
67
  "node": ">= 14.0.0"
@@ -1,8 +1,8 @@
1
1
  export default function formatmeta(schema: any): {
2
- longcomment: import("mdast").Root;
2
+ longcomment: import("remark-stringify/node_modules/@types/mdast").Root;
3
3
  shortcomment: any;
4
4
  comment: string;
5
- longdescription: import("mdast").Root;
5
+ longdescription: import("remark-stringify/node_modules/@types/mdast").Root;
6
6
  shortdescription: any;
7
7
  description: any;
8
8
  abstract: boolean;