Skip to content

chore(deps): move the tiptap stack to peerDependencies, following upstream — next major #352

Description

@IgorShevchik

Background

Split out of #99 §4 while doing §3 (#351). What made it worth its own issue is that the situation changed since #99 was filed: upstream has already done this, so it is now a divergence question as well as an install-weight one.

Where we are

package.json dependencies currently holds 64 runtime entries, among them:

group count
@tiptap/* 17
embla-carousel-* 7
@tanstack/* 2

Every consumer installs all of it. An app that uses B24Button and B24Modal and never touches B24Editor still pays for the full ProseMirror stack.

What upstream did

nuxt/ui@v4 now declares 21 entries in peerDependencies that we carry as dependencies — the whole tiptap set plus ai:

"@tiptap/core": "^3",
"@tiptap/extension-bubble-menu": "^3",

"@tiptap/vue-3": "^3",
"ai": "^6 || ^7"

Of those, only ai is marked optional in peerDependenciesMeta; the tiptap entries are required peers upstream. Worth confirming that is intentional on their side before copying it wholesale — required peers for an editor most apps do not use would be an odd choice, and peerDependenciesMeta: { optional: true } is the shape that actually matches "install it if you use the Editor".

The practical consequence for us: every future tiptap port now has to reconcile two different dependency shapes. That cost grows.

Why this is not a patch

Moving a package from dependencies to peerDependencies is breaking for consumers — anyone using B24Editor must add 17 packages to their own manifest or their build stops resolving. It belongs in the next major, with a migration note, and embla-* deserves the same question asked separately (the carousel is a smaller stack and a more commonly used component).

Suggested shape

  1. Measure first: install size and node_modules count for a minimal app today versus with the tiptap stack removed. chore(deps): adopt Renovate; declare vue in peerDependencies; document exact-pin rationale (reka-ui, vaul-vue, h3, unimport); review dependency weight #99 asked for this and it has never been done — without it we are trading a real breaking change for an unquantified win.
  2. Decide required-vs-optional peers deliberately rather than by copying upstream. optional: true plus a clear runtime error from B24Editor when the peer is missing is friendlier than a resolution failure at build time.
  3. Ship in the next major with a migration snippet for package.json.
  4. Record the outcome in .sync/PORTING.md §2 either way — if we keep them as dependencies, that is a deliberate divergence a port would otherwise "fix".

Not in scope

@tanstack/*, fuse.js, canvas-confetti, motion-v — small enough that the breaking change would cost more than the weight saved. Revisit only if the measurement in step 1 says otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions