@swagger-api/apidom-parser-adapter-api-design-systems-yaml 1.2.1 → 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,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.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-api-design-systems-yaml
|
|
9
|
+
|
|
6
10
|
## [1.2.1](https://github.com/swagger-api/apidom/compare/v1.2.0...v1.2.1) (2026-01-16)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-api-design-systems-yaml
|
|
@@ -14941,7 +14941,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14941
14941
|
const detect = async source => {
|
|
14942
14942
|
try {
|
|
14943
14943
|
const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
14944
|
-
|
|
14944
|
+
const isError = !cst.rootNode.isError;
|
|
14945
|
+
cst.delete();
|
|
14946
|
+
return isError;
|
|
14945
14947
|
} catch {
|
|
14946
14948
|
return false;
|
|
14947
14949
|
}
|
|
@@ -14962,9 +14964,11 @@ const parse = async (source, {
|
|
|
14962
14964
|
sourceMap = false
|
|
14963
14965
|
} = {}) => {
|
|
14964
14966
|
const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
14965
|
-
|
|
14967
|
+
const syntacticAnalysisResult = (0,_syntactic_analysis_indirect_index_mjs__WEBPACK_IMPORTED_MODULE_3__["default"])(cst, {
|
|
14966
14968
|
sourceMap
|
|
14967
14969
|
});
|
|
14970
|
+
cst.delete();
|
|
14971
|
+
return syntacticAnalysisResult;
|
|
14968
14972
|
};
|
|
14969
14973
|
|
|
14970
14974
|
/***/ }),
|
|
@@ -19138,13 +19142,6 @@ let parser = null;
|
|
|
19138
19142
|
let parserInitLock = null;
|
|
19139
19143
|
let currentTree = null;
|
|
19140
19144
|
|
|
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
|
-
};
|
|
19147
|
-
|
|
19148
19145
|
/**
|
|
19149
19146
|
* Lexical Analysis of source string using WebTreeSitter.
|
|
19150
19147
|
* This is WebAssembly version of TreeSitters Lexical Analysis.
|
|
@@ -19154,7 +19151,6 @@ const releaseResources = () => {
|
|
|
19154
19151
|
* @public
|
|
19155
19152
|
*/
|
|
19156
19153
|
const analyze = async source => {
|
|
19157
|
-
releaseResources();
|
|
19158
19154
|
if (parser === null && parserInitLock === null) {
|
|
19159
19155
|
// acquire lock
|
|
19160
19156
|
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 => {
|
|
@@ -19173,6 +19169,7 @@ const analyze = async source => {
|
|
|
19173
19169
|
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_3__["default"]('Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.');
|
|
19174
19170
|
}
|
|
19175
19171
|
currentTree = parser.parse(source);
|
|
19172
|
+
parser.reset();
|
|
19176
19173
|
return currentTree;
|
|
19177
19174
|
};
|
|
19178
19175
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (analyze);
|