@swagger-api/apidom-parser-adapter-arazzo-yaml-1 1.2.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,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
|
+
## [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-yaml-1
|
|
9
|
+
|
|
6
10
|
# [1.2.0](https://github.com/swagger-api/apidom/compare/v1.1.0...v1.2.0) (2026-01-14)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-arazzo-yaml-1
|
|
@@ -23930,6 +23930,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23930
23930
|
|
|
23931
23931
|
let parser = null;
|
|
23932
23932
|
let parserInitLock = null;
|
|
23933
|
+
let currentTree = null;
|
|
23934
|
+
|
|
23935
|
+
// clear the old Wasm-allocated tree & reset the parser state
|
|
23936
|
+
const releaseResources = () => {
|
|
23937
|
+
var _currentTree, _parser;
|
|
23938
|
+
(_currentTree = currentTree) === null || _currentTree === void 0 || _currentTree.delete();
|
|
23939
|
+
(_parser = parser) === null || _parser === void 0 || _parser.reset();
|
|
23940
|
+
};
|
|
23933
23941
|
|
|
23934
23942
|
/**
|
|
23935
23943
|
* Lexical Analysis of source string using WebTreeSitter.
|
|
@@ -23940,6 +23948,7 @@ let parserInitLock = null;
|
|
|
23940
23948
|
* @public
|
|
23941
23949
|
*/
|
|
23942
23950
|
const analyze = async source => {
|
|
23951
|
+
releaseResources();
|
|
23943
23952
|
if (parser === null && parserInitLock === null) {
|
|
23944
23953
|
// acquire lock
|
|
23945
23954
|
parserInitLock = web_tree_sitter__WEBPACK_IMPORTED_MODULE_1__.init().then(() => web_tree_sitter__WEBPACK_IMPORTED_MODULE_1__.Language.load(_wasm_tree_sitter_yaml_wasm__WEBPACK_IMPORTED_MODULE_2__["default"])).then(jsonLanguage => {
|
|
@@ -23957,7 +23966,8 @@ const analyze = async source => {
|
|
|
23957
23966
|
} else if (parser === null) {
|
|
23958
23967
|
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_3__["default"]('Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.');
|
|
23959
23968
|
}
|
|
23960
|
-
|
|
23969
|
+
currentTree = parser.parse(source);
|
|
23970
|
+
return currentTree;
|
|
23961
23971
|
};
|
|
23962
23972
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (analyze);
|
|
23963
23973
|
|