@swagger-api/apidom-parser-adapter-openapi-yaml-2 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-openapi-yaml-2
|
|
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-openapi-yaml-2
|
|
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-openapi-yaml-2
|
|
@@ -23592,13 +23592,6 @@ let parser = null;
|
|
|
23592
23592
|
let parserInitLock = null;
|
|
23593
23593
|
let currentTree = null;
|
|
23594
23594
|
|
|
23595
|
-
// clear the old Wasm-allocated tree & reset the parser state
|
|
23596
|
-
const releaseResources = () => {
|
|
23597
|
-
var _currentTree, _parser;
|
|
23598
|
-
(_currentTree = currentTree) === null || _currentTree === void 0 || _currentTree.delete();
|
|
23599
|
-
(_parser = parser) === null || _parser === void 0 || _parser.reset();
|
|
23600
|
-
};
|
|
23601
|
-
|
|
23602
23595
|
/**
|
|
23603
23596
|
* Lexical Analysis of source string using WebTreeSitter.
|
|
23604
23597
|
* This is WebAssembly version of TreeSitters Lexical Analysis.
|
|
@@ -23608,7 +23601,6 @@ const releaseResources = () => {
|
|
|
23608
23601
|
* @public
|
|
23609
23602
|
*/
|
|
23610
23603
|
const analyze = async source => {
|
|
23611
|
-
releaseResources();
|
|
23612
23604
|
if (parser === null && parserInitLock === null) {
|
|
23613
23605
|
// acquire lock
|
|
23614
23606
|
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 => {
|
|
@@ -23627,6 +23619,7 @@ const analyze = async source => {
|
|
|
23627
23619
|
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_3__["default"]('Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.');
|
|
23628
23620
|
}
|
|
23629
23621
|
currentTree = parser.parse(source);
|
|
23622
|
+
parser.reset();
|
|
23630
23623
|
return currentTree;
|
|
23631
23624
|
};
|
|
23632
23625
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (analyze);
|
|
@@ -28701,7 +28694,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28701
28694
|
const detect = async source => {
|
|
28702
28695
|
try {
|
|
28703
28696
|
const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
28704
|
-
|
|
28697
|
+
const isError = !cst.rootNode.isError;
|
|
28698
|
+
cst.delete();
|
|
28699
|
+
return isError;
|
|
28705
28700
|
} catch {
|
|
28706
28701
|
return false;
|
|
28707
28702
|
}
|
|
@@ -28722,9 +28717,11 @@ const parse = async (source, {
|
|
|
28722
28717
|
sourceMap = false
|
|
28723
28718
|
} = {}) => {
|
|
28724
28719
|
const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
28725
|
-
|
|
28720
|
+
const syntacticAnalysisResult = (0,_syntactic_analysis_indirect_index_mjs__WEBPACK_IMPORTED_MODULE_3__["default"])(cst, {
|
|
28726
28721
|
sourceMap
|
|
28727
28722
|
});
|
|
28723
|
+
cst.delete();
|
|
28724
|
+
return syntacticAnalysisResult;
|
|
28728
28725
|
};
|
|
28729
28726
|
|
|
28730
28727
|
/***/ }),
|