@swagger-api/apidom-parser-adapter-api-design-systems-yaml 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-api-design-systems-yaml
|
|
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-api-design-systems-yaml
|
|
@@ -19136,6 +19136,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19136
19136
|
|
|
19137
19137
|
let parser = null;
|
|
19138
19138
|
let parserInitLock = null;
|
|
19139
|
+
let currentTree = null;
|
|
19140
|
+
|
|
19141
|
+
// clear the old Wasm-allocated tree & reset the parser state
|
|
19142
|
+
const releaseResources = () => {
|
|
19143
|
+
var _currentTree, _parser;
|
|
19144
|
+
(_currentTree = currentTree) === null || _currentTree === void 0 || _currentTree.delete();
|
|
19145
|
+
(_parser = parser) === null || _parser === void 0 || _parser.reset();
|
|
19146
|
+
};
|
|
19139
19147
|
|
|
19140
19148
|
/**
|
|
19141
19149
|
* Lexical Analysis of source string using WebTreeSitter.
|
|
@@ -19146,6 +19154,7 @@ let parserInitLock = null;
|
|
|
19146
19154
|
* @public
|
|
19147
19155
|
*/
|
|
19148
19156
|
const analyze = async source => {
|
|
19157
|
+
releaseResources();
|
|
19149
19158
|
if (parser === null && parserInitLock === null) {
|
|
19150
19159
|
// acquire lock
|
|
19151
19160
|
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 => {
|
|
@@ -19163,7 +19172,8 @@ const analyze = async source => {
|
|
|
19163
19172
|
} else if (parser === null) {
|
|
19164
19173
|
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_3__["default"]('Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.');
|
|
19165
19174
|
}
|
|
19166
|
-
|
|
19175
|
+
currentTree = parser.parse(source);
|
|
19176
|
+
return currentTree;
|
|
19167
19177
|
};
|
|
19168
19178
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (analyze);
|
|
19169
19179
|
|