Releases: withastro/astro
create-astro@5.2.0
astro@7.0.3
Patch Changes
-
#17189
24d2c9eThanks @astrobot-houston! - Fixes a bug where an error thrown inside one route'sgetStaticPaths()would prevent other valid routes from being matched in dev mode -
#16932
8f4a3dbThanks @fkatsuhiro! - Fixes HMR for action files during development. Editing files insrc/actions/now takes effect on the next request without requiring a dev server restart. -
#17087
fb0ab02Thanks @jp-knj! - Fixes localized custom error pages in i18n projects so routes like/pt/404are used for missing localized pages and return the correct status code
@astrojs/upgrade@0.7.3
Patch Changes
- #17188
675d11dThanks @astrobot-houston! - Fixes@astrojs/upgradeshowing a generic error when pnpm'sminimumReleaseAgepolicy blocks installation. The error message now explains that pnpm's policy blocked the update and suggests running the install command manually.
@astrojs/markdoc@2.0.1
Patch Changes
- #17142
973ea49Thanks @astrobot-houston! - Fixes a crash when rendering shiki-highlighted code blocks inside list items
@astrojs/cloudflare@14.0.1
Patch Changes
-
#17175
7a7d879Thanks @astrobot-houston! - Fixesastro devOOM crashes for@astrojs/cloudflareusers on Vite 8 by migrating the frontmatter scan plugin to Rolldown-compatible options. -
#17187
0db4b57Thanks @matthewp! - Fixes React invalid hook warning during cold SSR optimizer reload when using ClientRouter -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.3
astro@7.0.2
Patch Changes
- Updated dependencies [
3b5e994]:- @astrojs/markdown-satteri@0.3.2
astro@7.0.1
Patch Changes
-
#17151
ccceda3Thanks @matthewp! - Fixesastro devincorrectly starting in background mode for Warp terminal users. Hybrid environments like Warp are no longer treated as AI agents for auto-background detection. -
#17158
164df87Thanks @ematipico! - Fixesastro dev --background --hostnot listing the network addresses. The background server start output andastro dev statusnow show every exposed network URL, matching the foreground dev server. -
#17141
d785b9dThanks @astrobot-houston! - Fixes responsive image CSS overriding user styles defined inside CSS@layerblocks. The generated image styles are now wrapped in@layer astro.images, ensuring they have lower cascade priority than user-defined layers. -
#17150
1a61386Thanks @matthewp! - Fixesastro dev --backgroundfailing on Windows with "Failed to spawn background dev server process"
@astrojs/markdown-satteri@0.3.2
Patch Changes
- #17165
3b5e994Thanks @Princesseuh! - Fixes headings being listed twice in a page'sheadingsmetadata when an integration (such as Starlight) assigns heading IDs with its own heading pass before adding anchor links
create-astro@5.1.0
astro@7.0.0
Major Changes
-
#16965
57ead0dThanks @Princesseuh! - Makes'jsx'the default value forcompressHTMLAstro now strips whitespace from your HTML using JSX rules by default, the same way frameworks like React do. Whitespace and line breaks around elements are removed, but meaningful whitespace within a single line — like a space between two inline elements — is preserved. To keep a space that would otherwise be removed, write it explicitly in your source, for example with
{" "}.This can change rendered output where whitespace between inline elements was previously meaningful. To keep Astro's earlier behavior, set
compressHTML: truefor HTML-aware compression, orcompressHTML: falseto preserve all whitespace. -
#16610
c63e7e4Thanks @matthewp! - Adds background dev server management for AI coding agents.When an AI coding agent is detected,
astro devnow automatically starts the dev server as a detached background process. This prevents the dev server from blocking the agent's terminal and allows it to continue working while the server runs.A lock file (
.astro/dev.json) is written when the dev server starts, recording the server's URL, port, and PID. This prevents duplicate servers from being started for the same project.New flag and subcommands
astro dev --background— Start the dev server as a background process (this is what runs automatically when an agent is detected).astro dev stop— Stop a running background dev server.astro dev status— Check if a dev server is running and display its URL, PID, and uptime.astro dev logs— View logs from a background dev server. Use--follow(-f) to stream new output as it's written.
These allow you to start and manage dev servers programmatically and were designed with AI coding agents in mind.
What should I do?
No action is required. If you are not using an AI coding agent,
astro devbehaves exactly as before. If you are using an agent, background mode is enabled automatically — the agent will receive the server URL and PID, and can useastro dev stopto shut it down.To opt out of automatic background mode when an agent is detected, set the environment variable
ASTRO_DEV_BACKGROUND=0before runningastro dev. -
#17010
0606073Thanks @ocavue! - Removes the@astrojs/dbpackage as it is no longer maintained.The
@astrojs/dbpackage were deprecated in v6.4.5 and is now removed. This means theastro db,astro login,astro logout,astro link, andastro initCLI commands have also been removed.If you were using Astro DB in your project, remove
@astrojs/dbfrom your project's dependencies and replace it with one of the following alternatives:- Node.js built-in SQLite: Node.js now includes a built-in
node:sqlitemodule (available since Node.js v22.5.0). This is a good option if you are using the Node.js adapter and were using@astrojs/dbfor local SQLite storage. - Drizzle ORM: If you were using
@astrojs/dbfor its Drizzle-based schema and query API, you can use Drizzle directly with any supported database. - Other database libraries: Use any database library that suits your deployment platform (e.g. Turso, PlanetScale, Neon).
- Node.js built-in SQLite: Node.js now includes a built-in
-
#16462
c30a778Thanks @Princesseuh! - Replaces the Go compiler with a Rust-based version.The Rust-based Astro compiler (
@astrojs/compiler-rs) is now the default compiler. This new compiler is faster and more reliable, leading to faster build times and iteration cycles during development.This new compiler is more strict regarding invalid syntax. For example, unclosed HTML tags will now throw an error instead of being ignored. It also does not attempt to correct semantically invalid HTML anymore, instead leaving it to the browser to handle, similar to other tools or
document.write()in JavaScript.The previous Go-based compiler has been removed, along with the
experimental.rustCompilerflag used to opt into the Rust compiler. If you were settingexperimental.rustCompilerin yourastro.config.mjs, you can now remove it. No other action is required. -
#16966
6650ec2Thanks @Princesseuh! - Makes Sätteri the default Markdown processorAstro now renders
.mdfiles withsatteri()from@astrojs/markdown-satteri, its native Markdown pipeline, instead of the remark/rehype pipeline.@astrojs/markdown-remarkis no longer installed by default.To keep using the remark/rehype pipeline, install
@astrojs/markdown-remarkand set it as your processor:// astro.config.mjs import { defineConfig } from 'astro/config'; import { unified } from '@astrojs/markdown-remark'; export default defineConfig({ markdown: { processor: unified(), }, });
The deprecated
markdown.remarkPlugins,markdown.rehypePlugins, andmarkdown.remarkRehypeoptions still work, but now require@astrojs/markdown-remarkto be used. -
#16877
3b7d76eThanks @matthewp! - Enables advanced routing by default.The advanced routing feature introduced behind a flag in v6.3.0 is no longer experimental and is now enabled by default.
This gives full control over how requests flow through your application, with first-class support for frameworks like Hono.
Advanced routing now uses
src/fetch.tsas default entrypoint instead ofsrc/app.ts.If you were previously using this feature without a custom entrypoint, please configure
fetchFileor rename your entrypoint tosrc/fetch.ts, and then remove the experimental flag from your Astro config:import { defineConfig } from 'astro/config'; export default defineConfig({ experimental { - advancedRouting: true, }, + fetchFile: 'app.ts' // optional, you only need this if you cannot rename your entrypoint. });fetchFileis now a top-level config option instead of being nested underexperimental.advancedRouting. If you were using a custom entrypoint, please update your Astro config to move its configuration:// astro.config.mjs export default defineConfig({ - experimental: { - advancedRouting: { - fetchFile: 'my-custom-entrypoint.ts', - }, - }, + fetchFile: 'my-custom-entrypoint.ts', })You can also set
fetchFile: nullto disable the entrypoint if you are usingsrc/fetch.tsfor another purpose, or don’t need advanced routing features.If you have been waiting for stabilization before using advanced routing, you can now do so.
Please see the advanced routing guide in docs for more about this feature.
-
#16725
10229f7Thanks @ArmandPhilippot! - Removes deprecated APIs exported fromastro:transitions.In Astro 6.x, some helpers available in
astro:transitionsandastro:transitions/clientwere deprecated.In Astro 7.0, the following APIs can no longer be used in your project:
TRANSITION_BEFORE_PREPARATIONTRANSITION_AFTER_PREPARATIONTRANSITION_BEFORE_SWAPTRANSITION_AFTER_SWAPTRANSITION_PAGE_LOADisTransitionBeforePreparationEvent()isTransitionBeforeSwapEvent()createAnimationScope()
What should I do?
Remove any occurrence of
createAnimationScope():-import { createAnimationScope } from 'astro:transitions';Replace any occurrence of the other APIs using the lifecycle event names directly:
-import { - TRANSITION_AFTER_SWAP, - isTransitionBeforePreparationEvent, -} from 'astro:transitions/client'; -console.log(isTransitionBeforePreparationEvent(event)); +console.log(event.type === 'astro:before-preparation'); -console.log(TRANSITION_AFTER_SWAP); +console.log('astro:after-swap');
Learn more about all utilities available in the View Transitions Router API Reference.
