Skip to content

deps: tiptap v2 -> v3 (whole family + tiptap-markdown) - #274

Merged
github-actions[bot] merged 2 commits into
mainfrom
deps/tiptap-v3
Aug 6, 2026
Merged

deps: tiptap v2 -> v3 (whole family + tiptap-markdown)#274
github-actions[bot] merged 2 commits into
mainfrom
deps/tiptap-v3

Conversation

@catomean

@catomean catomean commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Supersedes #266, which could not resolve. Dependabot bumped @tiptap/react alone, but every extension peers an exact @tiptap/pm, so the family moves together or not at all:

npm error Conflicting peer dependency: @tiptap/pm@3.29.2
npm error   peer @tiptap/pm@"3.29.2" from @tiptap/extension-link@3.29.2

Changes

  • @tiptap/react, @tiptap/pm, @tiptap/starter-kit, @tiptap/extension-link, @tiptap/extension-table3.29.2.
  • Removed @tiptap/extension-table-{row,header,cell} — v3 consolidated them into @tiptap/extension-table as named exports, so three dependencies go away.
  • tiptap-markdown0.9.0. Load-bearing: 0.8.x peers tiptap v2, 0.9.0 peers ^3.0.1. The editor stores Markdown via editor.storage.markdown, so both had to move together.

Four v3 behaviour changes in RichTextEditor.tsx

  1. StarterKit v3 bundles its own Link. Ours is configured differently (openOnClick: false), so the bundled one is disabled rather than registering the mark twice.

  2. setContent's positional emitUpdate boolean became an options object. A back-compat overload means setContent(value, false) still type-checks — tsc does not catch it. But emitUpdate now defaults to true, so the old call would emit an update on every external content push (locale switch, AI translation load) and loop straight back through onChange. Now passes { emitUpdate: false }.

  3. Table nodes moved to named exports — the default import failed with TS2613.

  4. editor.storage narrowed from an index signature to an empty interface that extensions augment. tiptap-markdown ships MarkdownStorage but not the augmentation, so .markdown failed with TS2339. Declared the augmentation rather than casting, so the storage stays typed.

Verification

  • npm run typecheck — exit 0.

    Correction: the first push claimed a clean typecheck it had not actually earned. That local run had been killed, and a killed process reported exit 0 with an empty log; CI then caught items 3 and 4 above. The current pass is a real run (npm header present in the log), and CI is the check that matters here.

  • Lockfile churn is confined to the tiptap subtree: tiptap, prosemirror, and v3's swap from popper/tippy to floating-ui. No unrelated packages moved.

  • Editor surface is a single 174-line file, so the blast radius is one admin blog editor.

Worth clicking through the blog editor once after merge — bold/heading/list/link/table and the Markdown toggle — since no test covers editor behaviour.

🤖 Generated with Claude Code

catomean and others added 2 commits August 6, 2026 14:16
Dependabot's #266 bumped @tiptap/react alone, which cannot resolve: every
extension peers an exact @tiptap/pm, so the family moves together or not at
all. Bumped all eight @tiptap/* packages to 3.29.2 and tiptap-markdown to
0.9.0 (0.8.x peers tiptap v2; 0.9.0 peers ^3.0.1, so the markdown storage
this editor depends on only works after both move).

Two v3 behaviour changes in RichTextEditor:

- StarterKit v3 bundles its own Link. Ours is configured differently
  (openOnClick: false), so the bundled one is disabled rather than
  registering the mark twice.

- setContent's positional emitUpdate boolean became an options object.
  A back-compat overload means `setContent(value, false)` still TYPE-checks,
  so tsc does not catch this — but emitUpdate now defaults to true, so the
  old call would emit an update on every external content push and loop
  back through onChange. Passing { emitUpdate: false } restores the intent.

Lockfile churn is confined to the tiptap subtree (tiptap, prosemirror, and
v3's swap from popper/tippy to floating-ui). No unrelated packages moved.

Supersedes #266.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two v3 changes my first pass missed:

- v3 consolidated the table nodes into @tiptap/extension-table with NAMED
  exports; the default import broke (TS2613). Import all four from the one
  package and drop @tiptap/extension-table-{row,header,cell} entirely.

- v3 narrowed `editor.storage` from an index signature to an empty interface
  that extensions augment. tiptap-markdown ships MarkdownStorage but not the
  augmentation, so `.markdown` failed (TS2339). Declared the augmentation
  rather than casting, so the storage stays typed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions
github-actions Bot merged commit a44c35f into main Aug 6, 2026
7 checks passed
@github-actions
github-actions Bot deleted the deps/tiptap-v3 branch August 6, 2026 13:02
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