astro@7.0.0-alpha.2
Breaking Changes📦 astroView on GitHub →
⚠ 2 breaking✨ 2 features🐛 2 fixes🔧 17 symbols
Summary
This release introduces background management for the development server, primarily benefiting AI coding agents, and removes several deprecated APIs related to View Transitions. It also cleans up internal routing APIs and fixes a proxy header handling bug in `Astro.request.url`.
⚠️ Breaking Changes
- Removed deprecated APIs exported from `astro:transitions` and `astro:transitions/client`: `TRANSITION_BEFORE_PREPARATION`, `TRANSITION_AFTER_PREPARATION`, `TRANSITION_BEFORE_SWAP`, `TRANSITION_AFTER_SWAP`, `TRANSITION_PAGE_LOAD`, `isTransitionBeforePreparationEvent()`, `isTransitionBeforeSwapEvent()`, and `createAnimationScope()`. These must be replaced by using lifecycle event names directly or other methods.
- Removed `state.provide()`, `state.resolve()`, `state.finalizeAll()`, and `App.Providers` from the public advanced routing API. Integrations relying on these should switch to using `locals` to share per-request state.
Migration Steps
- Remove any usage of `createAnimationScope()` and update imports from `astro:transitions/client`.
- Replace usages of deprecated transition lifecycle constants (e.g., `TRANSITION_AFTER_SWAP`) with their string literal equivalents (e.g., `'astro:after-swap'`).
- Replace calls to `isTransitionBeforePreparationEvent(event)` with `event.type === 'astro:before-preparation'`.
- Integrations using the removed advanced routing context providers (`state.provide()`, etc.) must switch to using `locals` for sharing per-request state.
✨ New Features
- Added background dev server management for AI coding agents: `astro dev` now automatically starts the dev server as a detached background process when an agent is detected, writing a lock file (`.astro/dev.json`).
- Introduced new CLI subcommands for background dev server management: `astro dev --background` (to explicitly start in background mode), `astro dev stop` (to stop a background server), `astro dev status`, and `astro dev logs`.
🐛 Bug Fixes
- Fixed an issue where `Astro.request.url` did not reflect validated `X-Forwarded-Proto`/`X-Forwarded-Host` headers when `security.allowedDomains` was configured, causing divergence from `Astro.url` behind proxies.
- Improved the warning when accessing `Astro.session` without session storage configured; the property is now always defined on the context object, logging a helpful message instead of silently returning `undefined`.
Affected Symbols
astro:transitionsastro:transitions/clientTRANSITION_BEFORE_PREPARATIONTRANSITION_AFTER_PREPARATIONTRANSITION_BEFORE_SWAPTRANSITION_AFTER_SWAPTRANSITION_PAGE_LOADisTransitionBeforePreparationEvent()isTransitionBeforeSwapEvent()createAnimationScope()state.provide()state.resolve()state.finalizeAll()App.ProvidersAstro.sessionAstro.request.urlAstro.url