chore(deps): upgrade to Astro 7, drop SSR prebundle workaround#85
Merged
kianandersson merged 4 commits intoJul 15, 2026
Merged
Conversation
Astro 7.0.5 (withastro/astro#17242) permanently fixes the Cloudflare adapter dep-optimizer race that surfaced as a missing prebundled chunk after a dev restart (withastro/astro#16933): The file does not exist at "node_modules/.vite/deps_ssr/…js" which is in the optimize deps directory. Our `force-ssr-prebundle` Vite plugin forced a fresh SSR prebundle on every restart to sidestep that race. The fix landed only on the 7.x line (not backported to 6.4.x), so removing the workaround requires the major bump: - astro 6.4.6 → 7.0.6 (Vite 8 / Rust compiler / Rolldown) - @astrojs/cloudflare 13.7.0 → 14.1.1 - @astrojs/preact 5.1.5 → 6.0.1 No app code changes needed: no experimental flags, no src/fetch.ts, no remark/rehype pipeline, and content collections use YAML loaders rather than Markdown, so none of the v7 breaking changes apply here. The `optimizeDeps.include` list stays — it addresses a separate issue (withastro/astro#16248), not this one. Verified: build, astro check, biome, 200 unit/component tests, bundle test, and 152 e2e tests all pass with the workaround removed. Co-Authored-By: Claude Opus 4.8 <[email protected]>
`astro check` under Astro 7 scanned the generated `coverage/` output (e.g. the vendored `prettify.js` shipped in the v8 HTML report), emitting a spurious ts(6133) warning. `coverage/` was the one generated directory missing from the exclude list alongside dist, test-results, and storybook-static. Excluding it drops the check surface to source only (212 → 209 files) and clears the warning. Co-Authored-By: Claude Opus 4.8 <[email protected]>
pnpm added these to satisfy its ~24h minimumReleaseAge supply-chain gate when the Astro 7 packages were freshly published (2026-07-02). The pins are only needed while those exact versions sit inside the release-age window; once they age past the threshold, `pnpm install --frozen-lockfile` resolves them without the exclude and the list becomes a no-op. Removing it keeps the workspace config clean. CI must be re-run after the packages clear the 24h gate (~2026-07-03 19:27 UTC) for the frozen-lockfile install to pass; the lockfile itself is unchanged. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Patch releases published since this branch was cut. Notably @astrojs/cloudflare 14.1.2 now prebundles astro/components and the <ClientRouter /> runtime in the dev server to prevent mid-session optimizer reloads — the same area as the removed issue 16933 workaround, which makes that removal more robust. astro 7.0.9 fixes client islands failing to hydrate after a failed first load (this site uses client:load / client:visible islands), and 7.0.7-7.0.8 pick up dev-server and build regression fixes plus a compiler update. Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
Why
Astro 7.0.5 (withastro/astro#17242) permanently fixes the Cloudflare adapter dep-optimizer race that we've been working around. It surfaced after a dev restart as a 500 referencing a missing prebundled chunk (withastro/astro#16933):
Our
force-ssr-prebundleVite plugin inastro.config.mjsforced a fresh SSR prebundle on every restart to sidestep that race. This PR removes it.Why the major bump
The fix landed only on the 7.x line — it was not backported to 6.4.x. I verified locally that simply deleting the workaround on our current Astro 6.4.6 reproduces the exact error under
astro check. So removing the workaround requires the upgrade:astro6.4.6 → 7.0.6 (Vite 8 / Rust compiler / Rolldown)@astrojs/cloudflare13.7.0 → 14.1.1@astrojs/preact5.1.5 → 6.0.1Breaking-change review
None of the Astro 6→7 breaking changes apply here: no experimental flags in the config, no
src/fetch.ts, no remark/rehype pipeline, and content collections use YAML loaders rather than Markdown (so the Sätteri default is irrelevant).pnpm-workspace.yamlgainsminimumReleaseAgeExcludeentries for the new releases — pnpm added these so the fresh versions clear the supply-chain release-age gate.The
optimizeDeps.includelist stays untouched; it addresses a separate issue (withastro/astro#16248), not this one.Verification
All pass locally with the workaround removed:
pnpm build✓ (incl. Storybook integration)astro check✓ — the previously-failing pathbiome check✓🤖 Generated with Claude Code