@swagger-api/apidom-parser-adapter-json-schema-json-2020-12 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-json-schema-json-2020-12
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-json-schema-json-2020-12
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-json-schema-json-2020-12
@@ -3139,7 +3139,9 @@ const detect = async source => {
3139
3139
  }
3140
3140
  try {
3141
3141
  const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
3142
- return cst.rootNode.type !== 'ERROR';
3142
+ const isError = cst.rootNode.type !== 'ERROR';
3143
+ cst.delete();
3144
+ return isError;
3143
3145
  } catch {
3144
3146
  return false;
3145
3147
  }
@@ -3171,6 +3173,7 @@ const parse = async (source, {
3171
3173
  sourceMap
3172
3174
  });
3173
3175
  }
3176
+ cst.delete();
3174
3177
  return apiDOM;
3175
3178
  };
3176
3179
 
@@ -24360,6 +24363,7 @@ __webpack_require__.r(__webpack_exports__);
24360
24363
 
24361
24364
  let parser = null;
24362
24365
  let parserInitLock = null;
24366
+ let currentTree = null;
24363
24367
 
24364
24368
  /**
24365
24369
  * Lexical Analysis of source string using WebTreeSitter.
@@ -24387,7 +24391,9 @@ const analyze = async source => {
24387
24391
  } else if (parser === null) {
24388
24392
  throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_3__["default"]('Error while initializing web-tree-sitter and loading tree-sitter-json grammar.');
24389
24393
  }
24390
- return parser.parse(source);
24394
+ currentTree = parser.parse(source);
24395
+ parser.reset();
24396
+ return currentTree;
24391
24397
  };
24392
24398
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (analyze);
24393
24399