codemirror / lang-example

Example/template repository for building a language package
MIT License
69 stars 43 forks source link

Update dependencies to latest versions (including lezer/generator from 1.0.0 to 1.7.1) #20

Closed dylanbeattie closed 3 months ago

dylanbeattie commented 3 months ago

The instructions at https://codemirror.net/examples/lang-package/ on how to create your own language package for CodeMirror refer to this repo (https://github.com/codemirror/lang-example.)

I cloned the repo and began working through the instructions at https://lezer.codemirror.net/docs/guide/#writing-a-grammar and quickly hit the error:

Unexpected token '@asciiLetter'

which led me to https://discuss.codemirror.net/t/generator-throws-error-on-docs-example/5008, in which @marijnh comments:

Could it be you’re using an older version of lezer-generator? That syntax (@asciiLetter) was introduced in 1.1.0.

...and sure enough, lang-example still depends on @lezer/generator 1.0.0.

Looks like it hasn't been updated in a few years, so this PR bumps the various dependencies to their latest versions:

dependencies:

devDependencies:

marijnh commented 3 months ago

What were you using to install these dependencies? Both yarn and npm should automatically install the highest available version that matches the range given in the dependency declaration when you initially install.

dylanbeattie commented 3 months ago

You're right. Whatever the problem was, it wasn't that. Sorry for wasting your time.