@speclynx/apidom-ns-asyncapi-2 4.7.1 → 4.8.0

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
+ # [4.8.0](https://github.com/speclynx/apidom/compare/v4.7.1...v4.8.0) (2026-04-17)
7
+
8
+ **Note:** Version bump only for package @speclynx/apidom-ns-asyncapi-2
9
+
6
10
  ## [4.7.1](https://github.com/speclynx/apidom/compare/v4.7.0...v4.7.1) (2026-04-16)
7
11
 
8
12
  **Note:** Version bump only for package @speclynx/apidom-ns-asyncapi-2
@@ -39287,10 +39287,12 @@ function* traverseGenerator(root, visitor, options) {
39287
39287
  nodePredicate,
39288
39288
  nodeCloneFn,
39289
39289
  detectCycles,
39290
+ skipVisited,
39290
39291
  mutable,
39291
39292
  mutationFn
39292
39293
  } = options;
39293
39294
  const keyMapIsFunction = typeof keyMap === 'function';
39295
+ const visitedNodes = skipVisited ? new WeakSet() : null;
39294
39296
  let stack;
39295
39297
  let inArray = Array.isArray(root);
39296
39298
  let keys = [root];
@@ -39376,6 +39378,14 @@ function* traverseGenerator(root, visitor, options) {
39376
39378
  continue;
39377
39379
  }
39378
39380
 
39381
+ // Skip already-visited nodes (handles DAG structures from cloneShallow)
39382
+ if (skipVisited && !isLeaving) {
39383
+ if (visitedNodes.has(node)) {
39384
+ continue;
39385
+ }
39386
+ visitedNodes.add(node);
39387
+ }
39388
+
39379
39389
  // Always create Path for the current node (needed for parentPath chain)
39380
39390
  currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
39381
39391
  const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
@@ -39519,6 +39529,7 @@ const traverse = (root, visitor, options = {}) => {
39519
39529
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
39520
39530
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
39521
39531
  detectCycles: options.detectCycles ?? true,
39532
+ skipVisited: options.skipVisited ?? false,
39522
39533
  mutable: options.mutable ?? false,
39523
39534
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
39524
39535
  };
@@ -39550,6 +39561,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
39550
39561
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
39551
39562
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
39552
39563
  detectCycles: options.detectCycles ?? true,
39564
+ skipVisited: options.skipVisited ?? false,
39553
39565
  mutable: options.mutable ?? false,
39554
39566
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
39555
39567
  };