Repository navigation
Align markdown-remark with Astro and test incremental rebuilds - #2033
Conversation
Astro 7.4.1 declares a peer range of ^7.3.0 for @astrojs/markdown-remark, but the site's Markdown processor was pinned to 7.2.1. Bump it to 7.3.4. Add a regression test that builds a small site repeatedly with the real flags, cache-key helpers, patched Astro and Bun runtime. It covers reuse of unchanged pages, invalidation on document, renderer asset and deployment changes, pruning of removed paths, HTML and Markdown route parity, and SVG image metadata crossing the worker boundary.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the Markdown dependency update and added incremental-build regression coverage.
No open issues 🎉
What changed in this PR
This follow-up to #1929 aligns the frontend’s Markdown processor with Astro’s peer dependency range and adds regression coverage for incremental builds.
Changes:
- Updates
@astrojs/markdown-remarkfrom 7.2.1 to 7.3.4 and refreshes the lockfile while retaining MDX’s separate dependencies. - Adds a miniature-site test covering cache reuse, selective invalidation, removed-page cleanup, and SVG handling across prerender workers.
| File | Description |
|---|---|
src/frontend/tests/unit/incremental-build.vitest.test.ts |
Tests repeated builds using Bun, patched Astro, and production cache-key helpers. |
src/frontend/package.json |
Updates the direct Markdown processor dependency to 7.3.4. |
src/frontend/bun.lock |
Records updated dependencies and preserves older versions required by other consumers. |
Review effort: Balanced
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
docs-pr-reviewer report — [partial — phase A: key claims evaluated; phase B: not run (docs site was not served in this automated run)]Recommendation: needs human Source used: n/a — dependency/tooling (pins @astrojs/markdown-remark 7.3.4; incremental rebuild test) Phase A — claims
Phase B — doc-testerNot run; rendering of the changed pages is not browser-checked. 🤖 Posted by aspire.dev - squad (AI Agent) |
Summary
Follow-up to #1929, carrying over the two items from the review of #1927 (now closed) that still apply to
main.@astrojs/markdown-remarkpeer range: Astro 7.4.1 declares^7.3.0, but the site's Markdown processor inastro.config.mjswas pinned to 7.2.1. This bumps it to 7.3.4, which also moves the direct dependency onto the same@astrojs/internal-helpersversion as Astro (0.13.0).tests/unit/incremental-build.vitest.test.tsbuilds a small throwaway site several times with the real experimental flags,api-cache-key.ts,og-cache-key.ts, patched Astro and the Bun runtime. It checks:distand the page cacheThe test takes about 12s and needs
bunonPATH, which the validation job already provides.@astrojs/mdx@7.0.3still depends on its own exact copy of@astrojs/markdown-remark7.2.1, so two versions stay installed untilmdxis updated. The lockfile change also moves the hoistedacorn,source-map,remark-smartypantsand@astrojs/prismversions that the newmarkdown-remarkneeds; other consumers keep their previous versions nested.Third-party links and affiliations
None.
Validation
bun run build:production: passed, 32,203 pages built.bun run test:unit: passed (1163 passed, 1 skipped).bun run lint: passed.bun install --frozen-lockfile: passed.DataCloneError), droppingog-image.pngfrom the OG key, and removing deployment metadata from the API key.