@speclynx/apidom-parser-adapter-openapi-yaml-2 4.7.0 → 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,14 @@
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
+
10
+ ## [4.7.1](https://github.com/speclynx/apidom/compare/v4.7.0...v4.7.1) (2026-04-16)
11
+
12
+ **Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-yaml-2
13
+
6
14
  # [4.7.0](https://github.com/speclynx/apidom/compare/v4.6.0...v4.7.0) (2026-04-12)
7
15
 
8
16
  **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);
@@ -45431,11 +45441,6 @@ function* traverseGenerator(root, visitor, options) {
45431
45441
  if (currentPath.shouldStop) {
45432
45442
  break;
45433
45443
  }
45434
- if (currentPath.shouldSkip) {
45435
- if (!isLeaving) {
45436
- continue;
45437
- }
45438
- }
45439
45444
  if (currentPath.removed) {
45440
45445
  edits.push([key, null]);
45441
45446
  if (!isLeaving) {
@@ -45445,12 +45450,19 @@ function* traverseGenerator(root, visitor, options) {
45445
45450
  const replacement = currentPath._getReplacementNode();
45446
45451
  edits.push([key, replacement]);
45447
45452
  if (!isLeaving) {
45453
+ if (currentPath.shouldSkip) {
45454
+ continue;
45455
+ }
45448
45456
  if (nodePredicate(replacement)) {
45449
45457
  node = replacement;
45450
45458
  } else {
45451
45459
  continue;
45452
45460
  }
45453
45461
  }
45462
+ } else if (currentPath.shouldSkip) {
45463
+ if (!isLeaving) {
45464
+ continue;
45465
+ }
45454
45466
  } else if (result !== undefined) {
45455
45467
  // Support return value replacement for backwards compatibility
45456
45468
  edits.push([key, result]);
@@ -45552,6 +45564,7 @@ const traverse = (root, visitor, options = {}) => {
45552
45564
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
45553
45565
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
45554
45566
  detectCycles: options.detectCycles ?? true,
45567
+ skipVisited: options.skipVisited ?? false,
45555
45568
  mutable: options.mutable ?? false,
45556
45569
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
45557
45570
  };
@@ -45583,6 +45596,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
45583
45596
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
45584
45597
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
45585
45598
  detectCycles: options.detectCycles ?? true,
45599
+ skipVisited: options.skipVisited ?? false,
45586
45600
  mutable: options.mutable ?? false,
45587
45601
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
45588
45602
  };