@speclynx/apidom-parser-adapter-asyncapi-json-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-asyncapi-json-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-asyncapi-json-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-asyncapi-json-2
@@ -42758,10 +42758,12 @@ function* traverseGenerator(root, visitor, options) {
42758
42758
  nodePredicate,
42759
42759
  nodeCloneFn,
42760
42760
  detectCycles,
42761
+ skipVisited,
42761
42762
  mutable,
42762
42763
  mutationFn
42763
42764
  } = options;
42764
42765
  const keyMapIsFunction = typeof keyMap === 'function';
42766
+ const visitedNodes = skipVisited ? new WeakSet() : null;
42765
42767
  let stack;
42766
42768
  let inArray = Array.isArray(root);
42767
42769
  let keys = [root];
@@ -42847,6 +42849,14 @@ function* traverseGenerator(root, visitor, options) {
42847
42849
  continue;
42848
42850
  }
42849
42851
 
42852
+ // Skip already-visited nodes (handles DAG structures from cloneShallow)
42853
+ if (skipVisited && !isLeaving) {
42854
+ if (visitedNodes.has(node)) {
42855
+ continue;
42856
+ }
42857
+ visitedNodes.add(node);
42858
+ }
42859
+
42850
42860
  // Always create Path for the current node (needed for parentPath chain)
42851
42861
  currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
42852
42862
  const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
@@ -42867,11 +42877,6 @@ function* traverseGenerator(root, visitor, options) {
42867
42877
  if (currentPath.shouldStop) {
42868
42878
  break;
42869
42879
  }
42870
- if (currentPath.shouldSkip) {
42871
- if (!isLeaving) {
42872
- continue;
42873
- }
42874
- }
42875
42880
  if (currentPath.removed) {
42876
42881
  edits.push([key, null]);
42877
42882
  if (!isLeaving) {
@@ -42881,12 +42886,19 @@ function* traverseGenerator(root, visitor, options) {
42881
42886
  const replacement = currentPath._getReplacementNode();
42882
42887
  edits.push([key, replacement]);
42883
42888
  if (!isLeaving) {
42889
+ if (currentPath.shouldSkip) {
42890
+ continue;
42891
+ }
42884
42892
  if (nodePredicate(replacement)) {
42885
42893
  node = replacement;
42886
42894
  } else {
42887
42895
  continue;
42888
42896
  }
42889
42897
  }
42898
+ } else if (currentPath.shouldSkip) {
42899
+ if (!isLeaving) {
42900
+ continue;
42901
+ }
42890
42902
  } else if (result !== undefined) {
42891
42903
  // Support return value replacement for backwards compatibility
42892
42904
  edits.push([key, result]);
@@ -42988,6 +43000,7 @@ const traverse = (root, visitor, options = {}) => {
42988
43000
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
42989
43001
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
42990
43002
  detectCycles: options.detectCycles ?? true,
43003
+ skipVisited: options.skipVisited ?? false,
42991
43004
  mutable: options.mutable ?? false,
42992
43005
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
42993
43006
  };
@@ -43019,6 +43032,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
43019
43032
  nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
43020
43033
  nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
43021
43034
  detectCycles: options.detectCycles ?? true,
43035
+ skipVisited: options.skipVisited ?? false,
43022
43036
  mutable: options.mutable ?? false,
43023
43037
  mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
43024
43038
  };