Skip to content

🐛 fix(docs): strip HTML comments from generated changelog MDX#434

Closed
scttbnsn wants to merge 1 commit into
mainfrom
fix/docs-changelog-mdx-comment
Closed

🐛 fix(docs): strip HTML comments from generated changelog MDX#434
scttbnsn wants to merge 1 commit into
mainfrom
fix/docs-changelog-mdx-comment

Conversation

@scttbnsn

Copy link
Copy Markdown
Contributor

Problem

Every drydock-website Vercel deploy (production + preview) has failed since ~2026-06-13:

./apps/web/content/docs/v1.5/changelog/index.mdx
16:2: Unexpected character `!` (U+0021) before name ... (note: to create a comment in MDX, use {/* text */})
Error: Turbopack build failed

sync-docs.mjs copies CHANGELOG.md verbatim into the fumadocs MDX source. The <!-- ... --> upgrade-notes maintainer note in the [Unreleased] section is valid in the GitHub-rendered CHANGELOG but MDX v3 rejects HTML comments, failing the build. getdrydock.com production has been stuck on the last good build for ~2 days.

Fix

Strip HTML comments during MDX generation (they are maintainer-only notes, not published-docs content) and collapse the blank-line gap. CHANGELOG.md stays GitHub-valid and unchanged. Root-cause fix in the generator, so future CHANGELOG comments can't break the build.

Verification

  • node apps/web/scripts/sync-docs.mjs → generated v1.5/changelog/index.mdx has 0 <!--.
  • Full npm run build in apps/web passes (240+ docs pages generated incl. changelog).

1 file changed, 9 insertions(+), 1 deletion(-).

sync-docs.mjs copied CHANGELOG.md verbatim into the fumadocs MDX source.
The <!-- ... --> maintainer note in the [Unreleased] section is valid in the
GitHub-rendered CHANGELOG but MDX v3 rejects HTML comments, failing the
Turbopack build (drydock-website production + preview deploys erroring since
2026-06-13). Strip HTML comments during generation (they are not published-docs
content) and collapse the resulting blank-line gap. CHANGELOG.md stays
GitHub-valid and unchanged.
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drydock-website Ready Ready Preview, Comment Jun 15, 2026 12:33pm
drydockdemo-website Ready Ready Preview, Comment Jun 15, 2026 12:33pm

Comment on lines +35 to +37
const body = changelogMd
.replace(/^# Changelog\n/, "")
.replace(/<!--[\s\S]*?-->/g, "")
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: build-time docs generator fix to strip HTML comments from the generated changelog MDX. Unblocks the drydock-website production deploy. Required checks green; E2E correctly path-skipped for a docs-only change.

@ALARGECOMPANY ALARGECOMPANY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second code-owner approval. Fix is scoped to apps/web/scripts/sync-docs.mjs; output verified to contain no residual HTML comments.

@scttbnsn

Copy link
Copy Markdown
Contributor Author

Superseded by #435 (v1.5.0-rc.36), which folds in the same generated-changelog HTML-comment fix as a CodeQL-clean indexOf scan (commit on main: 423b6b0). Closing in favor of the RC bundle.

@scttbnsn scttbnsn closed this Jun 15, 2026
@scttbnsn scttbnsn deleted the fix/docs-changelog-mdx-comment branch June 15, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants