@swagger-api/apidom-parser-adapter-arazzo-json-1 1.1.0 → 1.2.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,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.1](https://github.com/swagger-api/apidom/compare/v1.2.0...v1.2.1) (2026-01-16)
7
+
8
+ **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-arazzo-json-1
9
+
10
+ # [1.2.0](https://github.com/swagger-api/apidom/compare/v1.1.0...v1.2.0) (2026-01-14)
11
+
12
+ **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-arazzo-json-1
13
+
6
14
  # [1.1.0](https://github.com/swagger-api/apidom/compare/v1.0.2...v1.1.0) (2025-12-19)
7
15
 
8
16
  **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-arazzo-json-1
@@ -27613,6 +27613,14 @@ __webpack_require__.r(__webpack_exports__);
27613
27613
 
27614
27614
  let parser = null;
27615
27615
  let parserInitLock = null;
27616
+ let currentTree = null;
27617
+
27618
+ // clear the old Wasm-allocated tree & reset the parser state
27619
+ const releaseResources = () => {
27620
+ var _currentTree, _parser;
27621
+ (_currentTree = currentTree) === null || _currentTree === void 0 || _currentTree.delete();
27622
+ (_parser = parser) === null || _parser === void 0 || _parser.reset();
27623
+ };
27616
27624
 
27617
27625
  /**
27618
27626
  * Lexical Analysis of source string using WebTreeSitter.
@@ -27623,6 +27631,7 @@ let parserInitLock = null;
27623
27631
  * @public
27624
27632
  */
27625
27633
  const analyze = async source => {
27634
+ releaseResources();
27626
27635
  if (parser === null && parserInitLock === null) {
27627
27636
  // acquire lock
27628
27637
  parserInitLock = web_tree_sitter__WEBPACK_IMPORTED_MODULE_1__.init().then(() => web_tree_sitter__WEBPACK_IMPORTED_MODULE_1__.Language.load(_wasm_tree_sitter_json_wasm__WEBPACK_IMPORTED_MODULE_2__["default"])).then(jsonLanguage => {
@@ -27640,7 +27649,8 @@ const analyze = async source => {
27640
27649
  } else if (parser === null) {
27641
27650
  throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_3__["default"]('Error while initializing web-tree-sitter and loading tree-sitter-json grammar.');
27642
27651
  }
27643
- return parser.parse(source);
27652
+ currentTree = parser.parse(source);
27653
+ return currentTree;
27644
27654
  };
27645
27655
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (analyze);
27646
27656