Repository navigation
fix(text-editor): use one version range for every tiptap dependency - #206
Merged
Merged
Conversation
Three @tiptap packages were pinned to exactly 3.31.3 while the others used caret ranges. A fresh npm install resolved the ranges to the latest tiptap, nested a second @tiptap/core 3.31.3 for the pinned packages, and @tiptap/extension-table then loaded the old core and crashed on a missing isValidCSSStyleValue export. That broke npx @frontlit/preview@alpha. Also gives borders the theme border colour in the local preview, matching apps/sites globals.css, so cards no longer render with text-coloured borders.
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.
Problem
npx @frontlit/preview@alpha frontlitcrashes on a fresh install:Cause
@frontlit/text-editorpinned three tiptap packages exactly (@tiptap/extension-code,@tiptap/extension-code-blockand@tiptap/extensionsat3.31.3, added in 08c80fc) and gave the rest caret ranges (^3.0.0,^3.10.7, …).In the monorepo,
bun.lockholds everything at 3.31.3, so nothing broke here. A fresh npm install, which is whatnpxdoes, behaves differently:@tiptap/extension-table3.34.0 needs@tiptap/core ^3.34.0.@tiptap/core3.31.3, so npm nests a second core 3.31.3 under@frontlit/text-editor/node_modules.extension-tablesits in that same nested folder, so Node resolves it to core 3.31.3, which doesn't haveisValidCSSStyleValue.Fix
@tiptap/*dependency of@frontlit/text-editoris now^3.31.3, so npm resolves a single tiptap version. Tiptap publishes all its packages together.bun.lockstill resolves 3.31.3; only the specifiers changed.@frontlit/previewnow gives borders the theme's border colour, asapps/sites/app/globals.cssdoes (* { @apply border-border }). Without it, Tailwind 4 defaults borders tocurrentColor, so preview cards, dividers and the header border rendered in the text colour.Changesets:
@frontlit/text-editorpatch and@frontlit/previewpatch.@frontlit/page-builderpinstext-editorexactly, so the changesets bump it too, and the preview picks up the fix once all three are released.Verified
@frontlit/preview@0.1.0-alpha.6, with thistext-editorswapped in throughoverrides, installs a single@tiptap/core(3.34.0) instead of two. The preview starts and renders a 21-page site (CourseLit'sfrontlit/folder).--bordercolour instead of the foreground colour. Utility classes such asring-primarystill win.text-editorpasses 110 of 110 andpreviewpasses 2 of 2.