Skip to content

chore(tiptap): pin @tiptap/core resolution#35685

Merged
rjvelazco merged 3 commits into
mainfrom
35683-block-editor-20-improvements-and-bug-fixes-v1
May 12, 2026
Merged

chore(tiptap): pin @tiptap/core resolution#35685
rjvelazco merged 3 commits into
mainfrom
35683-block-editor-20-improvements-and-bug-fixes-v1

Conversation

@rjvelazco
Copy link
Copy Markdown
Member

@rjvelazco rjvelazco commented May 12, 2026

Proposed Changes

Unblocks yarn nx serve dotcms-ui after the Block Editor 2.0 merge (#35257). Two small TipTap dependency-resolution fixes in core-web/package.json:

  • Pin @tiptap/core via resolutions@tiptap/starter-kit declares @tiptap/core: ^3.22.2, which yarn was resolving to 3.23.1 (a minor bump). That left two copies of @tiptap/core under node_modules (root 3.22.2 + nested starter-kit/node_modules/@tiptap/core@3.23.1). TypeScript treats the two type definitions as incompatible, so the legacy libs/block-editor broke with Type 'Extension<StarterKitOptions>' is not assignable to type 'AnyExtension' plus a cascade of Property 'toggleHeading' does not exist on type 'ChainedCommands'-style errors. The resolution forces a single shared copy.

  • Add @tiptap/extension-code-block@3.22.2 as a direct dependency@tiptap/extension-code-block-lowlight declares it as a peer dependency. Yarn 1 does not auto-install peers; after the dedup above, this package landed nested under starter-kit/node_modules/ rather than hoisted, so esbuild could not resolve it at bundle time (Could not resolve "@tiptap/extension-code-block"). Promoting it to a top-level dep guarantees hoisting and version consistency with the rest of the TipTap suite.

A minor package.json reorder also moves lint-staged to its alphabetical position in devDependencies (no behavioural change).

Why this is needed

The Block Editor 2.0 merge worked on CI (yarn install --frozen-lockfile against the merge-time lockfile), but a fresh local yarn install after pulling main re-resolves the lockfile and trips on both issues above. Anyone pulling main since the merge hits the same compile errors when running the dev server.

Test plan

  • yarn install runs clean — no missing-peer-dep warnings for the affected packages.
  • Only one copy of @tiptap/core resolves under node_modules (find node_modules -path '*/@tiptap/core/package.json').
  • @tiptap/extension-code-block is hoisted to node_modules/@tiptap/extension-code-block/.
  • yarn nx serve dotcms-ui completes the initial bundle and listens on http://localhost:4200/dotAdmin — no Cannot find module / Could not resolve / TipTap type errors.
  • No regression in the legacy libs/block-editor or the new libs/new-block-editor type checks.

Related

🤖 Generated with Claude Code

This PR fixes: #35683

@github-actions github-actions Bot added the Area : Frontend PR changes Angular/TypeScript frontend code label May 12, 2026
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 12, 2026

Claude finished @rjvelazco's task in 47s —— View job


Rollback Safety Analysis — ✅ Safe To Rollback

  • Read rollback-unsafe categories reference
  • Get full PR diff (re-analyzed after sync)
  • Analyze diff against each category
  • Apply appropriate label (AI: Safe To Rollback)

Findings

This PR is frontend-only. Three changed files, none touching anything in the rollback-unsafe category set:

  • core-web/package.json — adds @tiptap/extension-code-block@3.22.2, pins @tiptap/core@3.22.2 in resolutions, reorders lint-staged alphabetically.
  • core-web/yarn.lock — corresponding lockfile updates.
  • core-web/apps/dotcms-ui/project.json — raises the dotcms-ui initial bundle budget maximumError from 5mb to 6mb (build-time webpack budget warning threshold only — no runtime/behavioral impact).

No matches against any unsafe category:

  • No runonce / SQL migration tasks (C-1, C-4, H-1, H-2, H-3, H-6, H-7, M-1)
  • No Elasticsearch mapping or ESMappingAPI* changes (C-2)
  • No CURRENT_MODEL_VERSION / contentlet JSON model change (C-3)
  • No new Java FieldTypeAPI field type (H-4)
  • No StoragePersistenceProvider / FileStorageAPIImpl change (H-5)
  • No REST/GraphQL contract change (M-3) — pure client-side Tiptap dependency hygiene
  • No OSGi public interface change (M-4)
  • No push-publishing bundle XML change (M-2)

N-1 can serve all traffic unchanged after rollback. The only effect would be the absence of the new Tiptap code-block extension in the Block Editor UI; the bundle-budget change is build-time only and has no production impact.
| Branch

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 12, 2026

Claude finished @rjvelazco's task in 51s —— View job


Rollback Safety Analysis — ✅ Safe To Rollback

  • Read rollback-unsafe categories reference
  • Get full PR diff
  • Analyze diff against each category
  • Apply appropriate label (AI: Safe To Rollback)

Findings

This PR only touches frontend Node dependencies:

  • core-web/package.json — adds @tiptap/extension-code-block@3.22.2, pins @tiptap/core@3.22.2 in resolutions, and reorders lint-staged alphabetically.
  • core-web/yarn.lock — corresponding lockfile updates.

No matches against any unsafe category:

  • No runonce / DB migration tasks (C-1, C-4, H-1, H-2, H-3, H-6, H-7, M-1)
  • No Elasticsearch mapping changes (C-2)
  • No CURRENT_MODEL_VERSION / contentlet JSON model change (C-3)
  • No new Java field type registered in FieldTypeAPI (H-4)
  • No storage provider / FileStorageAPIImpl change (H-5)
  • No REST/GraphQL contract change (M-3) — pure client-side editor dependency bump
  • No OSGi public interface change (M-4)
  • No push-publishing bundle XML change (M-2)

N-1 can serve all traffic unchanged after rollback; the only effect would be the absence of the new Tiptap code-block extension in the Block Editor UI.
| Branch

@rjvelazco rjvelazco enabled auto-merge May 12, 2026 20:21
@rjvelazco rjvelazco changed the title feat(tiptap): update Tiptap extensions and add code block support chore(tiptap): pin @tiptap/core resolution May 12, 2026
Adding `@tiptap/extension-code-block` as a direct dependency in the
sibling commit pushed the production initial bundle 524 bytes past the
5mb hard error budget. Bump the ceiling to 6mb so the build passes;
the 2mb warning threshold stays as-is so we still see drift in CI logs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rjvelazco rjvelazco added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit 3bee4e8 May 12, 2026
31 checks passed
@rjvelazco rjvelazco deleted the 35683-block-editor-20-improvements-and-bug-fixes-v1 branch May 12, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Safe To Rollback Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Block Editor 2.0: improvements and bug fixes

2 participants