@apidevtools/json-schema-ref-parser 15.2.1 → 15.2.2
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/dist/lib/dereference.js +4 -1
- package/lib/dereference.ts +4 -1
- package/package.json +8 -8
package/dist/lib/dereference.js
CHANGED
|
@@ -166,13 +166,16 @@ function dereference$Ref($ref, path, pathFromRoot, parents, processedObjects, de
|
|
|
166
166
|
// overhaul.
|
|
167
167
|
if (typeof cache.value === "object" && "$ref" in cache.value && "$ref" in $ref) {
|
|
168
168
|
if (cache.value.$ref === $ref.$ref) {
|
|
169
|
+
// Fire onCircular for cached circular refs so callers are notified of every occurrence
|
|
170
|
+
foundCircularReference(path, $refs, options);
|
|
169
171
|
return cache;
|
|
170
172
|
}
|
|
171
173
|
else {
|
|
172
|
-
// no-op
|
|
174
|
+
// no-op - fall through to re-process (handles external ref edge case)
|
|
173
175
|
}
|
|
174
176
|
}
|
|
175
177
|
else {
|
|
178
|
+
foundCircularReference(path, $refs, options);
|
|
176
179
|
return cache;
|
|
177
180
|
}
|
|
178
181
|
}
|
package/lib/dereference.ts
CHANGED
|
@@ -251,11 +251,14 @@ function dereference$Ref<S extends object = JSONSchema, O extends ParserOptions<
|
|
|
251
251
|
// overhaul.
|
|
252
252
|
if (typeof cache.value === "object" && "$ref" in cache.value && "$ref" in $ref) {
|
|
253
253
|
if (cache.value.$ref === $ref.$ref) {
|
|
254
|
+
// Fire onCircular for cached circular refs so callers are notified of every occurrence
|
|
255
|
+
foundCircularReference(path, $refs, options);
|
|
254
256
|
return cache;
|
|
255
257
|
} else {
|
|
256
|
-
// no-op
|
|
258
|
+
// no-op - fall through to re-process (handles external ref edge case)
|
|
257
259
|
}
|
|
258
260
|
} else {
|
|
261
|
+
foundCircularReference(path, $refs, options);
|
|
259
262
|
return cache;
|
|
260
263
|
}
|
|
261
264
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apidevtools/json-schema-ref-parser",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.2",
|
|
4
4
|
"description": "Parse, Resolve, and Dereference JSON Schema $ref pointers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/lib/index.d.ts",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"@types/js-yaml": "^4.0.9",
|
|
82
82
|
"@types/json-schema": "^7.0.15",
|
|
83
83
|
"@types/node": "^25",
|
|
84
|
-
"@typescript-eslint/eslint-plugin": "^8.53.
|
|
85
|
-
"@typescript-eslint/parser": "^8.53.
|
|
86
|
-
"@vitest/coverage-v8": "^4.0.
|
|
84
|
+
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
|
85
|
+
"@typescript-eslint/parser": "^8.53.1",
|
|
86
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
87
87
|
"cross-env": "^10.1.0",
|
|
88
88
|
"eslint": "^9.39.2",
|
|
89
89
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -91,13 +91,13 @@
|
|
|
91
91
|
"eslint-plugin-prettier": "^5.5.5",
|
|
92
92
|
"eslint-plugin-promise": "^7.2.1",
|
|
93
93
|
"eslint-plugin-unused-imports": "^4.3.0",
|
|
94
|
-
"globals": "^17.
|
|
94
|
+
"globals": "^17.1.0",
|
|
95
95
|
"jsdom": "^27.4.0",
|
|
96
|
-
"prettier": "^3.8.
|
|
96
|
+
"prettier": "^3.8.1",
|
|
97
97
|
"rimraf": "^6.1.2",
|
|
98
98
|
"typescript": "^5.9.3",
|
|
99
|
-
"typescript-eslint": "^8.53.
|
|
100
|
-
"vitest": "^4.0.
|
|
99
|
+
"typescript-eslint": "^8.53.1",
|
|
100
|
+
"vitest": "^4.0.18"
|
|
101
101
|
},
|
|
102
102
|
"release": {
|
|
103
103
|
"branches": [
|