CodeMirror/next 0.19.0

All of the @codemirror/... packages maintained by me have been bumped to 0.19.0. This should be a very benign major version upgrade. The main change is that the Lezer dependencies were bumped to 0.15.0, which changes quite a few things compared to 0.13.x. Apart from that, these are the breaking changes to look out for:

  • The outer DOM element around an editor now has the cm-editor CSS class, rather than cm-wrap.

  • The arguments to countColumn and findColumn in @codemirror/text changed.

  • The format of the value of the Transaction.userEvent annotation changed—it now supports hierarchical names like "input.paste". So testing it with == is problematic and you should use the isUserEvent method.

  • In @codemirror/language, EditorParseContext is now simply ParseContext, and must be retrieved through a static function rather than being passed to parsers directly.

  • LezerLanguage was renamed to LRLanguage for conceptual clarity.

  • IndentContext.lineIndent, which you may be using in custom language indentation logic, now takes a position rather than a line object.

  • The defaultTabBinding key binding is gone from @codemirror/commands (replaced by indentWithTab.

  • GutterMarker objects no longer have an at method (use range instead).

  • Passing a class option to a panel is no longer supported (you can add extra classes yourself when creating the DOM element).

4 Likes