@speclynx/apidom-parser-adapter-openapi-yaml-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-parser-adapter-openapi-yaml-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-parser-adapter-openapi-yaml-2
@@ -45322,10 +45322,12 @@ function* traverseGenerator(root, visitor, options) {
45322
45322
  nodePredicate,
45323
45323
  nodeCloneFn,
45324
45324
  detectCycles,
45325
+ skipVisited,
45325
45326
  mutable,
45326
45327
  mutationFn
45327
45328
  } = options;
45328
45329
  const keyMapIsFunction = typeof keyMap === 'function';
45330
+ const visitedNodes = skipVisited ? new WeakSet() : null;
45329
45331
  let stack;
45330
45332
  let inArray = Array.isArray(root);
45331
45333
  let keys = [root];
@@ -45411,6 +45413,14 @@ function* traverseGenerator(root, visitor, options) {
45411
45413
  continue;
45412
45414
  }
45413
45415
 
45416
+ // Skip already-visited nodes (handles DAG structures from cloneShallow)
45417
+ if (skipVisited && !isLeaving) {
45418
+ if (visitedNodes.has(node)) {
45419
+ continue;
45420
+ }
45421
+ visitedNodes.add(node);
45422
+ }
45423
+
45414
45424
  // Always create Path for the current node (needed for parentPath chain)
45415
45425
  currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
45416
45426
  const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
@@ -45554,6 +45564,7 @@ const traverse = (root, visitor, options = {}) => {
45554
45564
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
45555
45565
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
45556
45566
  detectCycles: options.detectCycles ?? true,
45567
+ skipVisited: options.skipVisited ?? false,
45557
45568
  mutable: options.mutable ?? false,
45558
45569
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
45559
45570
  };
@@ -45585,6 +45596,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
45585
45596
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
45586
45597
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
45587
45598
  detectCycles: options.detectCycles ?? true,
45599
+ skipVisited: options.skipVisited ?? false,
45588
45600
  mutable: options.mutable ?? false,
45589
45601
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
45590
45602
  };