🚨 [security] Update astro 5.18.2 → 6.4.8 (major) - #452
Merged
Conversation
MarleenEliza
changed the base branch from
main
to
feat/migrate-to-workers-cloudflare
July 3, 2026 13:03
…ate/npm/astro-6.4.8
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
head-start | fe8df88 | Commit Preview URL Branch Preview URL |
Jul 23 2026, 12:28 PM |
- Bump astro to ^6.4.8 and @astrojs/cloudflare to ^13.7.0 (v6 peer) - Move content config to src/content.config.ts (v6 required location) - Move fonts out of experimental (now stable) in astro.config - Drop removed platformProxy adapter option; skip adapter under Vitest (v13 Cloudflare Vite plugin rejects Astro's SSR resolve.external) - Point wrangler main at @astrojs/cloudflare/entrypoints/server (v13) - Fix postbuild readme cleanup path for new dist/client output layout - Serve dev service worker via Vite middleware instead of a route, since v13 runs dev routes in workerd where esbuild's __filename is undefined
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.
Upgrade to Astro 6
Bumps Astro to
^6.4.8and migrates the codebase per the official v5 → v6 guide. The initial dependency bump broke CI (ERESOLVEpeer conflict); this PR carries the full set of migration changes needed to get green.Changes
Dependencies
@astrojs/cloudflare^12.6.7→^13.7.0— v13 is the release that peersastro@^6(this was the root cause of the failingnpm ci).Content collections
src/content/config.ts→src/content.config.ts(v6 required location) and updated importers (src/lib/content/*). Collections already used the Content LayerloaderAPI, so no data-layer migration was needed.Config (
astro.config.ts)fontsout ofexperimental(now a stable top-level option).platformProxyadapter option (removed in adapter v13; the Cloudflare Vite plugin handles local bindings automatically).resolve.externallist Astro sets on the SSR env, which otherwise breaksgetViteConfigin tests..envvialoadEnvinto theastro:envdefaults so localnpm run buildworks from.envalone.Otherwise:
Cloudflare / Workers
wrangler.tomlmain→@astrojs/cloudflare/entrypoints/server(v13 entrypoint).dist/client/static output layout.Service worker (dev)
/service-worker.jsin dev via a Vite dev-server middleware instead of an on-demand route. Since v13 runs dev routes in Cloudflare'sworkerdruntime, running esbuild inside the request handler crashed with__filename is not defined. Vite middleware runs in Node, so esbuild works there. Production (astro:build:done) is unchanged.Verification
npm ciresolves cleanly-
lint:eslint,lint:astro(0 errors)test:unit— 243 passednpm run buildcompletes; prerenders all routeslint:html— 0 errorswrangler deploy --dry-run— bindings resolve, assets read fromdist/clientastro dev— pages +/service-worker.jsserve correctly🚨 Your current dependencies have known security vulnerabilities 🚨
This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ astro (5.18.2 → 6.4.8) · Repo · Changelog
Security Advisories 🚨
🚨 Astro: Reflected XSS via unescaped slot name
🚨 Astro: Host header SSRF in prerendered error page fetch
🚨 Astro: XSS via Unescaped Attribute Names in Spread Props
🚨 Astro: Server island encrypted parameters vulnerable to cross-component replay
🚨 Astro: XSS in define:vars via incomplete </script> tag sanitization
Release Notes
Too many releases to show here. View the full release notes.
Sorry, we couldn't find anything useful about this release.
Sorry, we couldn't find anything useful about this release.
Release Notes
3.3.2 (from changelog)
3.3.1 (from changelog)
Does any of this look wrong? Please let us know.
Release Notes
4.2.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
Release Notes
4.2.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
Release Notes
4.2.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
Release Notes
7.3.0
7.2.0
7.1.1
7.1.0
7.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
Release Notes
9.3.0
9.2.0
9.1.2
9.1.1
9.1.0
9.0.1
9.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
Release Notes
7.0.1
7.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
Release Notes
4.2.0
4.1.0
4.0.2
4.0.1
4.0.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
Release Notes
1.7.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
🆕 @clack/core (added, 1.4.2)
🆕 @clack/prompts (added, 1.6.0)
🆕 @shikijs/primitive (added, 4.2.0)
🆕 get-tsconfig (added, 5.0.0-beta.4)
🆕 resolve-pkg-maps (added, 1.0.0)
🆕 tinyclip (added, 0.1.15)
🆕 @astrojs/compiler (added, 4.0.0)
🆕 @astrojs/internal-helpers (added, 0.10.0)
🆕 is-docker (added, 4.0.0)
🆕 vite (added, 7.3.5)
🗑️ ansi-align (removed)
🗑️ tsconfck (removed)
🗑️ zod-to-ts (removed)
🗑️ base-64 (removed)
🗑️ boxen (removed)
🗑️ cli-boxes (removed)
🗑️ deterministic-object-hash (removed)
🗑️ import-meta-resolve (removed)
🗑️ yocto-spinner (removed)
🗑️ zod-to-json-schema (removed)
🗑️ typescript (removed)
🗑️ type-fest (removed)
🗑️ widest-line (removed)
🗑️ camelcase (removed)
🗑️ common-ancestor-path (removed)
🗑️ es-module-lexer (removed)
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with
@depfu rebase.All Depfu comment commands