@swagger-api/apidom-parser-adapter-openapi-yaml-3-1 1.0.0-alpha.1 → 1.0.0-alpha.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.2](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2024-05-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-yaml-3-1
|
|
9
|
+
|
|
6
10
|
# [1.0.0-alpha.1](https://github.com/swagger-api/apidom/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) (2024-05-15)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-yaml-3-1
|
|
@@ -17391,8 +17391,20 @@ visitor, {
|
|
|
17391
17391
|
for (const [stateKey, stateValue] of Object.entries(state)) {
|
|
17392
17392
|
visitor[stateKey] = stateValue;
|
|
17393
17393
|
}
|
|
17394
|
+
const link = {
|
|
17395
|
+
// eslint-disable-next-line @typescript-eslint/no-loop-func
|
|
17396
|
+
replaceWith(newNode, replacer) {
|
|
17397
|
+
if (typeof replacer === 'function') {
|
|
17398
|
+
replacer(newNode, node, key, parent, path, ancestors);
|
|
17399
|
+
} else if (parent) {
|
|
17400
|
+
parent[key] = newNode;
|
|
17401
|
+
}
|
|
17402
|
+
node = newNode;
|
|
17403
|
+
}
|
|
17404
|
+
};
|
|
17405
|
+
|
|
17394
17406
|
// retrieve result
|
|
17395
|
-
result = visitFn.call(visitor, node, key, parent, path, ancestors);
|
|
17407
|
+
result = visitFn.call(visitor, node, key, parent, path, ancestors, link);
|
|
17396
17408
|
}
|
|
17397
17409
|
|
|
17398
17410
|
// check if the visitor is async
|
|
@@ -17549,9 +17561,20 @@ visitor, {
|
|
|
17549
17561
|
for (const [stateKey, stateValue] of Object.entries(state)) {
|
|
17550
17562
|
visitor[stateKey] = stateValue;
|
|
17551
17563
|
}
|
|
17564
|
+
const link = {
|
|
17565
|
+
// eslint-disable-next-line @typescript-eslint/no-loop-func
|
|
17566
|
+
replaceWith(newNode, replacer) {
|
|
17567
|
+
if (typeof replacer === 'function') {
|
|
17568
|
+
replacer(newNode, node, key, parent, path, ancestors);
|
|
17569
|
+
} else if (parent) {
|
|
17570
|
+
parent[key] = newNode;
|
|
17571
|
+
}
|
|
17572
|
+
node = newNode;
|
|
17573
|
+
}
|
|
17574
|
+
};
|
|
17552
17575
|
|
|
17553
17576
|
// retrieve result
|
|
17554
|
-
result = await visitFn.call(visitor, node, key, parent, path, ancestors); // eslint-disable-line no-await-in-loop
|
|
17577
|
+
result = await visitFn.call(visitor, node, key, parent, path, ancestors, link); // eslint-disable-line no-await-in-loop
|
|
17555
17578
|
}
|
|
17556
17579
|
if (result === breakSymbol) {
|
|
17557
17580
|
break;
|