@speclynx/apidom-parser-adapter-openapi-yaml-3-0 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-3-0
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-3-0
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-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);
@@ -47737,11 +47747,6 @@ function* traverseGenerator(root, visitor, options) {
47737
47747
  if (currentPath.shouldStop) {
47738
47748
  break;
47739
47749
  }
47740
- if (currentPath.shouldSkip) {
47741
- if (!isLeaving) {
47742
- continue;
47743
- }
47744
- }
47745
47750
  if (currentPath.removed) {
47746
47751
  edits.push([key, null]);
47747
47752
  if (!isLeaving) {
@@ -47751,12 +47756,19 @@ function* traverseGenerator(root, visitor, options) {
47751
47756
  const replacement = currentPath._getReplacementNode();
47752
47757
  edits.push([key, replacement]);
47753
47758
  if (!isLeaving) {
47759
+ if (currentPath.shouldSkip) {
47760
+ continue;
47761
+ }
47754
47762
  if (nodePredicate(replacement)) {
47755
47763
  node = replacement;
47756
47764
  } else {
47757
47765
  continue;
47758
47766
  }
47759
47767
  }
47768
+ } else if (currentPath.shouldSkip) {
47769
+ if (!isLeaving) {
47770
+ continue;
47771
+ }
47760
47772
  } else if (result !== undefined) {
47761
47773
  // Support return value replacement for backwards compatibility
47762
47774
  edits.push([key, result]);
@@ -47858,6 +47870,7 @@ const traverse = (root, visitor, options = {}) => {
47858
47870
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
47859
47871
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
47860
47872
  detectCycles: options.detectCycles ?? true,
47873
+ skipVisited: options.skipVisited ?? false,
47861
47874
  mutable: options.mutable ?? false,
47862
47875
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
47863
47876
  };
@@ -47889,6 +47902,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
47889
47902
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
47890
47903
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
47891
47904
  detectCycles: options.detectCycles ?? true,
47905
+ skipVisited: options.skipVisited ?? false,
47892
47906
  mutable: options.mutable ?? false,
47893
47907
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
47894
47908
  };