@swagger-api/apidom-parser-adapter-arazzo-json-1 1.2.1 → 1.3.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
|
+
# [1.3.0](https://github.com/swagger-api/apidom/compare/v1.2.2...v1.3.0) (2026-01-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-arazzo-json-1
|
|
9
|
+
|
|
10
|
+
## [1.2.2](https://github.com/swagger-api/apidom/compare/v1.2.1...v1.2.2) (2026-01-16)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-arazzo-json-1
|
|
13
|
+
|
|
6
14
|
## [1.2.1](https://github.com/swagger-api/apidom/compare/v1.2.0...v1.2.1) (2026-01-16)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-arazzo-json-1
|
|
@@ -3561,7 +3561,9 @@ const detect = async source => {
|
|
|
3561
3561
|
}
|
|
3562
3562
|
try {
|
|
3563
3563
|
const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
3564
|
-
|
|
3564
|
+
const isError = cst.rootNode.type !== 'ERROR';
|
|
3565
|
+
cst.delete();
|
|
3566
|
+
return isError;
|
|
3565
3567
|
} catch {
|
|
3566
3568
|
return false;
|
|
3567
3569
|
}
|
|
@@ -3593,6 +3595,7 @@ const parse = async (source, {
|
|
|
3593
3595
|
sourceMap
|
|
3594
3596
|
});
|
|
3595
3597
|
}
|
|
3598
|
+
cst.delete();
|
|
3596
3599
|
return apiDOM;
|
|
3597
3600
|
};
|
|
3598
3601
|
|
|
@@ -27615,13 +27618,6 @@ let parser = null;
|
|
|
27615
27618
|
let parserInitLock = null;
|
|
27616
27619
|
let currentTree = null;
|
|
27617
27620
|
|
|
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
|
-
};
|
|
27624
|
-
|
|
27625
27621
|
/**
|
|
27626
27622
|
* Lexical Analysis of source string using WebTreeSitter.
|
|
27627
27623
|
* This is WebAssembly version of TreeSitters Lexical Analysis.
|
|
@@ -27631,7 +27627,6 @@ const releaseResources = () => {
|
|
|
27631
27627
|
* @public
|
|
27632
27628
|
*/
|
|
27633
27629
|
const analyze = async source => {
|
|
27634
|
-
releaseResources();
|
|
27635
27630
|
if (parser === null && parserInitLock === null) {
|
|
27636
27631
|
// acquire lock
|
|
27637
27632
|
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 => {
|
|
@@ -27650,6 +27645,7 @@ const analyze = async source => {
|
|
|
27650
27645
|
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_3__["default"]('Error while initializing web-tree-sitter and loading tree-sitter-json grammar.');
|
|
27651
27646
|
}
|
|
27652
27647
|
currentTree = parser.parse(source);
|
|
27648
|
+
parser.reset();
|
|
27653
27649
|
return currentTree;
|
|
27654
27650
|
};
|
|
27655
27651
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (analyze);
|