@swagger-api/apidom-parser-adapter-openapi-json-3-1 1.2.0 → 1.2.2

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
+ ## [1.2.2](https://github.com/swagger-api/apidom/compare/v1.2.1...v1.2.2) (2026-01-16)
7
+
8
+ **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-json-3-1
9
+
10
+ ## [1.2.1](https://github.com/swagger-api/apidom/compare/v1.2.0...v1.2.1) (2026-01-16)
11
+
12
+ **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-json-3-1
13
+
6
14
  # [1.2.0](https://github.com/swagger-api/apidom/compare/v1.1.0...v1.2.0) (2026-01-14)
7
15
 
8
16
  **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-json-3-1
@@ -4343,7 +4343,9 @@ const detect = async source => {
4343
4343
  }
4344
4344
  try {
4345
4345
  const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
4346
- return cst.rootNode.type !== 'ERROR';
4346
+ const isError = cst.rootNode.type !== 'ERROR';
4347
+ cst.delete();
4348
+ return isError;
4347
4349
  } catch {
4348
4350
  return false;
4349
4351
  }
@@ -4375,6 +4377,7 @@ const parse = async (source, {
4375
4377
  sourceMap
4376
4378
  });
4377
4379
  }
4380
+ cst.delete();
4378
4381
  return apiDOM;
4379
4382
  };
4380
4383
 
@@ -37205,6 +37208,7 @@ __webpack_require__.r(__webpack_exports__);
37205
37208
 
37206
37209
  let parser = null;
37207
37210
  let parserInitLock = null;
37211
+ let currentTree = null;
37208
37212
 
37209
37213
  /**
37210
37214
  * Lexical Analysis of source string using WebTreeSitter.
@@ -37232,7 +37236,9 @@ const analyze = async source => {
37232
37236
  } else if (parser === null) {
37233
37237
  throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_3__["default"]('Error while initializing web-tree-sitter and loading tree-sitter-json grammar.');
37234
37238
  }
37235
- return parser.parse(source);
37239
+ currentTree = parser.parse(source);
37240
+ parser.reset();
37241
+ return currentTree;
37236
37242
  };
37237
37243
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (analyze);
37238
37244