Keeping sub-dependencies up to date

I keep struggling with this as well. Updating one CodeMirror package often results in having to update all of them to avoid the dreaded “multiple CodeMirror state versions” error. This problem gets more pronounced since we have a monorepo with multiple packages using CodeMirror along with some third party extensions that seem to use their own dependencies.

One annoying but effective approach is to add resolutions to the main package.json with all the actual package versions you want. Seems to work but a pain to keep updated.

  "resolutions": {
    "@codemirror/autocomplete": "^6.8.1",
    "@codemirror/commands": "^6.2.4",
    "@codemirror/lang-css": "^6.2.0",
    "@codemirror/lang-html": "^6.4.5",
    "@codemirror/language": "^6.8.0",
    "@codemirror/language-data": "^6.3.1",
    "@codemirror/search": "^6.5.0",
    "@codemirror/state": "^6.2.1",
    "@codemirror/view": "^6.14.0"
  }

If there are any other recommendations, I’m all ears. Would certainly love to make updating CodeMirror less of a harrowing experience.