@speclynx/apidom-parser-adapter-openapi-json-3-1 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-json-3-1
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-json-3-1
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-json-3-1
@@ -40457,10 +40457,12 @@ function* traverseGenerator(root, visitor, options) {
40457
40457
  nodePredicate,
40458
40458
  nodeCloneFn,
40459
40459
  detectCycles,
40460
+ skipVisited,
40460
40461
  mutable,
40461
40462
  mutationFn
40462
40463
  } = options;
40463
40464
  const keyMapIsFunction = typeof keyMap === 'function';
40465
+ const visitedNodes = skipVisited ? new WeakSet() : null;
40464
40466
  let stack;
40465
40467
  let inArray = Array.isArray(root);
40466
40468
  let keys = [root];
@@ -40546,6 +40548,14 @@ function* traverseGenerator(root, visitor, options) {
40546
40548
  continue;
40547
40549
  }
40548
40550
 
40551
+ // Skip already-visited nodes (handles DAG structures from cloneShallow)
40552
+ if (skipVisited && !isLeaving) {
40553
+ if (visitedNodes.has(node)) {
40554
+ continue;
40555
+ }
40556
+ visitedNodes.add(node);
40557
+ }
40558
+
40549
40559
  // Always create Path for the current node (needed for parentPath chain)
40550
40560
  currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
40551
40561
  const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
@@ -40566,11 +40576,6 @@ function* traverseGenerator(root, visitor, options) {
40566
40576
  if (currentPath.shouldStop) {
40567
40577
  break;
40568
40578
  }
40569
- if (currentPath.shouldSkip) {
40570
- if (!isLeaving) {
40571
- continue;
40572
- }
40573
- }
40574
40579
  if (currentPath.removed) {
40575
40580
  edits.push([key, null]);
40576
40581
  if (!isLeaving) {
@@ -40580,12 +40585,19 @@ function* traverseGenerator(root, visitor, options) {
40580
40585
  const replacement = currentPath._getReplacementNode();
40581
40586
  edits.push([key, replacement]);
40582
40587
  if (!isLeaving) {
40588
+ if (currentPath.shouldSkip) {
40589
+ continue;
40590
+ }
40583
40591
  if (nodePredicate(replacement)) {
40584
40592
  node = replacement;
40585
40593
  } else {
40586
40594
  continue;
40587
40595
  }
40588
40596
  }
40597
+ } else if (currentPath.shouldSkip) {
40598
+ if (!isLeaving) {
40599
+ continue;
40600
+ }
40589
40601
  } else if (result !== undefined) {
40590
40602
  // Support return value replacement for backwards compatibility
40591
40603
  edits.push([key, result]);
@@ -40687,6 +40699,7 @@ const traverse = (root, visitor, options = {}) => {
40687
40699
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
40688
40700
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
40689
40701
  detectCycles: options.detectCycles ?? true,
40702
+ skipVisited: options.skipVisited ?? false,
40690
40703
  mutable: options.mutable ?? false,
40691
40704
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
40692
40705
  };
@@ -40718,6 +40731,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
40718
40731
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
40719
40732
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
40720
40733
  detectCycles: options.detectCycles ?? true,
40734
+ skipVisited: options.skipVisited ?? false,
40721
40735
  mutable: options.mutable ?? false,
40722
40736
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
40723
40737
  };