PackageTrack

npm

@codemirror/state

6.7.1codemirror/state

Editor state data structures for the CodeMirror code editor

Release timeline

46 releases since 2020
20202026

One column per quarter.

Releases

  1. 6.7.15 Jul 2026
    Release notes2 sources agree

    Bug fixes

    Make sure facet providers, precedence extensions, and compartment instances have the extension field the Extension type claims they have.

    Open source →
  2. 6.7.023 Jun 2026
    Release notes2 sources agree

    New features

    Selection ranges can now be 'undirectional', making selection-expanding commands pick the side that would grow the selection, instead of the given head.

    Open source →
  3. 6.6.012 Mar 2026
    Release notes2 sources agree

    New features

    EditorSelection.range now takes an optional assoc argument.

    SelectionRange.extend can now be given a third argument to specify associativity.

    Open source →
  4. 6.5.414 Jan 2026
    Release notes2 sources agree

    Bug fixes

    Make SelectionRange.eq return false when the ranges have different goal columns.

    Open source →
  5. 6.5.322 Dec 2025
    Release notes2 sources agree

    Bug fixes

    Fix an issue where RangeValue.eq could get called with a value of a different class.

    EditorState.charCategorizer now only uses the highest-precedence set of word characters from the language data, to allow overriding these.

    Open source →
  6. 6.5.23 Feb 2025
    Release notes2 sources agree

    Bug fixes

    Fix a bug where reconfiguring a field with a new init value didn't update the value of the field.

    Open source →
  7. 6.5.110 Jan 2025
    Release notes2 sources agree

    Bug fixes

    countColumn no longer loops infinitely when given a to that's higher than the input string's length.

    Open source →
  8. 6.5.09 Dec 2024
    Release notes2 sources agree

    New features

    RangeSet.compare now supports a boundChange callback that is called when there's a change in the way ranges are split.

    Open source →
  9. 6.4.119 Feb 2024
    Release notes2 sources agree

    Bug fixes

    Fix an issue that caused widgets at the end of a mark decoration to be rendered in their own separate mark DOM element.

    Open source →
  10. 6.4.028 Dec 2023
    Release notes2 sources agree

    Bug fixes

    When multiple ranges in a single range set overlap, put the smaller ones inside the bigger ones, so that overlapping decorations don't break up each other's elements when coming from the same source.

    New features

    Selection and selection range eq methods now support an optional argument that makes them also compare by cursor associativity.

    The RangeSet.join function can be used to join multiple range sets together.

    Open source →
  11. 6.3.36 Dec 2023
    Release notes2 sources agree

    Bug fixes

    Fix an issue where Text.slice and Text.replace could return objects with incorrect length when the given from/to values were out of range for the text.

    Open source →
  12. 6.3.227 Nov 2023
    Release notes2 sources agree

    Bug fixes

    Make sure transactions cannot add multiple selections when allowMultipleSelections is false.

    Fix a bug that caused Text.iterLines to not return empty lines at the end of the iterated ranges.

    Open source →
  13. 6.3.118 Oct 2023
    Release notes2 sources agree

    Bug fixes

    Give the tag property on FacetReader the type of the output type parameter to force TypeScript to infer the proper type when converting from Facet to FacetReader.

    Open source →
  14. 6.3.012 Oct 2023
    Release notes2 sources agree

    New features

    The new FacetReader type provides a way to export a read-only handle to a Facet.

    Open source →
  15. 6.2.123 May 2023
    Release notes2 sources agree

    Bug fixes

    Fix an issue that could cause RangeSet.compare to miss changes in the set of active ranges around a point range.

    Open source →
  16. 6.2.026 Dec 2022
    Release notes2 sources agree

    New features

    EditorSelection.range now accepts an optional 4th argument to specify the bidi level of the range's head position.

    Open source →
  17. 6.1.415 Nov 2022
    Release notes2 sources agree

    Bug fixes

    Fix a bug that caused the openStart value passed to span iterators to be incorrect around widgets in some circumstances.

    Open source →
  18. 6.1.310 Nov 2022
    Release notes2 sources agree

    Bug fixes

    Avoid unnecessary calls to computed facet getters when a state is reconfigured but no dependencies of the computed facet change.

    Fix an infinite loop in RangeSet.eq when the to parameter isn't given.

    Open source →
  19. 6.1.221 Sept 2022
    Release notes2 sources agree

    Bug fixes

    Fix an issue where, when multiple transaction extenders took effect, only the highest-precedence one was actually included in the transaction.

    Open source →
  20. 6.1.13 Aug 2022
    Release notes2 sources agree

    Bug fixes

    Fix a bug in range set span iteration that would cause decorations to be inappropriately split in some situations.

    Open source →
  21. 6.1.030 Jun 2022
    Release notes2 sources agree

    Bug fixes

    Refine change mapping to preserve insertions made by concurrent changes.

    New features

    The enables option to Facet.define may now take a function, which will be called with the facet value to create the extensions.

    Open source →
  22. 6.0.117 Jun 2022
    Release notes2 sources agree

    Bug fixes

    Fix a problem that caused effects' map methods to be called with an incorrect change set when filtering changes.

    Open source →
  23. 6.0.08 Jun 2022
    Release notes2 sources agree

    Breaking changes

    Update dependencies to 6.0.0

    Open source →
  24. 0.20.12 Jun 2022
    Release notes2 sources agree

    New features

    EditorView.phrase now accepts additional arguments, which it will interpolate into the phrase in the place of $ markers.

    Open source →
  25. 0.20.020 Apr 2022
    Release notes2 sources agree

    Breaking changes

    The deprecated precedence names fallback, extend, and override were removed from the library.

    Bug fixes

    Fix a bug where, if an extension value occurs multiple times, its lowest, rather than highest precedence is used.

    Fix an issue where facets with computed inputs would unneccesarily have their outputs recreated on state reconfiguration.

    Fix a bug in the order in which new values for state fields and facets were computed, which could cause dynamic facets to hold the wrong value in some situations.

    New features

    The exports from @codemirror/rangeset now live in this package.

    The exports from @codemirror/text now live in this package.

    Open source →
  26. 0.19.916 Feb 2022
    Release notes2 sources agree

    Bug fixes

    Mapping a non-empty selection range now always puts any newly inserted text on the sides of the range outside of the mapped version.

    Open source →
  27. 0.19.815 Feb 2022
    Release notes2 sources agree

    Bug fixes

    Fix a bug where facet values with computed inputs could incorrectly retain their old value on reconfiguration.

    Open source →
  28. 0.19.711 Feb 2022
    Release notes2 sources agree

    Bug fixes

    Avoid recomputing facets on state reconfiguration if that facet's inputs stayed precisely the same.

    Selection ranges created with EditorSelection.range will now have an assoc pointing at their anchor, when non-empty.

    Open source →
  29. 0.19.619 Nov 2021
    Release notes2 sources agree

    Bug fixes

    Fix a bug that caused facet compare functions to be called with an invalid value in some situations.

    Fix a bug that caused dynamic facet values to be incorrectly kept unchanged when reconfiguration changed one of their dependencies.

    Open source →
  30. 0.19.510 Nov 2021
    Release notes2 sources agree

    Bug fixes

    Fix a bug that would cause dynamic facet values influenced by a state reconfiguration to not properly recompute.

    Open source →
  31. 0.19.45 Nov 2021
    Release notes2 sources agree

    Bug fixes

    When reconfiguring a state, effects from the reconfiguring transaction can now be seen by newly added state fields.

    Open source →
  32. 0.19.33 Nov 2021
    Release notes2 sources agree

    New features

    The precedence levels (under Prec) now have more generic names, because their 'meaningful' names were entirely inappropriate in many situations.

    Open source →
  33. 0.19.213 Sept 2021
    Release notes2 sources agree

    New features

    The editor state now has a readOnly property with a matching facet to control its value.

    Open source →
  34. 0.19.115 Aug 2021
    Release notes2 sources agree

    Bug fixes

    Fix a bug where wordAt never returned a useful result.

    Open source →
  35. 0.19.011 Aug 2021
    Release notes2 sources agree

    Breaking changes

    User event strings now work differently—the events emitted by the core packages follow a different system, and hierarchical event tags can be created by separating the words with dots.

    New features

    languageDataAt now takes an optional side argument to specificy which side of the position you're interested in.

    It is now possible to add a user event annotation with a direct userEvent property on a transaction spec.

    Transactions now have an isUserEvent method that can be used to check if it is (a subtype of) some user event type.

    Open source →
  36. 0.18.74 May 2021
    Release notes2 sources agree

    Bug fixes

    Fix an issue where state fields might be initialized with a state that they aren't actually part of during reconfiguration.

    Open source →
  37. 0.18.612 Apr 2021
    Release notes2 sources agree

    New features

    The new EditorState.wordAt method finds the word at a given position.

    Open source →
  38. 0.18.58 Apr 2021
    Release notes2 sources agree

    Bug fixes

    Fix an issue in the compiled output that would break the code when minified with terser.

    Open source →
  39. 0.18.46 Apr 2021
    Release notes2 sources agree

    New features

    The new Transaction.remote annotation can be used to mark and recognize transactions created by other actors.

    Open source →
  40. 0.18.323 Mar 2021
    Release notes2 sources agree

    New features

    The ChangeDesc class now has toJSON and fromJSON methods.

    Open source →
  41. 0.18.214 Mar 2021
    Release notes2 sources agree

    Bug fixes

    Fix unintended ES2020 output (the package contains ES6 code again).

    Open source →
  42. 0.18.110 Mar 2021
    Release notes2 sources agree

    New features

    The new Compartment.get method can be used to get the content of a compartment in a given state.

    Open source →
  43. 0.18.03 Mar 2021
    Release notes2 sources agree

    Breaking changes

    tagExtension and the reconfigure transaction spec property have been replaced with the concept of configuration compartments and reconfiguration effects (see Compartment, StateEffect.reconfigure, and StateEffect.appendConfig).

    Open source →
  44. 0.17.219 Feb 2021
    Release notes2 sources agree

    New features

    EditorSelection.map and SelectionRange.map now take an optional second argument to indicate which direction to map to.

    Open source →
  45. 0.17.16 Jan 2021
    Release notes2 sources agree

    New features

    The package now also exports a CommonJS module.

    Open source →
  46. 0.17.029 Dec 2020
    Release notes2 sources agree

    Breaking changes

    First numbered release.

    Open source →