@speclynx/apidom-parser-adapter-openapi-yaml-3-0 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-3-0
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-3-0
@@ -47628,10 +47628,12 @@ function* traverseGenerator(root, visitor, options) {
47628
47628
  nodePredicate,
47629
47629
  nodeCloneFn,
47630
47630
  detectCycles,
47631
+ skipVisited,
47631
47632
  mutable,
47632
47633
  mutationFn
47633
47634
  } = options;
47634
47635
  const keyMapIsFunction = typeof keyMap === 'function';
47636
+ const visitedNodes = skipVisited ? new WeakSet() : null;
47635
47637
  let stack;
47636
47638
  let inArray = Array.isArray(root);
47637
47639
  let keys = [root];
@@ -47717,6 +47719,14 @@ function* traverseGenerator(root, visitor, options) {
47717
47719
  continue;
47718
47720
  }
47719
47721
 
47722
+ // Skip already-visited nodes (handles DAG structures from cloneShallow)
47723
+ if (skipVisited && !isLeaving) {
47724
+ if (visitedNodes.has(node)) {
47725
+ continue;
47726
+ }
47727
+ visitedNodes.add(node);
47728
+ }
47729
+
47720
47730
  // Always create Path for the current node (needed for parentPath chain)
47721
47731
  currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
47722
47732
  const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
@@ -47860,6 +47870,7 @@ const traverse = (root, visitor, options = {}) => {
47860
47870
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
47861
47871
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
47862
47872
  detectCycles: options.detectCycles ?? true,
47873
+ skipVisited: options.skipVisited ?? false,
47863
47874
  mutable: options.mutable ?? false,
47864
47875
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
47865
47876
  };
@@ -47891,6 +47902,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
47891
47902
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
47892
47903
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
47893
47904
  detectCycles: options.detectCycles ?? true,
47905
+ skipVisited: options.skipVisited ?? false,
47894
47906
  mutable: options.mutable ?? false,
47895
47907
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
47896
47908
  };