@speclynx/apidom-parser-adapter-overlay-yaml-1 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-overlay-yaml-1
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-overlay-yaml-1
@@ -37949,10 +37949,12 @@ function* traverseGenerator(root, visitor, options) {
37949
37949
  nodePredicate,
37950
37950
  nodeCloneFn,
37951
37951
  detectCycles,
37952
+ skipVisited,
37952
37953
  mutable,
37953
37954
  mutationFn
37954
37955
  } = options;
37955
37956
  const keyMapIsFunction = typeof keyMap === 'function';
37957
+ const visitedNodes = skipVisited ? new WeakSet() : null;
37956
37958
  let stack;
37957
37959
  let inArray = Array.isArray(root);
37958
37960
  let keys = [root];
@@ -38038,6 +38040,14 @@ function* traverseGenerator(root, visitor, options) {
38038
38040
  continue;
38039
38041
  }
38040
38042
 
38043
+ // Skip already-visited nodes (handles DAG structures from cloneShallow)
38044
+ if (skipVisited && !isLeaving) {
38045
+ if (visitedNodes.has(node)) {
38046
+ continue;
38047
+ }
38048
+ visitedNodes.add(node);
38049
+ }
38050
+
38041
38051
  // Always create Path for the current node (needed for parentPath chain)
38042
38052
  currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
38043
38053
  const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
@@ -38181,6 +38191,7 @@ const traverse = (root, visitor, options = {}) => {
38181
38191
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
38182
38192
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
38183
38193
  detectCycles: options.detectCycles ?? true,
38194
+ skipVisited: options.skipVisited ?? false,
38184
38195
  mutable: options.mutable ?? false,
38185
38196
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
38186
38197
  };
@@ -38212,6 +38223,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
38212
38223
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
38213
38224
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
38214
38225
  detectCycles: options.detectCycles ?? true,
38226
+ skipVisited: options.skipVisited ?? false,
38215
38227
  mutable: options.mutable ?? false,
38216
38228
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
38217
38229
  };