toolcraft-openapi 0.0.533 → 0.0.534

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.
@@ -33,12 +33,12 @@
33
33
  },
34
34
  {
35
35
  "name": "toolcraft-openapi",
36
- "version": "0.0.533",
36
+ "version": "0.0.534",
37
37
  "license": "MIT"
38
38
  },
39
39
  {
40
40
  "name": "toolcraft-schema",
41
- "version": "0.0.533",
41
+ "version": "0.0.534",
42
42
  "license": "MIT"
43
43
  },
44
44
  {
@@ -99,7 +99,7 @@ fetching.
99
99
  `isJsonValue(value, options)` checks JSON data without invoking getters or
100
100
  serialization hooks. It rejects cycles, sparse arrays, non-finite numbers and
101
101
  non-JSON prototypes. Defaults bound the tree to 10,000 nodes and depth 64.
102
- Use `maxNodes` for larger bounded documents, or `maxDepth` (0–256) to choose a
102
+ Use `maxNodes` for larger bounded documents (`Infinity` removes the node budget), or `maxDepth` (0–256) to choose a
103
103
  depth budget. Shared objects count once for each occurrence in the JSON tree;
104
104
  options never change other calls' budgets.
105
105
 
@@ -8,7 +8,7 @@ export function Json(options = {}) {
8
8
  export function isJsonValue(value, options = {}) {
9
9
  const maxNodes = options.maxNodes ?? 10_000;
10
10
  const maxDepth = options.maxDepth ?? 64;
11
- if (!Number.isSafeInteger(maxNodes) || maxNodes < 1)
11
+ if (maxNodes !== Infinity && (!Number.isSafeInteger(maxNodes) || maxNodes < 1))
12
12
  throw new Error("maxNodes must be a positive safe integer");
13
13
  if (!Number.isSafeInteger(maxDepth) || maxDepth < 0 || maxDepth > 256)
14
14
  throw new Error("maxDepth must be an integer between 0 and 256");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-schema",
3
- "version": "0.0.533",
3
+ "version": "0.0.534",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-openapi",
3
- "version": "0.0.533",
3
+ "version": "0.0.534",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "toolcraft-openapi-generate": "dist/bin/generate.js"
31
31
  },
32
32
  "dependencies": {
33
- "toolcraft": "0.0.533",
33
+ "toolcraft": "0.0.534",
34
34
  "fast-string-width": "^3.0.2",
35
35
  "fast-wrap-ansi": "^0.2.0",
36
36
  "sisteransi": "^1.0.5",
@@ -45,7 +45,7 @@
45
45
  "directory": "packages/toolcraft-openapi"
46
46
  },
47
47
  "optionalDependencies": {
48
- "toolcraft-schema": "0.0.533",
48
+ "toolcraft-schema": "0.0.534",
49
49
  "toolcraft-design": "*",
50
50
  "@poe-code/frontmatter": "*"
51
51
  },