Change8

astro@7.0.0-beta.3

Breaking Changes
📦 astroView on GitHub →
7 breaking4 features1 deprecations🔧 18 symbols

Summary

This release stabilizes advanced routing and custom logging features, removing their respective experimental flags and updating configuration defaults. Several legacy CLI commands and the `@astrojs/db` package have been removed in favor of external tooling.

⚠️ Breaking Changes

  • The CLI commands `astro db`, `astro login`, `astro logout`, `astro link`, and `astro init` have been removed. Users should use external database clients (like Drizzle or Kysely) directly instead of the deprecated `astro db` command.
  • Advanced routing is now enabled by default. If you were using a custom entrypoint (`src/app.ts`), you must rename it to `src/fetch.ts` or configure the `fetchFile` option in `astro.config.mjs` to point to your custom file.
  • The configuration option `experimental.advancedRouting` is removed. If you previously configured a custom entrypoint via `experimental.advancedRouting.fetchFile`, you must move it to the top-level `fetchFile` option in `astro.config.mjs`.
  • The experimental feature `experimental.queuedRendering` is removed as the new rendering engine is stable. Remove this flag from your configuration.
  • The construction of the rendering queue has been removed; Astro now uses a streaming approach for rendering and flushing components.
  • The node polling feature related to queued rendering has been removed.
  • The content cache has been descoped; only tag names are now cached.

Migration Steps

  1. If you were using `astro db`, switch to using a dedicated database client library directly.
  2. If you relied on the default advanced routing entrypoint (`src/app.ts`), rename your entrypoint file to `src/fetch.ts`.
  3. If you were using a custom entrypoint for advanced routing (e.g., `src/app.ts`), rename it to `src/fetch.ts` or update your configuration to use the top-level `fetchFile` option: `fetchFile: 'your-entrypoint.ts'`.
  4. Remove `experimental.advancedRouting: true` from your Astro configuration.
  5. If you were using custom logging via `experimental.logger`, move the configuration to the top-level `logger` option in `astro.config.mjs`.
  6. Remove the `experimental.queuedRendering: {}` block from your Astro configuration.

✨ New Features

  • Advanced routing is now enabled by default, providing full control over request flow and first-class support for frameworks like Hono.
  • The custom logger feature is now stable and available for general use, allowing replacement of default console output with custom implementations (e.g., structured JSON).
  • The `getFetchState()` function is exposed publicly from `astro/hono`, allowing third-party packages to build Hono middleware that interacts with Astro's per-request state.
  • The `FontData` type exposed via `fontData` from `astro:assets` now includes a `subset` field, enabling distinction between font entries for different subsets.

Affected Symbols

⚡ Deprecations

  • The `@astrojs/db` package is deprecated. Users are recommended to use a database client (Drizzle, Kysely, etc.) directly instead.