shikijs / textmate-grammars-themes

Collection of TextMate grammars and themes in JSON
https://textmate-grammars-themes.netlify.app/
MIT License
116 stars 57 forks source link

`pnpm run fetch` errors with `Failed to parse gherkin from ...` #61

Closed WesleyBatista closed 6 months ago

WesleyBatista commented 6 months ago

Getting the following while getting started with the repo:

...
 grammar  Fetched dax
 grammar  Fetched desktop
 grammar  Fetched elm
 grammar  Fetched erb
 grammar  Fetched elixir
 grammar  Fetched erlang
 grammar  Fetched fennel
Failed to parse gherkin from https://github.com/alexkrechik/VSCucumberAutoComplete/blob/fbb554addf81e8961b58b1577924af10fecf9694/gclient/syntaxes/feature.tmLanguage

file:///path/to/textmate-grammars-themes/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:1273
  return new exception(message, mark);
         ^
YAMLException: end of the stream or a document separator is expected (210:75)

 207 |  ... 
 208 |  ... 
 209 |  ... 
 210 |  ... e-responsive" style="word-wrap: break-word;">
------------------------------------------^
 211 |  ... nv-production page-responsive" style="word-wrap: break-word;">
 212 |  ... 
    at generateError (file:///path/to/textmate-grammars-themes/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:1273:10)
    at throwError (file:///path/to/textmate-grammars-themes/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:1277:9)
    at readDocument (file:///path/to/textmate-grammars-themes/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:2735:5)
    at loadDocuments (file:///path/to/textmate-grammars-themes/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:2778:5)
    at Object.load$1 [as load] (file:///path/to/textmate-grammars-themes/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:2804:19)
    at parseYaml (/path/to/textmate-grammars-themes/scripts/shared/parse.ts:20:15)
    at parseFile (/path/to/textmate-grammars-themes/scripts/shared/parse.ts:44:14)
    at fetchGrammar (/path/to/textmate-grammars-themes/scripts/grammars/fetch.ts:112:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at <anonymous> (/path/to/textmate-grammars-themes/scripts/grammars/fetch.ts:40:39) {
  reason: 'end of the stream or a document separator is expected',
  mark: {
    name: null,
    buffer: '\n' +
      '\n' +
      '\n' +
      '\n' +
      '\n' +
      '\n' +
      '<!DOCTYPE html>\n' +
      '<html\n' +
WesleyBatista commented 6 months ago

This url pointing to master is returning 404:

https://github.com/shikijs/textmate-grammars-themes/blob/0919d20f3f27bb337dd1574eecea5712b107b672/sources-grammars.ts#L575

There were recent changes in that repo, moving the file from gclient/syntaxes/feature.tmLanguage to syntaxes/feature.tmLanguage.json: Screenshot 2024-05-19 at 14 02 45