Prototype: extract pure sync/MDX modules into a standalone offlinedocs slice (split of #27390) - #28502
Closed
nickvigilante wants to merge 1 commit into
Conversation
…s slice Splits the dependency-light pieces of the Fumadocs migration (PR #27390) into a standalone slice for separate review: - scripts/lib: manifest/route model + Markdown to MDX transform library - src/mdx-plugins: remark/rehype plugins (coder tabs, details accordion, github callouts, step TOC numbers, mdast helpers) - the tests for both Why this also removes the legacy app: the extracted transform depends on fumadocs-core (js-yaml 4), which conflicts with the old Next 15 / Chakra app's pinned js-yaml 3, so the two dependency sets cannot coexist in one package.json. The old app therefore moves to a follow-up PR B that adds the Fumadocs Next app on top of this slice. Trade-off: the offlinedocs build check is red on this branch by design (no app to build until PR B). The library test, typecheck, and format checks are green. Comments were trimmed to the minimum needed to explain non-obvious intent (396 to 167 whole-line comments across the moved sources). DOCS-708
Contributor
Author
|
Closing as superseded. This prototype answered its question (the pure sync/MDX modules can be extracted and stay green), but the docs engine is being re-homed into its own repository and rebuilt there as packages, so this coder/coder branch is no longer the path forward. Thanks to everyone who looked. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What this is
A prototype that carves the pure, dependency-light half of the Fumadocs
migration (#27390) into its own reviewable slice. I opened it to answer a
concrete question from that PR's review: can #27390 be broken into smaller
chunks without breaking things?
Short answer: it can be split for review, but not into two independently
green PRs. See "Trade-off" below before treating this as landable.
What moved here
scripts/lib/- the manifest/route model plus the Markdown to MDX transform librarysrc/mdx-plugins/- the remark/rehype plugins (coder tabs, details accordion, github callouts, step TOC numbers) and the shared mdast helpersThese modules import only the Node stdlib,
fumadocs-core, and each other.No app wiring, no Chakra, no Next.js in this slice.
Size
pnpm-lock.yamlpnpm-lock.yaml(regenerated)For comparison, the full base PR #27390 is +7,014 / -4,472. The lockfile
shrinks here because removing the legacy Next.js/Chakra app drops far more
locked dependencies than
fumadocs-coreadds.Trade-off: why the build check is red here
The extracted transform depends on
fumadocs-core, which pullsjs-yaml4.The legacy offlinedocs app pins
js-yaml3 (via its Next 15 / Chakra stack),so both dependency sets cannot coexist in one
package.json. To keep thisslice's own checks green, it removes the legacy app and ships a minimal
package.jsonscoped to the library.The consequence is that the offlinedocs build check is red on this branch
by design: there is no app to build until the follow-up PR (PR B) adds the
Fumadocs Next.js app on top of this slice. The library
test,lint(tsc --noEmit), and
format:checkscripts are all green.So the split buys reviewability (2,390 lines of pure logic reviewed on
their own, no lockfile noise) but not independent landability: PR A + PR B
together equal #27390, and only the pair is green.
Comments
Trimmed to the minimum needed to explain non-obvious intent: whole-line
comments across the moved sources went from 396 to 167 (-58%), comment-only
with no code changes. Non-obvious rationale (for example the OS-tab grouping
and the homepage-mapped section ordering) is kept.
Verification
pnpm test- 66 pass (35 route/transform + 31 mdx-plugins), 0 failpnpm lint(tsc --noEmit) - cleanpnpm format:check- cleanLinks