Skip to content

fix: remove @hocuspocus/provider peer dependency by inlining tiptap comment types BLO-1064#2564

Merged
nperez0111 merged 3 commits intomainfrom
fix/tiptap-comments
Mar 16, 2026
Merged

fix: remove @hocuspocus/provider peer dependency by inlining tiptap comment types BLO-1064#2564
nperez0111 merged 3 commits intomainfrom
fix/tiptap-comments

Conversation

@YousefED
Copy link
Collaborator

@YousefED YousefED commented Mar 16, 2026

Summary

Remove the @hocuspocus/provider peer dependency from @blocknote/core by inlining the needed Tiptap comment types locally.

closes #2547

Rationale

The comment-related types (TCollabComment, TCollabThread, TiptapCollabProvider) have moved from @hocuspocus/provider to @tiptap-pro/provider, which is a private package we don't want to depend on. Inlining these types removes the peer dependency entirely.

Changes

  • Removed @hocuspocus/provider from peerDependencies in packages/core/package.json
  • Added packages/core/src/comments/threadstore/tiptap/types.ts with types extracted from hocuspocus v2.15.3
  • Updated imports in TipTapThreadStore.ts to use the local types

Impact

Consumers no longer need to install @hocuspocus/provider as a peer dependency. No runtime behavior changes.

Checklist

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

Made with Cursor

Summary by CodeRabbit

  • Documentation

    • Updated comments feature documentation to reflect provider changes.
  • Chores

    • Removed optional peer dependency declaration.
    • Updated internal import paths for type definitions.
  • New Features

    • Added comprehensive type definitions for thread-based collaboration, including interfaces for thread management, comment operations, and real-time updates with watch/unwatch capabilities.

@vercel
Copy link

vercel bot commented Mar 16, 2026

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

Project Deployment Actions Updated (UTC)
blocknote Error Error Mar 16, 2026 8:46am
blocknote-website Ready Ready Preview Mar 16, 2026 8:46am

Request Review

@YousefED YousefED requested a review from nperez0111 March 16, 2026 08:26
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 964b6e46-aa03-4df3-963b-59da3c6d30fc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This change migrates the Tiptap collaboration system from Hocuspocus provider types to locally-defined types. It removes the Hocuspocus peer dependency, updates import paths to use a new local types module, and introduces comprehensive type definitions for collaboration data structures and provider interface.

Changes

Cohort / File(s) Summary
Dependency Migration
packages/core/package.json
Removed peerDependencies entry for @hocuspocus/provider and associated peerDependenciesMeta marking it as optional.
Type Definitions
packages/core/src/comments/threadstore/tiptap/types.ts
New module introducing types for Tiptap collaboration: TCollabThread, TCollabComment, ThreadType, GetThreadsOptions, DeleteCommentOptions, DeleteThreadOptions, and TiptapCollabProvider interface with methods for thread/comment CRUD operations and watching changes.
Type Import Updates
packages/core/src/comments/threadstore/TipTapThreadStore.ts, docs/content/docs/features/collaboration/comments.mdx
Updated type imports to reference new local types module instead of external @hocuspocus/provider, and updated documentation example to use @tiptap-pro/provider.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 We've hopped from Hocuspocus far away,
New local types now lead the way!
Types defined, dependencies shed—
Tiptap collaboration flows instead! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description includes Summary, Rationale, Changes, and Impact sections that thoroughly explain the PR purpose and scope. Testing and checklist are also provided, though screenshots/video sections are not applicable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: removing @hocuspocus/provider peer dependency by inlining tiptap comment types, which matches the core modifications across all affected files.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/tiptap-comments
📝 Coding Plan
  • Generate coding plan for human review comments

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

@YousefED YousefED changed the title fix: remove @hocuspocus/provider peer dependency by inlining tiptap comment types fix: remove @hocuspocus/provider peer dependency by inlining tiptap comment types BLO-1064 Mar 16, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 16, 2026

Open in StackBlitz

@blocknote/ariakit

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

@blocknote/code-block

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

@blocknote/core

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

@blocknote/mantine

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

@blocknote/react

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

@blocknote/server-util

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

@blocknote/shadcn

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

@blocknote/xl-ai

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

@blocknote/xl-docx-exporter

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

@blocknote/xl-email-exporter

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

@blocknote/xl-multi-column

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

@blocknote/xl-odt-exporter

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

@blocknote/xl-pdf-exporter

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

commit: cd9bb20

@nperez0111 nperez0111 merged commit 389cb3c into main Mar 16, 2026
13 of 14 checks passed
@nperez0111 nperez0111 deleted the fix/tiptap-comments branch March 16, 2026 21:09
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.

Update hocuspocus/provider

2 participants