@adobe/jsonschema2md 8.0.1 → 8.0.3
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/CHANGELOG.md +20 -0
- package/lib/index.js +3 -9
- package/lib/readmeBuilder.js +1 -0
- package/package.json +19 -19
- package/types/index.d.ts +1 -1
- package/types/markdownBuilder.d.ts +0 -1
- package/types/readmeBuilder.d.ts +2 -1
- package/types/schemaProxy.d.ts +1 -1
- package/types/writeMarkdown.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [8.0.3](https://github.com/adobe/jsonschema2md/compare/v8.0.2...v8.0.3) (2025-06-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([#625](https://github.com/adobe/jsonschema2md/issues/625)) ([2f05d79](https://github.com/adobe/jsonschema2md/commit/2f05d7908e2a014e7e1d5fcf0e598b181fb5361c))
|
|
7
|
+
* **deps:** update external fixes ([#628](https://github.com/adobe/jsonschema2md/issues/628)) ([40d6a3e](https://github.com/adobe/jsonschema2md/commit/40d6a3e364891dbc01aaef646d163cf272b4adc5))
|
|
8
|
+
* **deps:** update external major (major) ([#604](https://github.com/adobe/jsonschema2md/issues/604)) ([8d7af7c](https://github.com/adobe/jsonschema2md/commit/8d7af7cce0f97767e914c2d0849e1f2eb79d8547))
|
|
9
|
+
* release ([d18c15c](https://github.com/adobe/jsonschema2md/commit/d18c15c5a3868a8a6d3b74fd2acc8c80e624536c))
|
|
10
|
+
* release ([9e0a69e](https://github.com/adobe/jsonschema2md/commit/9e0a69e4031857a522d1fc95741b9b015ca13fd6))
|
|
11
|
+
* release ([5f6b431](https://github.com/adobe/jsonschema2md/commit/5f6b431482b44e44661837c2ce33d4e92875906a))
|
|
12
|
+
* release ([1b002a8](https://github.com/adobe/jsonschema2md/commit/1b002a820e2efb0edd0c47377cc54dec06cbea68))
|
|
13
|
+
|
|
14
|
+
## [8.0.2](https://github.com/adobe/jsonschema2md/compare/v8.0.1...v8.0.2) (2024-04-09)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* remove helix-log dependency ([#579](https://github.com/adobe/jsonschema2md/issues/579)) ([9fbfdf9](https://github.com/adobe/jsonschema2md/commit/9fbfdf9726c512c4338c47bafef02347f1761372))
|
|
20
|
+
|
|
1
21
|
## [8.0.1](https://github.com/adobe/jsonschema2md/compare/v8.0.0...v8.0.1) (2024-03-25)
|
|
2
22
|
|
|
3
23
|
|
package/lib/index.js
CHANGED
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
/* @ts-check */
|
|
13
13
|
import yargs from 'yargs';
|
|
14
14
|
import fs from 'fs-extra';
|
|
15
|
-
import readdirp from 'readdirp';
|
|
16
|
-
import { createDefaultLogger, SimpleInterface } from '@adobe/helix-log';
|
|
15
|
+
import readdirp, { readdirpPromise } from 'readdirp';
|
|
17
16
|
import {
|
|
18
17
|
iter, pipe, filter, map, obj,
|
|
19
18
|
} from 'ferrum';
|
|
@@ -30,12 +29,7 @@ import writeSchema from './writeSchema.js';
|
|
|
30
29
|
const __filename = fileURLToPath(import.meta.url);
|
|
31
30
|
const __dirname = nodepath.dirname(__filename);
|
|
32
31
|
|
|
33
|
-
const
|
|
34
|
-
logger: createDefaultLogger(),
|
|
35
|
-
});
|
|
36
|
-
const debug = logger.debug.bind(logger);
|
|
37
|
-
const info = logger.info.bind(logger);
|
|
38
|
-
const error = logger.error.bind(logger);
|
|
32
|
+
const { debug, info, error } = console;
|
|
39
33
|
|
|
40
34
|
/**
|
|
41
35
|
* @typedef {import("../types/api").JsonSchema} JsonSchema
|
|
@@ -313,7 +307,7 @@ export async function main(args) {
|
|
|
313
307
|
const schemaExtension = argv.e;
|
|
314
308
|
|
|
315
309
|
// list all schema files in the specified directory
|
|
316
|
-
const schemaFiles = await
|
|
310
|
+
const schemaFiles = await readdirpPromise(schemaPath, { root: schemaPath, fileFilter: (f) => f.path.endsWith(schemaExtension) });
|
|
317
311
|
|
|
318
312
|
console.log(`loading ${schemaFiles.length} schemas`);
|
|
319
313
|
|
package/lib/readmeBuilder.js
CHANGED
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": "8.0.
|
|
4
|
+
"version": "8.0.3",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "types",
|
|
7
7
|
"bin": {
|
|
@@ -21,46 +21,46 @@
|
|
|
21
21
|
"prepare": "husky install"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@adobe/helix-log": "6.0.1",
|
|
25
24
|
"@types/json-schema": "^7.0.8",
|
|
26
25
|
"@types/mdast": "^4.0.0",
|
|
26
|
+
"@types/unist": "^3.0.3",
|
|
27
27
|
"es2015-i18n-tag": "1.6.1",
|
|
28
28
|
"ferrum": "1.9.4",
|
|
29
|
-
"fs-extra": "11.
|
|
29
|
+
"fs-extra": "11.3.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
34
|
"mdast-util-to-string": "4.0.0",
|
|
35
|
-
"readdirp": "
|
|
35
|
+
"readdirp": "4.1.2",
|
|
36
36
|
"remark-gfm": "^4.0.0",
|
|
37
37
|
"remark-parse": "11.0.0",
|
|
38
38
|
"remark-stringify": "11.0.0",
|
|
39
|
-
"unified": "11.0.
|
|
40
|
-
"unist-util-inspect": "8.
|
|
41
|
-
"yargs": "
|
|
39
|
+
"unified": "11.0.5",
|
|
40
|
+
"unist-util-inspect": "8.1.0",
|
|
41
|
+
"yargs": "18.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@adobe/eslint-config-helix": "2.0.
|
|
44
|
+
"@adobe/eslint-config-helix": "2.0.9",
|
|
45
45
|
"@semantic-release/changelog": "6.0.3",
|
|
46
46
|
"@semantic-release/git": "10.0.1",
|
|
47
|
-
"@semantic-release/github": "
|
|
47
|
+
"@semantic-release/github": "11.0.3",
|
|
48
48
|
"@types/fs-extra": "11.0.4",
|
|
49
49
|
"@types/github-slugger": "2.0.0",
|
|
50
50
|
"@types/js-yaml": "4.0.9",
|
|
51
|
-
"@types/node": "
|
|
52
|
-
"@types/yargs": "17.0.
|
|
53
|
-
"c8": "
|
|
54
|
-
"commitizen": "4.3.
|
|
51
|
+
"@types/node": "22.15.32",
|
|
52
|
+
"@types/yargs": "17.0.33",
|
|
53
|
+
"c8": "10.1.3",
|
|
54
|
+
"commitizen": "4.3.1",
|
|
55
55
|
"cz-conventional-changelog": "3.3.0",
|
|
56
|
-
"eslint": "8.57.
|
|
57
|
-
"husky": "9.
|
|
56
|
+
"eslint": "8.57.1",
|
|
57
|
+
"husky": "9.1.7",
|
|
58
58
|
"i18n-tag-schema": "2.5.0",
|
|
59
59
|
"json-logic-js": "axa-ch/cyclic-schemas-test",
|
|
60
|
-
"lint-staged": "
|
|
61
|
-
"mocha": "
|
|
62
|
-
"semantic-release": "
|
|
63
|
-
"typescript": "5.
|
|
60
|
+
"lint-staged": "16.1.2",
|
|
61
|
+
"mocha": "11.6.0",
|
|
62
|
+
"semantic-release": "24.2.5",
|
|
63
|
+
"typescript": "5.8.3",
|
|
64
64
|
"unist-util-select": "5.1.0"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
package/types/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* skip in markdown.
|
|
43
43
|
* @returns {GeneratedOutput} List of raw markdown that were generated from input schema.
|
|
44
44
|
*/
|
|
45
|
-
export function jsonschema2md(schema: JsonSchema |
|
|
45
|
+
export function jsonschema2md(schema: JsonSchema | SchemaFiles, options: {
|
|
46
46
|
schemaPath?: string;
|
|
47
47
|
outDir?: string;
|
|
48
48
|
metadata?: {
|
package/types/readmeBuilder.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generate the README.md
|
|
3
3
|
* @param {object} opts
|
|
4
|
+
* @returns {function(Array): import('unist').Parent|null}
|
|
4
5
|
*/
|
|
5
|
-
export default function build({ readme }: object): (
|
|
6
|
+
export default function build({ readme }: object): (arg0: any[]) => import("unist").Parent | null;
|
package/types/schemaProxy.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function loader(): (name: string, schema: any) => any;
|
|
1
|
+
export default function loader(): (/** @type {string} */ name: string, /** @type {any} */ schema: any) => any;
|
package/types/writeMarkdown.d.ts
CHANGED
|
@@ -52,5 +52,5 @@ export type MarkdownAst = import("../types/api").MarkdownAst;
|
|
|
52
52
|
export type MarkdownContent = import("../types/api").MarkdownContent;
|
|
53
53
|
export type ReadmeContent = import("../types/api").ReadmeContent;
|
|
54
54
|
export type MarkdownAstFiles = {
|
|
55
|
-
[name: string]:
|
|
55
|
+
[name: string]: MarkdownAst;
|
|
56
56
|
};
|