feat: add support for mdx in @effect/doctest - #7151
Conversation
🦋 Changeset detectedLatest commit: 2c7c3cd The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
ℹ️ Clean, well-scoped change — one test-coverage gap worth a look.
Reviewed changes
.mdxtreated as markdown inextractFile—packages/tools/doctest/src/Source.tsnow dispatches.mdxfiles to the"markdown"extraction format, matching the existing.mdhandling.- MDX extraction test — new
MDXdescribe block intest/Source.test.tsassertingSource.extract(source, "markdown")on MDX content (JSX component +ts import.meta.vitestfence). - README docs — prose and the
includeSourceglob updated todocs/**/*.{md,mdx}. - Changeset —
@effect/doctestpatch, "Support.mdxfiles".
The implementation is correct: MDX uses the same fenced-code syntax as Markdown, and Source.extract performs a plain fence scan without parsing the surrounding file, so no other changes are needed. All 7 Source.test.ts tests pass. The one gap is that the new test doesn't pin the actual new behavior (the .mdx extension dispatch in extractFile) — see the inline note.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|

Type
Description
Add support for
mdxfilesRelated