@adobe/jsonschema2md 8.0.3 → 8.0.5
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 +14 -0
- package/eslint.config.js +54 -0
- package/lib/index.js +5 -2
- package/lib/markdownBuilder.js +1 -1
- package/package.json +11 -10
- package/.eslintignore +0 -2
- package/.eslintrc.cjs +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [8.0.5](https://github.com/adobe/jsonschema2md/compare/v8.0.4...v8.0.5) (2025-08-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([#658](https://github.com/adobe/jsonschema2md/issues/658)) ([7298762](https://github.com/adobe/jsonschema2md/commit/729876286dc368d5b0a4ee7e315946362c03e45c))
|
|
7
|
+
|
|
8
|
+
## [8.0.4](https://github.com/adobe/jsonschema2md/compare/v8.0.3...v8.0.4) (2025-07-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **markdownBuilder:** boolean defaults didn't render when the default was false ([#656](https://github.com/adobe/jsonschema2md/issues/656)) ([fb87124](https://github.com/adobe/jsonschema2md/commit/fb87124fb384e36678bb09e0c13b857f3b9a4aa9))
|
|
14
|
+
|
|
1
15
|
## [8.0.3](https://github.com/adobe/jsonschema2md/compare/v8.0.2...v8.0.3) (2025-06-18)
|
|
2
16
|
|
|
3
17
|
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import { defineConfig, globalIgnores } from '@eslint/config-helpers'
|
|
13
|
+
import { recommended, source, test } from '@adobe/eslint-config-helix';
|
|
14
|
+
|
|
15
|
+
export default defineConfig([
|
|
16
|
+
globalIgnores([
|
|
17
|
+
'.vscode/*',
|
|
18
|
+
'coverage/*',
|
|
19
|
+
]),
|
|
20
|
+
{
|
|
21
|
+
rules: {
|
|
22
|
+
strict: 0,
|
|
23
|
+
|
|
24
|
+
// Forbid multiple statements in one line
|
|
25
|
+
'max-statements-per-line': ['error', { max: 1 }],
|
|
26
|
+
|
|
27
|
+
// Allow for-of loops
|
|
28
|
+
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
|
|
29
|
+
|
|
30
|
+
// Allow return before else & redundant else statements
|
|
31
|
+
'no-else-return': 'off',
|
|
32
|
+
|
|
33
|
+
// allow dangling underscores for 'fields'
|
|
34
|
+
'no-underscore-dangle': 'off',
|
|
35
|
+
|
|
36
|
+
// Allow marking variables unused using a underscore at the start
|
|
37
|
+
'no-unused-vars': ['error', {
|
|
38
|
+
varsIgnorePattern: '^_.*$',
|
|
39
|
+
argsIgnorePattern: '^_.*$',
|
|
40
|
+
caughtErrorsIgnorePattern: '^_.*$',
|
|
41
|
+
caughtErrors: 'none',
|
|
42
|
+
}],
|
|
43
|
+
|
|
44
|
+
'import/no-named-as-default-member': 0,
|
|
45
|
+
'default-param-last': 0,
|
|
46
|
+
},
|
|
47
|
+
plugins: {
|
|
48
|
+
import: recommended.plugins.import,
|
|
49
|
+
},
|
|
50
|
+
extends: [recommended],
|
|
51
|
+
},
|
|
52
|
+
source,
|
|
53
|
+
test,
|
|
54
|
+
]);
|
package/lib/index.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
/* @ts-check */
|
|
13
13
|
import yargs from 'yargs';
|
|
14
14
|
import fs from 'fs-extra';
|
|
15
|
-
import
|
|
15
|
+
import { readdirpPromise } from 'readdirp';
|
|
16
16
|
import {
|
|
17
17
|
iter, pipe, filter, map, obj,
|
|
18
18
|
} from 'ferrum';
|
|
@@ -307,7 +307,10 @@ export async function main(args) {
|
|
|
307
307
|
const schemaExtension = argv.e;
|
|
308
308
|
|
|
309
309
|
// list all schema files in the specified directory
|
|
310
|
-
const schemaFiles = await readdirpPromise(
|
|
310
|
+
const schemaFiles = await readdirpPromise(
|
|
311
|
+
schemaPath,
|
|
312
|
+
{ root: schemaPath, fileFilter: (f) => f.path.endsWith(schemaExtension) },
|
|
313
|
+
);
|
|
311
314
|
|
|
312
315
|
console.log(`loading ${schemaFiles.length} schemas`);
|
|
313
316
|
|
package/lib/markdownBuilder.js
CHANGED
|
@@ -705,7 +705,7 @@ export default function build({
|
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
function makedefault(schema, level = 1) {
|
|
708
|
-
if (schema[keyword`default`]) {
|
|
708
|
+
if (schema[keyword`default`] !== undefined) {
|
|
709
709
|
return [
|
|
710
710
|
heading(level + 1, text(i18n`${simpletitle(schema)} Default Value`)),
|
|
711
711
|
paragraph(text(i18n`The default value is:`)),
|
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.5",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "types",
|
|
7
7
|
"bin": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@types/unist": "^3.0.3",
|
|
27
27
|
"es2015-i18n-tag": "1.6.1",
|
|
28
28
|
"ferrum": "1.9.4",
|
|
29
|
-
"fs-extra": "11.3.
|
|
29
|
+
"fs-extra": "11.3.1",
|
|
30
30
|
"github-slugger": "2.0.0",
|
|
31
31
|
"js-yaml": "4.1.0",
|
|
32
32
|
"json-schema": "^0.4.0",
|
|
@@ -41,26 +41,27 @@
|
|
|
41
41
|
"yargs": "18.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@adobe/eslint-config-helix": "
|
|
44
|
+
"@adobe/eslint-config-helix": "3.0.8",
|
|
45
|
+
"@eslint/config-helpers": "0.3.1",
|
|
45
46
|
"@semantic-release/changelog": "6.0.3",
|
|
46
47
|
"@semantic-release/git": "10.0.1",
|
|
47
|
-
"@semantic-release/github": "11.0.
|
|
48
|
+
"@semantic-release/github": "11.0.4",
|
|
48
49
|
"@types/fs-extra": "11.0.4",
|
|
49
50
|
"@types/github-slugger": "2.0.0",
|
|
50
51
|
"@types/js-yaml": "4.0.9",
|
|
51
|
-
"@types/node": "22.
|
|
52
|
+
"@types/node": "22.17.1",
|
|
52
53
|
"@types/yargs": "17.0.33",
|
|
53
54
|
"c8": "10.1.3",
|
|
54
55
|
"commitizen": "4.3.1",
|
|
55
56
|
"cz-conventional-changelog": "3.3.0",
|
|
56
|
-
"eslint": "
|
|
57
|
+
"eslint": "9.4.0",
|
|
57
58
|
"husky": "9.1.7",
|
|
58
59
|
"i18n-tag-schema": "2.5.0",
|
|
59
60
|
"json-logic-js": "axa-ch/cyclic-schemas-test",
|
|
60
|
-
"lint-staged": "16.1.
|
|
61
|
-
"mocha": "11.
|
|
62
|
-
"semantic-release": "24.2.
|
|
63
|
-
"typescript": "5.
|
|
61
|
+
"lint-staged": "16.1.5",
|
|
62
|
+
"mocha": "11.7.1",
|
|
63
|
+
"semantic-release": "24.2.7",
|
|
64
|
+
"typescript": "5.9.2",
|
|
64
65
|
"unist-util-select": "5.1.0"
|
|
65
66
|
},
|
|
66
67
|
"engines": {
|
package/.eslintignore
DELETED
package/.eslintrc.cjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2019 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
module.exports = {
|
|
14
|
-
root: true,
|
|
15
|
-
extends: '@adobe/helix',
|
|
16
|
-
rules: {
|
|
17
|
-
strict: 0,
|
|
18
|
-
|
|
19
|
-
// Forbid multiple statements in one line
|
|
20
|
-
'max-statements-per-line': ['error', { max: 1 }],
|
|
21
|
-
|
|
22
|
-
// Allow for-of loops
|
|
23
|
-
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
|
|
24
|
-
|
|
25
|
-
// Allow return before else & redundant else statements
|
|
26
|
-
'no-else-return': 'off',
|
|
27
|
-
|
|
28
|
-
// allow dangling underscores for 'fields'
|
|
29
|
-
'no-underscore-dangle': 'off',
|
|
30
|
-
|
|
31
|
-
// Allow marking variables unused using a underscore at the start
|
|
32
|
-
'no-unused-vars': ['error', {
|
|
33
|
-
varsIgnorePattern: '^_.*$',
|
|
34
|
-
argsIgnorePattern: '^_.*$',
|
|
35
|
-
caughtErrorsIgnorePattern: '^_.*$',
|
|
36
|
-
}],
|
|
37
|
-
|
|
38
|
-
'import/no-named-as-default-member': 0,
|
|
39
|
-
'default-param-last': 0,
|
|
40
|
-
},
|
|
41
|
-
};
|