dx(poc): migrate to satteri md processor#31680
Conversation
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
This is to avoid product owners being tagged for this PR.
There was a problem hiding this comment.
This POC migrates the markdown pipeline from Astro's native remark/rehype to @astrojs/markdown-satteri. 3 issues need attention before merge: a noisy lockfile downgrade, an unrelated changelog edit, and a potential content-loss bug in the title-figure plugin.
Issues
- HIGH
pnpm-lock.yamldowngrades many unrelated transitive dependencies (esbuild 0.28.1 → 0.28.0, rollup 4.62.0 → 4.61.0, undici 6.27.0 → 6.26.0, etc.). Adding a new package should not roll back unrelated deps. Regenerate withpnpm install --frozen-lockfile. - HIGH
astro.config.tshardcodesRUN_LINK_CHECK = false. Acceptable for a POC branch, but ensure there is a tracking TODO/issue so it is not forgotten if this ever targetsproduction. - MEDIUM
src/plugins/satteri/title-figure.tscan silently drop non-image paragraph children when images are mixed with text or other elements. The originalrehype-title-figureonly processed paragraphs that contained exclusively images. - LOW
src/content/changelog/waf/2026-05-04-waf-release.mdxcontains only whitespace changes unrelated to the migration. Revert to keep the diff focused.
|
|
||
| const RUN_LINK_CHECK = | ||
| process.env.RUN_LINK_CHECK?.toLowerCase() === "true" || false; | ||
| // Temporarily disabled during the satteri migration; re-enable once link validation is green. |
There was a problem hiding this comment.
Add a tracking prefix so this does not get lost:
| // Temporarily disabled during the satteri migration; re-enable once link validation is green. | |
| // TODO(satteri): Temporarily disabled during the satteri migration; re-enable once link validation is green. |
| (child): child is Element => | ||
| child.type === "element" && child.tagName === "img", | ||
| ); |
There was a problem hiding this comment.
Add a guard so paragraphs with mixed content are not stripped of their non-image children:
| (child): child is Element => | |
| child.type === "element" && child.tagName === "img", | |
| ); | |
| if (images.length === 0) { | |
| return; | |
| } | |
| if (images.length !== node.children.length) { | |
| return; | |
| } |
|
Posted a review on PR #31680 and added the What the PR does Flagged issues
No commits were pushed. |
This reverts commit ae860c1. This change is actually needed to satisfy oxc.
This makes oxc happy.
Note: I manually reverted this commit to make sure the lock file didn't get into a weird state.
Note: This may be a bug upstream in @astrojs/mdx, but I'm not sure yet.
Rebased version of #31522.
Note: This is not really meant to be public. But CI only runs when you open a PR so here we are. All tagged reviewers should ignore.