Skip to content

chore(deps): upgrade to Astro 7 and @astrojs/cloudflare 14 - #101

Merged
anurag629 merged 1 commit into
devfrom
security/astro-7
Oct 1, 2026
Merged

anurag629 merged 1 commit into
devfrom
security/astro-7

Conversation

@anurag629

Copy link
Copy Markdown
Member

Fixes the open Astro security alerts, including the critical image optimization RCE (fixed in 7.2.8), plus the esbuild, sharp and lodash alerts that came in through Astro 5. Replaces #99, which didn't build.

  • astro 7.3.5, @astrojs/cloudflare 14.3.3, @astrojs/react 7, @astrojs/sitemap 3.7.4, @astrojs/check 0.9.10
  • wrangler.jsonc main now points at @astrojs/cloudflare/entrypoints/server. The build writes dist/server/wrangler.json and wrangler deploy picks it up, with the same routes, observability and assets settings.
  • Astro.locals.runtime is gone in the new adapter, so the OG image and thumbnail caches use locals.cfContext.waitUntil. With the old line, cache writes would have silently stopped.
  • compressHTML: true keeps the HTML output the same (Astro 7 defaults to JSX whitespace rules)
  • session: false, since we don't use Astro sessions. Without it the adapter adds a SESSION KV binding and deploys would create a KV namespace.

Checked on Node 22: npm run check 0 errors and 0 warnings, 179 tests pass, build completes. Ran the built Worker with wrangler dev and compared 14 routes with production: same status codes and content types, and /api/og, thumbnails and /api/templates are byte-for-byte the same size. The editor hydrates with no console errors, and the 404 page looks the same as production.

Fixes the open Astro security alerts (including the critical image
optimization RCE, fixed in 7.2.8) and the esbuild, sharp and lodash
alerts that came in through Astro 5.

- wrangler main points at @astrojs/cloudflare/entrypoints/server
- Astro.locals.runtime is gone, so the OG and thumbnail caches use
  locals.cfContext.waitUntil
- compressHTML stays true so the HTML output doesn't change
- session: false, so no SESSION KV namespace is added or provisioned
@anurag629
anurag629 merged commit cb6adfe into dev Oct 1, 2026
1 check passed
@anurag629
anurag629 deleted the security/astro-7 branch October 1, 2026 18:58
anurag629 added a commit that referenced this pull request Oct 1, 2026
Astro 7 and @astrojs/cloudflare 14 (#101), dependency security updates
(#98, #100) and new tests for the template helpers (#90).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant