@swagger-api/apidom-parser-adapter-openapi-yaml-3-1 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-openapi-yaml-3-1
|
|
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-openapi-yaml-3-1
|
|
@@ -31631,13 +31631,6 @@ let parser = null;
|
|
|
31631
31631
|
let parserInitLock = null;
|
|
31632
31632
|
let currentTree = null;
|
|
31633
31633
|
|
|
31634
|
-
// clear the old Wasm-allocated tree & reset the parser state
|
|
31635
|
-
const releaseResources = () => {
|
|
31636
|
-
var _currentTree, _parser;
|
|
31637
|
-
(_currentTree = currentTree) === null || _currentTree === void 0 || _currentTree.delete();
|
|
31638
|
-
(_parser = parser) === null || _parser === void 0 || _parser.reset();
|
|
31639
|
-
};
|
|
31640
|
-
|
|
31641
31634
|
/**
|
|
31642
31635
|
* Lexical Analysis of source string using WebTreeSitter.
|
|
31643
31636
|
* This is WebAssembly version of TreeSitters Lexical Analysis.
|
|
@@ -31647,7 +31640,6 @@ const releaseResources = () => {
|
|
|
31647
31640
|
* @public
|
|
31648
31641
|
*/
|
|
31649
31642
|
const analyze = async source => {
|
|
31650
|
-
releaseResources();
|
|
31651
31643
|
if (parser === null && parserInitLock === null) {
|
|
31652
31644
|
// acquire lock
|
|
31653
31645
|
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 => {
|
|
@@ -31666,6 +31658,7 @@ const analyze = async source => {
|
|
|
31666
31658
|
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_3__["default"]('Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.');
|
|
31667
31659
|
}
|
|
31668
31660
|
currentTree = parser.parse(source);
|
|
31661
|
+
parser.reset();
|
|
31669
31662
|
return currentTree;
|
|
31670
31663
|
};
|
|
31671
31664
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (analyze);
|
|
@@ -38422,7 +38415,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38422
38415
|
const detect = async source => {
|
|
38423
38416
|
try {
|
|
38424
38417
|
const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
38425
|
-
|
|
38418
|
+
const isError = !cst.rootNode.isError;
|
|
38419
|
+
cst.delete();
|
|
38420
|
+
return isError;
|
|
38426
38421
|
} catch {
|
|
38427
38422
|
return false;
|
|
38428
38423
|
}
|
|
@@ -38443,9 +38438,11 @@ const parse = async (source, {
|
|
|
38443
38438
|
sourceMap = false
|
|
38444
38439
|
} = {}) => {
|
|
38445
38440
|
const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
38446
|
-
|
|
38441
|
+
const syntacticAnalysisResult = (0,_syntactic_analysis_indirect_index_mjs__WEBPACK_IMPORTED_MODULE_3__["default"])(cst, {
|
|
38447
38442
|
sourceMap
|
|
38448
38443
|
});
|
|
38444
|
+
cst.delete();
|
|
38445
|
+
return syntacticAnalysisResult;
|
|
38449
38446
|
};
|
|
38450
38447
|
|
|
38451
38448
|
/***/ }),
|