deps: tiptap v2 -> v3 (whole family + tiptap-markdown) - #274
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #266, which could not resolve. Dependabot bumped
@tiptap/reactalone, but every extension peers an exact@tiptap/pm, so the family moves together or not at all:Changes
@tiptap/react,@tiptap/pm,@tiptap/starter-kit,@tiptap/extension-link,@tiptap/extension-table→3.29.2.@tiptap/extension-table-{row,header,cell}— v3 consolidated them into@tiptap/extension-tableas named exports, so three dependencies go away.tiptap-markdown→0.9.0. Load-bearing: 0.8.x peers tiptap v2, 0.9.0 peers^3.0.1. The editor stores Markdown viaeditor.storage.markdown, so both had to move together.Four v3 behaviour changes in
RichTextEditor.tsxStarterKit 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 positionalemitUpdateboolean became an options object. A back-compat overload meanssetContent(value, false)still type-checks — tsc does not catch it. ButemitUpdatenow defaults totrue, so the old call would emit an update on every external content push (locale switch, AI translation load) and loop straight back throughonChange. Now passes{ emitUpdate: false }.Table nodes moved to named exports — the default import failed with
TS2613.editor.storagenarrowed from an index signature to an empty interface that extensions augment. tiptap-markdown shipsMarkdownStoragebut not the augmentation, so.markdownfailed withTS2339. 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