@swagger-api/apidom-parser-adapter-asyncapi-json-2 0.99.0 → 0.99.1

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
+ ## [0.99.1](https://github.com/swagger-api/apidom/compare/v0.99.0...v0.99.1) (2024-04-05)
7
+
8
+ **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-asyncapi-json-2
9
+
6
10
  # [0.99.0](https://github.com/swagger-api/apidom/compare/v0.98.3...v0.99.0) (2024-04-03)
7
11
 
8
12
  **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-asyncapi-json-2
@@ -16448,6 +16448,14 @@ const mergeAll = (visitors, {
16448
16448
  const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(currentNode), false);
16449
16449
  if (typeof visitFn === 'function') {
16450
16450
  const result = visitFn.call(visitors[i], currentNode, ...rest);
16451
+
16452
+ // check if the visitor is async
16453
+ if (typeof (result === null || result === void 0 ? void 0 : result.then) === 'function') {
16454
+ throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"]('Async visitor not supported in sync mode', {
16455
+ visitor: visitors[i],
16456
+ visitFn
16457
+ });
16458
+ }
16451
16459
  if (result === skipVisitingNodeSymbol) {
16452
16460
  skipping[i] = node;
16453
16461
  } else if (result === breakSymbol) {
@@ -16473,6 +16481,14 @@ const mergeAll = (visitors, {
16473
16481
  const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(node), true);
16474
16482
  if (typeof visitFn === 'function') {
16475
16483
  const result = visitFn.call(visitors[i], node, ...rest);
16484
+
16485
+ // check if the visitor is async
16486
+ if (typeof (result === null || result === void 0 ? void 0 : result.then) === 'function') {
16487
+ throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"]('Async visitor not supported in sync mode', {
16488
+ visitor: visitors[i],
16489
+ visitFn
16490
+ });
16491
+ }
16476
16492
  if (result === breakSymbol) {
16477
16493
  skipping[i] = breakSymbol;
16478
16494
  } else if (result !== undefined && result !== skipVisitingNodeSymbol) {
@@ -16716,6 +16732,7 @@ visitor, {
16716
16732
  }
16717
16733
  let result;
16718
16734
  if (!Array.isArray(node)) {
16735
+ var _result;
16719
16736
  if (!nodePredicate(node)) {
16720
16737
  throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"](`Invalid AST Node: ${String(node)}`, {
16721
16738
  node
@@ -16737,6 +16754,14 @@ visitor, {
16737
16754
  // retrieve result
16738
16755
  result = visitFn.call(visitor, node, key, parent, path, ancestors);
16739
16756
  }
16757
+
16758
+ // check if the visitor is async
16759
+ if (typeof ((_result = result) === null || _result === void 0 ? void 0 : _result.then) === 'function') {
16760
+ throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"]('Async visitor not supported in sync mode', {
16761
+ visitor,
16762
+ visitFn
16763
+ });
16764
+ }
16740
16765
  if (result === breakSymbol) {
16741
16766
  break;
16742
16767
  }