@swagger-api/apidom-parser-adapter-yaml-1-2 1.7.0 → 1.8.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 +6 -0
- package/dist/{9341421b411b868e3994f2d852da162b.wasm → 77eb67fad227c765659b848dfcc82388.wasm} +0 -0
- package/dist/apidom-parser-adapter-yaml-1-2.browser.js +9 -6
- package/dist/apidom-parser-adapter-yaml-1-2.browser.min.js +1 -1
- package/package.json +5 -5
- package/src/lexical-analysis/analyze.cjs +34 -0
- package/src/lexical-analysis/analyze.mjs +29 -0
- package/src/lexical-analysis/browser.cjs +2 -28
- package/src/lexical-analysis/browser.mjs +3 -31
- package/src/lexical-analysis/node.cjs +11 -9
- package/src/lexical-analysis/node.mjs +11 -9
- package/wasm/tree-sitter-yaml.wasm +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.8.0](https://github.com/swagger-api/apidom/compare/v1.7.0...v1.8.0) (2026-03-20)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **parser-adapter-yaml-1-2:** use WebTreeSitter for Node.js lexical analysis ([#5139](https://github.com/swagger-api/apidom/issues/5139)) ([2ed9cab](https://github.com/swagger-api/apidom/commit/2ed9cab7bb35c618cfaf12198fd9517d42abbccb))
|
|
11
|
+
|
|
6
12
|
# [1.7.0](https://github.com/swagger-api/apidom/compare/v1.6.0...v1.7.0) (2026-03-17)
|
|
7
13
|
|
|
8
14
|
### Reverts
|
package/dist/{9341421b411b868e3994f2d852da162b.wasm → 77eb67fad227c765659b848dfcc82388.wasm}
RENAMED
|
Binary file
|
|
@@ -3509,6 +3509,8 @@
|
|
|
3509
3509
|
};
|
|
3510
3510
|
}
|
|
3511
3511
|
|
|
3512
|
+
const treeSitterYaml = (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__dirname + '/77eb67fad227c765659b848dfcc82388.wasm').href : new URL('77eb67fad227c765659b848dfcc82388.wasm', typeof document === 'undefined' ? location.href : document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI).href);
|
|
3513
|
+
|
|
3512
3514
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
3513
3515
|
|
|
3514
3516
|
function getDefaultExportFromCjs (x) {
|
|
@@ -9871,8 +9873,6 @@
|
|
|
9871
9873
|
*/
|
|
9872
9874
|
class NotImplementedError extends UnsupportedOperationError {}
|
|
9873
9875
|
|
|
9874
|
-
const treeSitterYaml = (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__dirname + '/9341421b411b868e3994f2d852da162b.wasm').href : new URL('9341421b411b868e3994f2d852da162b.wasm', typeof document === 'undefined' ? location.href : document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI).href);
|
|
9875
|
-
|
|
9876
9876
|
var __async$1 = (__this, __arguments, generator) => {
|
|
9877
9877
|
return new Promise((resolve, reject) => {
|
|
9878
9878
|
var fulfilled = (value) => {
|
|
@@ -9896,11 +9896,11 @@
|
|
|
9896
9896
|
let parser = null;
|
|
9897
9897
|
let parserInitLock = null;
|
|
9898
9898
|
let currentTree = null;
|
|
9899
|
-
const
|
|
9899
|
+
const createAnalyze = (treeSitterYaml) => (source) => __async$1(null, null, function* () {
|
|
9900
9900
|
if (parser === null && parserInitLock === null) {
|
|
9901
|
-
parserInitLock = Parser.init().then(() => Parser.Language.load(treeSitterYaml)).then((
|
|
9901
|
+
parserInitLock = Parser.init().then(() => Parser.Language.load(treeSitterYaml)).then((yamlLanguage) => {
|
|
9902
9902
|
const parserInstance = new Parser();
|
|
9903
|
-
parserInstance.setLanguage(
|
|
9903
|
+
parserInstance.setLanguage(yamlLanguage);
|
|
9904
9904
|
return parserInstance;
|
|
9905
9905
|
}).finally(() => {
|
|
9906
9906
|
parserInitLock = null;
|
|
@@ -9908,7 +9908,8 @@
|
|
|
9908
9908
|
parser = yield parserInitLock;
|
|
9909
9909
|
} else if (parser === null && parserInitLock !== null) {
|
|
9910
9910
|
parser = yield parserInitLock;
|
|
9911
|
-
}
|
|
9911
|
+
}
|
|
9912
|
+
if (parser === null) {
|
|
9912
9913
|
throw new ApiDOMError(
|
|
9913
9914
|
"Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar."
|
|
9914
9915
|
);
|
|
@@ -9918,6 +9919,8 @@
|
|
|
9918
9919
|
return currentTree;
|
|
9919
9920
|
});
|
|
9920
9921
|
|
|
9922
|
+
const analyze$1 = createAnalyze(treeSitterYaml);
|
|
9923
|
+
|
|
9921
9924
|
/**
|
|
9922
9925
|
* @public
|
|
9923
9926
|
*/
|