fix: make CustomChange compatible with prosemirror-changeset 2.4.1#2647
fix: make CustomChange compatible with prosemirror-changeset 2.4.1#2647nperez0111 merged 2 commits intomainfrom
Conversation
prosemirror-changeset 2.4.1 added a toJSON() method to the Change class, causing fresh installs (without lockfile) to fail TypeScript compilation when creating plain objects typed as CustomChange. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughA single file in the ProseMirror changeset module was updated. The Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
Bump locked versions within existing ranges: - @tiptap/* 3.22.1 -> 3.22.3 - prosemirror-changeset 2.3.1 -> 2.4.1 Skipped react/react-dom 19.2.5 (causes test failures). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
Fix the daily
fresh-install-testsCI workflow by making@blocknote/xl-aicompatible withprosemirror-changeset2.4.1, and update the lockfile to use the latest versions of dependabot-tracked packages.Rationale
The fresh-install workflow removes the lockfile to simulate what new users experience.
prosemirror-changeset2.4.1 added atoJSON()method to theChangeclass, and ourCustomChangetype extendedChange. Since we create plain objects (not class instances), TypeScript correctly errors thattoJSONis missing.Changes
type CustomChange = Change & { ... }with a standalone structural type listing only the fields we useChangeimport, addedSpanimport for thedeleted/insertedfield types@tiptap/*3.22.1 → 3.22.3 andprosemirror-changeset2.3.1 → 2.4.1 (within existingpackage.jsonranges)react/react-dom19.2.5 (causes test failures)Impact
No runtime behavior change —
CustomChangewas only used internally as a type annotation. The lockfile update stays within declared ranges.Testing
Checklist