Branch tiptap-v3-upgrade · two workstreams: TipTap v2→v3 migration + dependency cleanup · all changes currently uncommitted in the working tree.
Two pieces of work landed on this branch. (A) The editor core was migrated from a fragile mixed TipTap v2 install (betas + v1 dead weight) to a clean, consistent TipTap 3.27.0. (B) The frontend and collab-server package.json files were then pruned of confirmed-unused dependencies.
prosemirror-* imports rewritten (73 files)The baseline was not clean v2 — it mixed 2.0.0-beta.199, 2.0.3, 2.1.x, 2.4.0 and a dead tiptap@1.32.2. Every @tiptap/* package is now pinned to one consistent minor (^3.27.0).
| Package | Before | After | Change | |
|---|---|---|---|---|
| @tiptap/core | (transitive 2.0.3) | → | ^3.27.0 | now explicit |
| @tiptap/pm | (transitive 2.26.2) | → | ^3.27.0 | now explicit |
| @tiptap/react | 2.0.0-beta.113 | → | ^3.27.0 | upgrade |
| @tiptap/starter-kit | 2.0.0-beta.189 | → | ^3.27.0 | upgrade |
| @tiptap/suggestion | 2.1.12 | → | ^3.27.0 | upgrade |
| @tiptap/extension-blockquote | 2.0.0-beta.199 | → | ^3.27.0 | upgrade |
| @tiptap/extension-collaboration | 2.0.0-beta.199 | → | ^3.27.0 | upgrade |
| @tiptap/extension-color | 2.0.0-beta.199 | → | ^3.27.0 | upgrade |
| @tiptap/extension-highlight | 2.0.0-beta.199 | → | ^3.27.0 | upgrade |
| @tiptap/extension-image | 2.0.0-beta.209 | → | ^3.27.0 | upgrade |
| @tiptap/extension-link | 2.4.0 | → | ^3.27.0 | upgrade |
| @tiptap/extension-mention | 2.1.12 | → | ^3.27.0 | upgrade |
| @tiptap/extension-paragraph | 2.0.0-beta.199 | → | ^3.27.0 | upgrade |
| @tiptap/extension-subscript | 2.0.0-beta.204 | → | ^3.27.0 | upgrade |
| @tiptap/extension-superscript | 2.0.0-beta.204 | → | ^3.27.0 | upgrade |
| @tiptap/extension-table | 2.0.0-beta.199 | → | ^3.27.0 | upgrade + absorbs cell/row/header |
| @tiptap/extension-text-align | 2.0.0-beta.199 | → | ^3.27.0 | upgrade |
| @tiptap/extension-text-style | 2.0.0-beta.199 | → | ^3.27.0 | upgrade (default→named export) |
| @tiptap/extension-underline | 2.0.0-beta.220 | → | ^3.27.0 | upgrade |
| Package | Version | Why it was added |
|---|---|---|
| @tiptap/core | ^3.27.0 | Promoted to an explicit dependency (pin the v3 base). |
| @tiptap/pm | ^3.27.0 | Single source of ProseMirror — eliminates the duplicate-PM instanceof class of bugs. |
| @tiptap/extension-list | ^3.27.0 | Consolidates BulletList / OrderedList / ListItem / TaskList / TaskItem / ListKeymap. |
| @tiptap/extensions | ^3.27.0 | Provides UndoRedo (replaces @tiptap/extension-history) and other bundled utils. |
| @tiptap/y-tiptap | ^3.0.5 | v3's Yjs ⇄ ProseMirror binding — replaces y-prosemirror. Keeps track-changes ↔ collab undo in sync. |
| y-protocols | ^1.0.7 | Yjs awareness peer required by the v3 collaboration tree. |
The migration also briefly added @tiptap/extension-collaboration-caret (the v3 rename of collaboration-cursor), but the cleanup later removed it — the main editor uses a vendored caret extension (§5).
| Removed package (v2) | Replacement in v3 |
|---|---|
| @tiptap/extension-table-cell / -table-row / -table-header | Named exports of @tiptap/extension-table |
| @tiptap/extension-task-list / -task-item | Named exports of @tiptap/extension-list |
| @tiptap/extension-history | UndoRedo from @tiptap/extensions |
| @tiptap/extension-collaboration-cursor | Vendored collaboration/collaboration-cursor.ts (v3-compatible) |
| @tiptap/extension-character-count | Dropped — no getCharacterCount() usage in the app |
| @tiptap/extension-code-block-lowlight | Dropped — StarterKit's plain codeBlock is used |
| @tiptap/html | Dropped — no generateHTML/JSON usage |
| tiptap (v1.32.2) | Dropped — dead v1 meta-package, never imported |
prosemirror-* imports across 73 files rewritten to @tiptap/pm/* (state, view, model, transform, gapcursor, schema-list, history). Imported symbols are identical — only the module specifier changed.Decoration/Step/Selection instanceof checks keep working — the core requirement for the track-changes engine.y-prosemirror imports → @tiptap/y-tiptap (ySyncPluginKey, yUndoPluginKey, yCursorPlugin, defaultSelectionBuilder) so they match the v3 Collaboration extension's internal sync.collaboration-cursor.ts (owns the .collaboration-cursor__caret class) — ~30 DOM queries across the codebase are unaffected.history:false → undoRedo:false, plus link:false, underline:false, trailingNode:false, listKeymap:false (v3 now bundles these — disabled to keep the custom Link/Underline).@tiptap/extension-text-style: default import → named { TextStyle } (v3 dropped the default export).setContent/clearContent (7 call sites): added { emitUpdate:false } — v3 emits updates by default.editor.view is now a throwing getter after destroy; unmount code (incl. React 18 StrictMode remount) was hardened with isDestroyed / optional-chaining in Common.tsx, TrackChangeFilter.tsx, Tiptap.tsx.build/prodbuild scripts gained NODE_OPTIONS=--max-old-space-size=4096 — v3's larger graph OOMs at Node's default ~2 GB during minify.@hocuspocus/transformer was bumped 2.0.6 → ^4.2.0 (its v2 was the only blocker to a clean v3 peer tree) — later removed entirely by the cleanup as it is unused in the UI.After the migration, every declared dependency was checked against real imports (JS/TS/JSX/SCSS/CSS/HTML, dynamic imports, CSS imports, peer-dep roles). Confirmed-unused packages were removed. react-scripts + the CRA tooling were retired (the start script now runs vite, and the dead eslintConfig block was removed).
30 dependencies:
@createnextapp/async-local-storage · @date-io/date-fns · @hocuspocus/extension-sqlite · @hocuspocus/server · @hocuspocus/transformer · @hookform/resolvers · @react-keycloak/web · @testing-library/user-event · @tinymce/tinymce-react · @tiptap/extension-collaboration-caret · @types/google.accounts · @typescript-eslint/parser · @vitejs/plugin-legacy · chart.js · devextreme-react · diff · groq-sdk · jstoxml · jwt-decode · jwt-encode · katex · keycloak-js · lowlight · randomcolor · raw-loader · react-katex · react-scripts · remixicon · tinymce · zod
4 devDependencies:
@originjs/vite-plugin-commonjs · @prettier/plugin-php · prettier · vite-tsconfig-paths
@hocuspocus/extension-webhook · @tiptap/html · js-base64
@tiptap/suggestion (mention peer) · y-protocols (collab peer) · pdfjs-dist (via react-pdf) · web-vitals (dynamic import) · sass (SCSS compiler) · bootstrap / devextreme (CSS imports)
package-lock.json is intentionally not yet regenerated — run npm install in both projects to sync lockfiles and prune node_modules.| Layer | Technology | Version | Role |
|---|---|---|---|
| Editor | TipTap (core/react/starter-kit/extensions) | ^3.27.0 | Rich-text editor framework |
| Editor | @tiptap/pm (ProseMirror) | ^3.27.0 | Document model / view / transforms |
| Collab (CRDT) | Yjs + @tiptap/y-tiptap + y-protocols | 13.5.x / 3.0.5 / 1.0.7 | Conflict-free real-time sync |
| Frontend | React + React DOM | ^18.2.0 | UI framework |
| Frontend | Vite | ^5.0.12 | Build & dev server (replaces react-scripts) |
| Styling | Sass (Dart Sass) | ^1.55.0 | Global stylesheet compilation |
| Collab server | Hocuspocus (server) | ^1.1.3 | WebSocket collaboration (RethinkDB-backed) |
| Collab server | Hocuspocus (API sync) | ^2.0.6 | Node ⇄ MySQL session bridge |
| Backend | PHP / Laravel | ^8.2 / ^10 | REST persistence, queues, export |
| Backend | Laravel Horizon / Reverb | ^5.27 / ^1.1 | Queue workers / WebSocket broadcast |
| Databases | MySQL / RethinkDB | 8.0 / latest | Relational storage / live collab state |
3575 modules transformed, ~46s); npm ls confirms a single @tiptap/pm@3.27.0 / prosemirror-model@1.25.9 / prosemirror-view@1.41.9 — no duplicate ProseMirror.no-undef bug — lang used but never declared in LanguageToolPopup.jsx:173 (demoted to a warning via ESLINT_NO_DEV_ERRORS); and a POST /save-doc-html 500 from onDestroy which is a backend (Laravel) response, not a migration regression.RVRite_ui/build/ may contain root-owned dirs from a prior sudo build → npm run build can EACCES until sudo rm -rf build. Unrelated to the migration.npm install in both projects to sync lockfiles; (2) complete the track-changes/collab QA matrix; (3) fix the lang bug; (4) commit the branch.
Sources: git diff of RVRite_ui/package.json & RVRite_server/package.json (committed → working tree) · RVRite_ui/TIPTAP_V3_MIGRATION_PLAN.md
Branch tiptap-v3-upgrade · all changes uncommitted · report generated 2026-06-19