Releases · withastro/astro · GitHub
Skip to content

Releases: withastro/astro

create-astro@5.2.0

25 Jun 16:17
f7283e0

Choose a tag to compare

Minor Changes

  • #17185 d64b09b Thanks @delucis! - Adds a --no-ai flag to allow users to opt out of creating AGENTS.md and CLAUDE.md files when running create astro

astro@7.0.3

25 Jun 16:17
f7283e0

Choose a tag to compare

Patch Changes

  • #17189 24d2c9e Thanks @astrobot-houston! - Fixes a bug where an error thrown inside one route's getStaticPaths() would prevent other valid routes from being matched in dev mode

  • #16932 8f4a3db Thanks @fkatsuhiro! - Fixes HMR for action files during development. Editing files in src/actions/ now takes effect on the next request without requiring a dev server restart.

  • #17087 fb0ab02 Thanks @jp-knj! - Fixes localized custom error pages in i18n projects so routes like /pt/404 are used for missing localized pages and return the correct status code

@astrojs/upgrade@0.7.3

25 Jun 16:17
f7283e0

Choose a tag to compare

Patch Changes

  • #17188 675d11d Thanks @astrobot-houston! - Fixes @astrojs/upgrade showing a generic error when pnpm's minimumReleaseAge policy 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

25 Jun 16:17
f7283e0

Choose a tag to compare

Patch Changes

@astrojs/cloudflare@14.0.1

25 Jun 16:17
f7283e0

Choose a tag to compare

Patch Changes

  • #17175 7a7d879 Thanks @astrobot-houston! - Fixes astro dev OOM crashes for @astrojs/cloudflare users on Vite 8 by migrating the frontmatter scan plugin to Rolldown-compatible options.

  • #17187 0db4b57 Thanks @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

23 Jun 16:22
a39b7a8

Choose a tag to compare

Patch Changes

  • Updated dependencies [3b5e994]:
    • @astrojs/markdown-satteri@0.3.2

astro@7.0.1

23 Jun 14:17
2141320

Choose a tag to compare

Patch Changes

  • #17151 ccceda3 Thanks @matthewp! - Fixes astro dev incorrectly starting in background mode for Warp terminal users. Hybrid environments like Warp are no longer treated as AI agents for auto-background detection.

  • #17158 164df87 Thanks @ematipico! - Fixes astro dev --background --host not listing the network addresses. The background server start output and astro dev status now show every exposed network URL, matching the foreground dev server.

  • #17141 d785b9d Thanks @astrobot-houston! - Fixes responsive image CSS overriding user styles defined inside CSS @layer blocks. The generated image styles are now wrapped in @layer astro.images, ensuring they have lower cascade priority than user-defined layers.

  • #17150 1a61386 Thanks @matthewp! - Fixes astro dev --background failing on Windows with "Failed to spawn background dev server process"

@astrojs/markdown-satteri@0.3.2

23 Jun 16:22
a39b7a8

Choose a tag to compare

Patch Changes

  • #17165 3b5e994 Thanks @Princesseuh! - Fixes headings being listed twice in a page's headings metadata when an integration (such as Starlight) assigns heading IDs with its own heading pass before adding anchor links

create-astro@5.1.0

22 Jun 10:10
f55ba4c

Choose a tag to compare

Minor Changes

  • #17122 cbd6123 Thanks @matthewp! - Adds a default AGENTS.md file to new projects with dev server instructions and documentation links. Also creates a CLAUDE.md symlink (with hard link fallback) pointing to AGENTS.md.

astro@7.0.0

22 Jun 10:10
f55ba4c

Choose a tag to compare

Major Changes

  • #15819 cafec4e Thanks @delucis! - Upgrade to Vite v8

  • #16965 57ead0d Thanks @Princesseuh! - Makes 'jsx' the default value for compressHTML

    Astro 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: true for HTML-aware compression, or compressHTML: false to preserve all whitespace.

  • #16610 c63e7e4 Thanks @matthewp! - Adds background dev server management for AI coding agents.

    When an AI coding agent is detected, astro dev now 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 dev behaves 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 use astro dev stop to shut it down.

    To opt out of automatic background mode when an agent is detected, set the environment variable ASTRO_DEV_BACKGROUND=0 before running astro dev.

  • #17010 0606073 Thanks @ocavue! - Removes the @astrojs/db package as it is no longer maintained.

    The @astrojs/db package were deprecated in v6.4.5 and is now removed. This means the astro db, astro login, astro logout, astro link, and astro init CLI commands have also been removed.

    If you were using Astro DB in your project, remove @astrojs/db from 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:sqlite module (available since Node.js v22.5.0). This is a good option if you are using the Node.js adapter and were using @astrojs/db for local SQLite storage.
    • Drizzle ORM: If you were using @astrojs/db for 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).
  • #16462 c30a778 Thanks @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.rustCompiler flag used to opt into the Rust compiler. If you were setting experimental.rustCompiler in your astro.config.mjs, you can now remove it. No other action is required.

  • #16966 6650ec2 Thanks @Princesseuh! - Makes Sätteri the default Markdown processor

    Astro now renders .md files with satteri() from @astrojs/markdown-satteri, its native Markdown pipeline, instead of the remark/rehype pipeline. @astrojs/markdown-remark is no longer installed by default.

    To keep using the remark/rehype pipeline, install @astrojs/markdown-remark and 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, and markdown.remarkRehype options still work, but now require @astrojs/markdown-remark to be used.

  • #16877 3b7d76e Thanks @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.ts as default entrypoint instead of src/app.ts.

    If you were previously using this feature without a custom entrypoint, please configure fetchFile or rename your entrypoint to src/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.
    });

    fetchFile is now a top-level config option instead of being nested under experimental.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: null to disable the entrypoint if you are using src/fetch.ts for 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 10229f7 Thanks @ArmandPhilippot! - Removes deprecated APIs exported from astro:transitions.

    In Astro 6.x, some helpers available in astro:transitions and astro:transitions/client were deprecated.

    In Astro 7.0, the following APIs can no longer be used in your project:

    • TRANSITION_BEFORE_PREPARATION
    • TRANSITION_AFTER_PREPARATION
    • TRANSITION_BEFORE_SWAP
    • TRANSITION_AFTER_SWAP
    • TRANSITION_PAGE_LOAD
    • isTransitionBeforePreparationEvent()
    • 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.

Minor Changes

Read more