@swagger-api/apidom-parser-adapter-arazzo-yaml-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-arazzo-yaml-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-arazzo-yaml-1
|
|
@@ -23932,13 +23932,6 @@ let parser = null;
|
|
|
23932
23932
|
let parserInitLock = null;
|
|
23933
23933
|
let currentTree = null;
|
|
23934
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
|
-
};
|
|
23941
|
-
|
|
23942
23935
|
/**
|
|
23943
23936
|
* Lexical Analysis of source string using WebTreeSitter.
|
|
23944
23937
|
* This is WebAssembly version of TreeSitters Lexical Analysis.
|
|
@@ -23948,7 +23941,6 @@ const releaseResources = () => {
|
|
|
23948
23941
|
* @public
|
|
23949
23942
|
*/
|
|
23950
23943
|
const analyze = async source => {
|
|
23951
|
-
releaseResources();
|
|
23952
23944
|
if (parser === null && parserInitLock === null) {
|
|
23953
23945
|
// acquire lock
|
|
23954
23946
|
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 => {
|
|
@@ -23967,6 +23959,7 @@ const analyze = async source => {
|
|
|
23967
23959
|
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_3__["default"]('Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.');
|
|
23968
23960
|
}
|
|
23969
23961
|
currentTree = parser.parse(source);
|
|
23962
|
+
parser.reset();
|
|
23970
23963
|
return currentTree;
|
|
23971
23964
|
};
|
|
23972
23965
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (analyze);
|
|
@@ -28830,7 +28823,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28830
28823
|
const detect = async source => {
|
|
28831
28824
|
try {
|
|
28832
28825
|
const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
28833
|
-
|
|
28826
|
+
const isError = !cst.rootNode.isError;
|
|
28827
|
+
cst.delete();
|
|
28828
|
+
return isError;
|
|
28834
28829
|
} catch {
|
|
28835
28830
|
return false;
|
|
28836
28831
|
}
|
|
@@ -28851,9 +28846,11 @@ const parse = async (source, {
|
|
|
28851
28846
|
sourceMap = false
|
|
28852
28847
|
} = {}) => {
|
|
28853
28848
|
const cst = await (0,_lexical_analysis_browser_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
28854
|
-
|
|
28849
|
+
const syntacticAnalysisResult = (0,_syntactic_analysis_indirect_index_mjs__WEBPACK_IMPORTED_MODULE_3__["default"])(cst, {
|
|
28855
28850
|
sourceMap
|
|
28856
28851
|
});
|
|
28852
|
+
cst.delete();
|
|
28853
|
+
return syntacticAnalysisResult;
|
|
28857
28854
|
};
|
|
28858
28855
|
|
|
28859
28856
|
/***/ }),
|