@swagger-api/apidom-parser-adapter-api-design-systems-yaml 1.7.0 → 1.9.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.9.0](https://github.com/swagger-api/apidom/compare/v1.8.0...v1.9.0) (2026-03-30)
7
+
8
+ **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-api-design-systems-yaml
9
+
10
+ # [1.8.0](https://github.com/swagger-api/apidom/compare/v1.7.0...v1.8.0) (2026-03-20)
11
+
12
+ **Note:** Version bump only for package @swagger-api/apidom-parser-adapter-api-design-systems-yaml
13
+
6
14
  # [1.7.0](https://github.com/swagger-api/apidom/compare/v1.6.0...v1.7.0) (2026-03-17)
7
15
 
8
16
  ### Reverts
@@ -15345,6 +15345,8 @@
15345
15345
  };
15346
15346
  }
15347
15347
 
15348
+ 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);
15349
+
15348
15350
  var treeSitter = {exports: {}};
15349
15351
 
15350
15352
  var hasRequiredTreeSitter;
@@ -18579,26 +18581,15 @@
18579
18581
  var treeSitterExports = requireTreeSitter();
18580
18582
  const Parser = /*@__PURE__*/getDefaultExportFromCjs(treeSitterExports);
18581
18583
 
18582
- 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);
18583
-
18584
18584
  let parser = null;
18585
18585
  let parserInitLock = null;
18586
18586
  let currentTree = null;
18587
-
18588
- /**
18589
- * Lexical Analysis of source string using WebTreeSitter.
18590
- * This is WebAssembly version of TreeSitters Lexical Analysis.
18591
- *
18592
- * Given JavaScript doesn't support true parallelism, this
18593
- * code should be as lazy as possible and temporal safety should be fine.
18594
- * @public
18595
- */
18596
- const analyze$1 = async source => {
18587
+ const createAnalyze = treeSitterYaml => async source => {
18597
18588
  if (parser === null && parserInitLock === null) {
18598
18589
  // acquire lock
18599
- parserInitLock = Parser.init().then(() => Parser.Language.load(treeSitterYaml)).then(jsonLanguage => {
18590
+ parserInitLock = Parser.init().then(() => Parser.Language.load(treeSitterYaml)).then(yamlLanguage => {
18600
18591
  const parserInstance = new Parser();
18601
- parserInstance.setLanguage(jsonLanguage);
18592
+ parserInstance.setLanguage(yamlLanguage);
18602
18593
  return parserInstance;
18603
18594
  }).finally(() => {
18604
18595
  // release lock
@@ -18608,14 +18599,28 @@
18608
18599
  } else if (parser === null && parserInitLock !== null) {
18609
18600
  // await for lock to be released if there is one
18610
18601
  parser = await parserInitLock;
18611
- } else if (parser === null) {
18602
+ }
18603
+ if (parser === null) {
18612
18604
  throw new ApiDOMError('Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.');
18613
18605
  }
18606
+ if (currentTree !== null) {
18607
+ currentTree.delete();
18608
+ }
18614
18609
  currentTree = parser.parse(source);
18615
18610
  parser.reset();
18616
18611
  return currentTree;
18617
18612
  };
18618
18613
 
18614
+ /**
18615
+ * Lexical Analysis of source string using WebTreeSitter.
18616
+ * This is WebAssembly version of TreeSitters Lexical Analysis.
18617
+ *
18618
+ * Given JavaScript doesn't support true parallelism, this
18619
+ * code should be as lazy as possible and temporal safety should be fine.
18620
+ * @public
18621
+ */
18622
+ const analyze$1 = createAnalyze(treeSitterYaml);
18623
+
18619
18624
  class TreeCursorSyntaxNode {
18620
18625
  type;
18621
18626
  startPositionRow;