Change8

@astrojs/cloudflare@13.0.0-alpha.4

📦 astro
🐛 1 fixes4 deprecations🔧 7 symbols

Summary

This patch fix improves Cloudflare default binding provisioning and introduces explicit deprecation errors for Astro.locals.runtime properties to facilitate the migration to Astro v6.

Migration Steps

  1. Replace Astro.locals.runtime.env with import { env } from 'cloudflare:workers'.
  2. Replace Astro.locals.runtime.cf with Astro.request.cf.
  3. Replace Astro.locals.runtime.caches with the global caches object.
  4. Replace Astro.locals.runtime.ctx with Astro.locals.cfContext.

🐛 Bug Fixes

  • Fixes auto-provisioning of default bindings (SESSION KV, IMAGES, and ASSETS) on Cloudflare so they are applied even when a wrangler.json file exists, unless manually defined.

🔧 Affected Symbols

Astro.locals.runtimeAstro.locals.runtime.envAstro.locals.runtime.cfAstro.locals.runtime.cachesAstro.locals.runtime.ctxAstro.locals.cfContextAstro.request.cf

⚡ Deprecations

  • Astro.locals.runtime.env is deprecated; use import { env } from 'cloudflare:workers' instead.
  • Astro.locals.runtime.cf is deprecated; use Astro.request.cf instead.
  • Astro.locals.runtime.caches is deprecated; use the global caches object instead.
  • Astro.locals.runtime.ctx is deprecated; use Astro.locals.cfContext instead.