Repository navigation
Hold mdast-util-to-markdown at 2.1.2 in the npm and bun scaffolds - #277
Merged
Merged
Conversation
mdast-util-to-markdown 2.1.3 (2026-09-27) writes bold and italic only through a handler's `attention`. The MDX stringifier of fumadocs-core 16.15.4, which the site pins, wraps every handler without that property, so the site build recursed until the stack overflowed (fuma-nama/fumadocs#3604, fixed in fumadocs-core 16.15.15). The pnpm scaffold kept building because its committed lockfile holds 2.1.2. The npm and bun scaffolds ship no lockfile, so a fresh install took 2.1.3, and both manager walks have failed on main since then. The npm and bun manifests now carry `overrides` pinning 2.1.2, and both managers honour it. JSON cannot hold a comment, so the README explains the override to the adopter. The integration test asserts the bound on the emitted bytes, and checks that the pnpm lockfile holds the same version. It also fails once the site moves to a fumadocs-core that has the fix, so that the bound and its README paragraph are removed in that same change. Closes #276. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #276.
Problem
Manager acceptance (npm)andManager acceptance (bun)have been failing on main since 2026-09-27, and they are what blocks #275's CI. On a fresh npm or bun scaffold, the site build fails withRangeError: Maximum call stack size exceeded, raised betweenfumadocs-core/dist/mdx-plugins/stringifier.jsandmdast-util-to-markdown/lib/handle/strong.js. #275 did not cause this. Re-running main's last green run (35607538919, e3ab335) fails the npm job the same way, and so do both walks run locally on an unmodified main.The cause is
mdast-util-to-markdown@2.1.3, published 2026-09-27. In that release, bold and italic are written only through a handler'sattentionproperty. The MDX stringifier infumadocs-core@16.15.4, the version the scaffold pins, wraps every handler without copying that property.containerPhrasingtherefore calls the wrapper, the wrapper callsstrong, andstrongcallscontainerPhrasingagain, without end. Upstream tracks this as fuma-nama/fumadocs#3604. It is fixed in fumadocs-core 16.15.15 (fuma-nama/fumadocs@7b83e88). The pnpm scaffold kept passing because its committed lockfile holds 2.1.2. The npm and bun scaffolds ship no lockfile (decision 25), so they resolved 2.1.3. #276 has the full evidence, including a control that changes only this one version.Solution
transformManifestnow writes"overrides": { "mdast-util-to-markdown": "2.1.2" }into the npm and bun manifests. Both managers read the field. The value lives in one constant inmanager.ts, with a comment that names the upstream issue and says when to remove it. A JSON manifest cannot carry that comment to the adopter, so a shortnpm bunparagraph in the scaffold README explains the override and when to delete it. The pnpm scaffold has not changed.I chose this over moving the scaffold to Fumadocs 16.15.15 because that move covers eleven patch releases of shell changes. They include tabs regrouped by root folder, the search dialog rebuilt as a combobox,
components/ui/scroll-arearemoved, andsideEffectsdeclared. Following #217, the move would also mean re-checking the four behaviours the scaffold cites by version and running the browser suites. That is maintenance work that should be its own change, not part of unblocking CI.Behaviour
installandbuildwork again, withmdast-util-to-markdownresolving to 2.1.2.init-manager.integration.test.tsasserts the bound in the emitted npm and bun manifests and READMEs. It also asserts that no override is emitted for pnpm, and that the pnpm lockfile holds only 2.1.2. It fails once the site template'sfumadocs-corereaches 16.15.15, and the failure message says to remove the bound and its README paragraph. The Fumadocs move therefore cannot leave a stale pin in adopters' repositories.@panaversity/ksorpatch, with a note telling existing npm and bun adopters what to add if their build fails.Verified locally (Node 24.18, npm 11.16, bun 1.3.6, pnpm 11.22)
node scripts/manager-acceptance.mjs npm, on main and then on this branchoknode scripts/manager-acceptance.mjs bun, on main and then on this branchoknpm: expected undefined to deeply equal { 'mdast-util-to-markdown': '2.1.2' }fumadocs-core16.15.15 (reverted afterwards)pnpm lint:ci,fmt:ci,typecheck,guard,check:corpus,test:unit,build,publintpnpm test:integrationpnpm changeset status --since=origin/main@panaversity/ksorpatchNot run locally: the browser suites (
pnpm test:e2e) andpnpm test:db. CI ran both on this branch, in run 36862647661, and every job passed, including both manager walks.🤖 Generated with Claude Code