Skip to content

fix: make CustomChange compatible with prosemirror-changeset 2.4.1#2647

Merged
nperez0111 merged 2 commits intomainfrom
feat/fix-fresh-install
Apr 16, 2026
Merged

fix: make CustomChange compatible with prosemirror-changeset 2.4.1#2647
nperez0111 merged 2 commits intomainfrom
feat/fix-fresh-install

Conversation

@nperez0111
Copy link
Copy Markdown
Contributor

@nperez0111 nperez0111 commented Apr 16, 2026

Summary

Fix the daily fresh-install-tests CI workflow by making @blocknote/xl-ai compatible with prosemirror-changeset 2.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-changeset 2.4.1 added a toJSON() method to the Change class, and our CustomChange type extended Change. Since we create plain objects (not class instances), TypeScript correctly errors that toJSON is missing.

Changes

  • Replaced type CustomChange = Change & { ... } with a standalone structural type listing only the fields we use
  • Removed unused Change import, added Span import for the deleted/inserted field types
  • Updated lockfile to bump @tiptap/* 3.22.1 → 3.22.3 and prosemirror-changeset 2.3.1 → 2.4.1 (within existing package.json ranges)
  • Skipped react/react-dom 19.2.5 (causes test failures)

Impact

No runtime behavior change — CustomChange was only used internally as a type annotation. The lockfile update stays within declared ranges.

Testing

  • Full build of all 18 projects passes
  • All unit tests pass across all packages

Checklist

  • Code follows the project's coding standards.
  • All existing tests pass.

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]>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Apr 16, 2026 10:28am
blocknote-website Ready Ready Preview Apr 16, 2026 10:28am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

📝 Walkthrough

Walkthrough

A single file in the ProseMirror changeset module was updated. The CustomChange type definition was refactored from extending ProseMirror-changeset's Change type to an explicit object shape with specific properties. Imports were updated to add the Span type and remove the Change import.

Changes

Cohort / File(s) Summary
ProseMirror Changeset Type Refactoring
packages/xl-ai/src/prosemirror/changeset.ts
Refactored CustomChange type from extending ProseMirror-changeset's Change to an explicit object shape with properties fromA, toA, fromB, toB, deleted (readonly Span[]), inserted (readonly Span[]), and optional type. Updated imports to add Span and remove Change.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Type shapes shift like clover in the breeze,
From inherited chains to explicit ease,
The CustomChange hops to its own design,
With Span and structure, now perfectly fine! 🌿

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: making CustomChange compatible with prosemirror-changeset 2.4.1 by fixing a TypeScript compatibility issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description covers all major required sections: Summary, Rationale, Changes, Impact, Testing, and Checklist with appropriate details.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fix-fresh-install

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 16, 2026

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@2647

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@2647

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@2647

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@2647

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@2647

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@2647

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@2647

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@2647

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@2647

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@2647

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@2647

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@2647

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@2647

commit: 154c3ff

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]>
@nperez0111 nperez0111 merged commit 219d922 into main Apr 16, 2026
23 checks passed
@nperez0111 nperez0111 deleted the feat/fix-fresh-install branch April 16, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant