@speclynx/apidom-ns-asyncapi-2 4.10.0 → 4.11.1
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,18 @@
|
|
|
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
|
+
## [4.11.1](https://github.com/speclynx/apidom/compare/v4.11.0...v4.11.1) (2026-06-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @speclynx/apidom-ns-asyncapi-2
|
|
9
|
+
|
|
10
|
+
# [4.11.0](https://github.com/speclynx/apidom/compare/v4.10.1...v4.11.0) (2026-06-10)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @speclynx/apidom-ns-asyncapi-2
|
|
13
|
+
|
|
14
|
+
## [4.10.1](https://github.com/speclynx/apidom/compare/v4.10.0...v4.10.1) (2026-05-20)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @speclynx/apidom-ns-asyncapi-2
|
|
17
|
+
|
|
6
18
|
# [4.10.0](https://github.com/speclynx/apidom/compare/v4.9.1...v4.10.0) (2026-05-12)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @speclynx/apidom-ns-asyncapi-2
|
|
@@ -38686,6 +38686,14 @@ class Path {
|
|
|
38686
38686
|
*/
|
|
38687
38687
|
inList;
|
|
38688
38688
|
|
|
38689
|
+
/**
|
|
38690
|
+
* True when this node is a non-descending revisit of an already-visited node
|
|
38691
|
+
* (only under skipVisited: 'enter-only'). Children are not traversed.
|
|
38692
|
+
* Set on both the enter and the matching leave phase, so it is meaningful
|
|
38693
|
+
* in either phase.
|
|
38694
|
+
*/
|
|
38695
|
+
revisited = false;
|
|
38696
|
+
|
|
38689
38697
|
/**
|
|
38690
38698
|
* Internal state for traversal control.
|
|
38691
38699
|
*/
|
|
@@ -39270,6 +39278,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
39270
39278
|
|
|
39271
39279
|
|
|
39272
39280
|
|
|
39281
|
+
/**
|
|
39282
|
+
* Controls handling of already-visited nodes during traversal.
|
|
39283
|
+
* @public
|
|
39284
|
+
*/
|
|
39273
39285
|
/**
|
|
39274
39286
|
* Options for the traverse function.
|
|
39275
39287
|
* @public
|
|
@@ -39277,6 +39289,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
39277
39289
|
// =============================================================================
|
|
39278
39290
|
// Internal types for generator
|
|
39279
39291
|
// =============================================================================
|
|
39292
|
+
|
|
39293
|
+
const normalizeSkipVisited = v => {
|
|
39294
|
+
if (v === true) return 'skip';
|
|
39295
|
+
if (v === false || v === undefined) return 'never';
|
|
39296
|
+
return v;
|
|
39297
|
+
};
|
|
39280
39298
|
// =============================================================================
|
|
39281
39299
|
// Core generator
|
|
39282
39300
|
// =============================================================================
|
|
@@ -39294,7 +39312,7 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
39294
39312
|
mutationFn
|
|
39295
39313
|
} = options;
|
|
39296
39314
|
const keyMapIsFunction = typeof keyMap === 'function';
|
|
39297
|
-
const visitedNodes = skipVisited ? new WeakSet() : null;
|
|
39315
|
+
const visitedNodes = skipVisited !== 'never' ? new WeakSet() : null;
|
|
39298
39316
|
let stack;
|
|
39299
39317
|
let inArray = Array.isArray(root);
|
|
39300
39318
|
let keys = [root];
|
|
@@ -39309,6 +39327,7 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
39309
39327
|
index += 1;
|
|
39310
39328
|
const isLeaving = index === keys.length;
|
|
39311
39329
|
let key;
|
|
39330
|
+
let revisitNoDescend = false;
|
|
39312
39331
|
const isEdited = isLeaving && edits.length !== 0;
|
|
39313
39332
|
if (isLeaving) {
|
|
39314
39333
|
key = ancestors.length === 0 ? undefined : currentPath?.key;
|
|
@@ -39350,6 +39369,7 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
39350
39369
|
edits = stack.edits;
|
|
39351
39370
|
const parentInArray = stack.inArray;
|
|
39352
39371
|
parentPath = stack.parentPath;
|
|
39372
|
+
revisitNoDescend = stack.revisitNoDescend;
|
|
39353
39373
|
stack = stack.prev;
|
|
39354
39374
|
|
|
39355
39375
|
// Push the edited node to parent's edits for propagation up the tree
|
|
@@ -39381,15 +39401,22 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
39381
39401
|
}
|
|
39382
39402
|
|
|
39383
39403
|
// Skip already-visited nodes (handles DAG structures from cloneShallow)
|
|
39384
|
-
if (skipVisited && !isLeaving) {
|
|
39404
|
+
if (skipVisited !== 'never' && !isLeaving) {
|
|
39385
39405
|
if (visitedNodes.has(node)) {
|
|
39386
|
-
|
|
39406
|
+
if (skipVisited === 'enter-only') {
|
|
39407
|
+
// fire enter/leave for this occurrence, but don't re-descend
|
|
39408
|
+
revisitNoDescend = true;
|
|
39409
|
+
} else {
|
|
39410
|
+
continue;
|
|
39411
|
+
}
|
|
39412
|
+
} else {
|
|
39413
|
+
visitedNodes.add(node);
|
|
39387
39414
|
}
|
|
39388
|
-
visitedNodes.add(node);
|
|
39389
39415
|
}
|
|
39390
39416
|
|
|
39391
39417
|
// Always create Path for the current node (needed for parentPath chain)
|
|
39392
39418
|
currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
|
|
39419
|
+
currentPath.revisited = revisitNoDescend;
|
|
39393
39420
|
const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
|
|
39394
39421
|
if (visitFn) {
|
|
39395
39422
|
// Assign state to visitor
|
|
@@ -39453,10 +39480,13 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
39453
39480
|
keys,
|
|
39454
39481
|
edits,
|
|
39455
39482
|
parentPath,
|
|
39483
|
+
revisitNoDescend,
|
|
39456
39484
|
prev: stack
|
|
39457
39485
|
};
|
|
39458
39486
|
inArray = Array.isArray(node);
|
|
39459
|
-
if (
|
|
39487
|
+
if (revisitNoDescend) {
|
|
39488
|
+
keys = [];
|
|
39489
|
+
} else if (inArray) {
|
|
39460
39490
|
keys = node;
|
|
39461
39491
|
} else if (keyMapIsFunction) {
|
|
39462
39492
|
keys = keyMap(node);
|
|
@@ -39531,7 +39561,7 @@ const traverse = (root, visitor, options = {}) => {
|
|
|
39531
39561
|
nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
|
|
39532
39562
|
nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
|
|
39533
39563
|
detectCycles: options.detectCycles ?? true,
|
|
39534
|
-
skipVisited: options.skipVisited
|
|
39564
|
+
skipVisited: normalizeSkipVisited(options.skipVisited),
|
|
39535
39565
|
mutable: options.mutable ?? false,
|
|
39536
39566
|
mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
|
|
39537
39567
|
};
|
|
@@ -39563,7 +39593,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
|
|
|
39563
39593
|
nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
|
|
39564
39594
|
nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
|
|
39565
39595
|
detectCycles: options.detectCycles ?? true,
|
|
39566
|
-
skipVisited: options.skipVisited
|
|
39596
|
+
skipVisited: normalizeSkipVisited(options.skipVisited),
|
|
39567
39597
|
mutable: options.mutable ?? false,
|
|
39568
39598
|
mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
|
|
39569
39599
|
};
|
|
@@ -40031,7 +40061,9 @@ mergeVisitors[Symbol.for('nodejs.util.promisify.custom')] = mergeVisitorsAsync;
|
|
|
40031
40061
|
* @internal
|
|
40032
40062
|
*/
|
|
40033
40063
|
function createPathProxy(originalPath, currentNode) {
|
|
40034
|
-
|
|
40064
|
+
const proxy = new _Path_mjs__WEBPACK_IMPORTED_MODULE_4__.Path(currentNode, originalPath.parent, originalPath.parentPath, originalPath.key, originalPath.inList);
|
|
40065
|
+
proxy.revisited = originalPath.revisited;
|
|
40066
|
+
return proxy;
|
|
40035
40067
|
}
|
|
40036
40068
|
|
|
40037
40069
|
/***/ }
|