How to contribute to the development of Code Mirror 6 ?

Is there any particular guide on how to contribute to the development of CodeMirror 6 ? I can see the CodeMirror 5 repo has it’s own issues list and 6 has it’s own issues list, so that is a bit confusing.

Thank you ! :slightly_smiling_face:

It’s a different code base, so it makes sense that they have different issue trackers.

The general approach would be to clone the repository for the package you’re interested in, npm install it, make your changes, and submit a pull request against the repository.

If I clone down, say @codemirror/panel, after making said changes, how do I test the changes in a browser (to see the changes) ? That part is somewhat confusing (Maybe it’s documented somewhere and I have overlooked it ?).

Set up a test page and bundle the libraries you need for it into a script. Or, if you want to set up a dev environment with all the CM6-related packages, clone https://github.com/codemirror/codemirror.next/ and follow the instructions in the readme.

After going through the bin/cm.js script roughly, it looks like it provides helpers command line options for stuff & I can use the demo for testing. And there is also node bin/cm.js push which will look into any sub package for changes and push those into the respective repository (I believe).

Thanks for the help !

Running npm run dev in codemirror.next gives a lot of

'@codemirror/state' is imported by collab\src\collab.d.ts, but could not be resolved – treating it as an external dependency

and looking into the console (port 8090) I see Uncaught TypeError: Failed to resolve module specifier "@codemirror/basic-setup". Relative references must start with either "/", "./", or "../"..

Any idea (This is on Windows 10) ?

Did you run bin/cm.js install?

Yes, and that’s when I get all of those (this is just one statement, but it looks like every CodeMirror “subrepo” in codemirror.next is throwing atleast 2 or 3 of these)

'@codemirror/state' is imported by collab\src\collab.d.ts, but could not be resolved – treating it as an external dependency

Here’s the full output of node bin/cm.js install node bin/cm.js install output - Pastery (In case it helps)

Thank you for your time !

What does npm --version give you? You need at least npm 16.

Thanks. That was it. I had node v14. I installed v16+ and it now works fine. I see that the README also mentioned having node v16+.

Thanks for everything !