Skip to content

Releases: withastro/astro

@astrojs/netlify@7.0.13

10 Jun 17:28
19ad1b4

Choose a tag to compare

Patch Changes

  • #17018 1310277 Thanks @matthewp! - Hardens remotePatterns regex generation to match canonical wildcard semantics more strictly

  • Updated dependencies []:

    • @astrojs/underscore-redirects@1.0.3

astro@6.4.5

09 Jun 12:46
0b879fb

Choose a tag to compare

Patch Changes

  • #16985 4ecff32 Thanks @maximslo! - Fixes the experimental.logger destination not being used for the "Server listening on..." startup message. The logger is now resolved before the server starts listening, and adapterLogger re-creates itself when the underlying logger changes so the startup message uses the correct destination.

  • #16947 e0703a6 Thanks @ematipico! - Fixes Astro.request.url not reflecting validated X-Forwarded-Proto/X-Forwarded-Host headers when security.allowedDomains is configured. Previously, only Astro.url was updated with the forwarded origin while Astro.request.url retained the socket-derived URL, causing the two to diverge behind TLS-terminating proxies.

  • #16997 dc45246 Thanks @matthewp! - Reverts a change to isNode runtime detection that caused a significant build time regression for Cloudflare adapter users with large prerendered sites

@astrojs/node@10.1.4

09 Jun 12:46
0b879fb

Choose a tag to compare

Patch Changes

  • #16985 4ecff32 Thanks @maximslo! - Fixes the experimental.logger destination not being used for the "Server listening on..." startup message. The logger is now resolved before the server starts listening, and adapterLogger re-creates itself when the underlying logger changes so the startup message uses the correct destination.

@astrojs/mdx@6.0.3

09 Jun 12:46
0b879fb

Choose a tag to compare

Patch Changes

  • #16969 4a31f90 Thanks @Princesseuh! - Adds support for Prism syntax highlighting to the Sätteri Markdown and MDX processors. Setting markdown.syntaxHighlight to 'prism' now highlights your code blocks with Prism.

    // astro.config.mjs
    import { satteri } from '@astrojs/markdown-satteri';
    
    export default defineConfig({
      markdown: {
        processor: satteri(),
        syntaxHighlight: 'prism',
      },
    });

@astrojs/markdown-satteri@0.3.0

09 Jun 12:46
0b879fb

Choose a tag to compare

Minor Changes

  • #16969 4a31f90 Thanks @Princesseuh! - Adds support for Prism syntax highlighting to the Sätteri Markdown and MDX processors. Setting markdown.syntaxHighlight to 'prism' now highlights your code blocks with Prism.

    // astro.config.mjs
    import { satteri } from '@astrojs/markdown-satteri';
    
    export default defineConfig({
      markdown: {
        processor: satteri(),
        syntaxHighlight: 'prism',
      },
    });

@astrojs/db@0.21.3

09 Jun 12:46
0b879fb

Choose a tag to compare

Patch Changes

  • #16964 b048826 Thanks @Princesseuh! - Deprecates the @astrojs/db integration. We no longer have the bandwidth to maintain this package, and we recommend that users directly use the database client of their choice (Drizzle, Kysely, etc.) in their Astro projects instead.

@astrojs/cloudflare@13.7.0

09 Jun 12:46
0b879fb

Choose a tag to compare

Minor Changes

  • #16571 d4b0cd1 Thanks @MA2153! - Sets immutable cache headers for static assets

    Static assets under _astro can be cached to improve performance. The adapter now automatically injects a Cache-Control header at build time when possible.

Patch Changes

  • #16968 7a5c001 Thanks @astrobot-houston! - Fixes a build crash when using experimental.advancedRouting with a custom fetchFile that statically imports cf from @astrojs/cloudflare/fetch. The circular dependency between @astrojs/cloudflare/fetch and astro/app/entrypoint caused createApp or createGetEnv to be undefined at module evaluation time. Initialization is now deferred to the first cf() call, breaking the cycle.

  • Updated dependencies []:

    • @astrojs/underscore-redirects@1.0.3

astro@7.0.0-beta.3

09 Jun 16:09
2dca5e3

Choose a tag to compare

astro@7.0.0-beta.3 Pre-release
Pre-release

Major Changes

  • #17010 0606073 Thanks @ocavue! - Removes the astro db, astro login, astro logout, astro link, and astro init CLI commands.

    The @astrojs/db package is now deprecated. We recommend using a database client (Drizzle, Kysely, etc.) directly instead.

  • #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.

Minor Changes

  • #16998 57dcc31 Thanks @matthewp! - Exposes getFetchState() from astro/hono as a public API

    The getFetchState() function retrieves or lazily creates a FetchState from a Hono context object. This allows third-party packages to build Hono middleware that interacts with Astro's per-request state, giving the astro/hono API the same extensibility as astro/fetch.

    import { Hono } from 'hono';
    import { getFetchState, pages } from 'astro/hono';
    
    const app = new Hono();
    
    app.use(async (context, next) => {
      const state = getFetchState(context);
      state.locals.message = 'Hello from custom middleware';
      await next();
    });
    
    app.use(pages());
    
    export default app;
  • #16996 300641e Thanks @florian-lefebvre! - Adds a subset field to the FontData type exposed via fontData from astro:assets. When using multiple font subsets (e.g., subsets: ["latin", "korean"]), each font data entry now includes the subset name, making it possible to distinguish between font entries for different subsets that share the same weight and style.

  • #16745 f864a80 Thanks @ematipico! - The custom logger feature introduced behind a flag in v6.2.0 is no longer experimental and is available for general use.

    This feature provides better control over Astro's logging infrastructure by allowing you to replace the default console output with custom logging implementations (e.g., structured JSON). This is particularly useful for on-demand rendering when connecting to log aggregation services such as Kibana, Logstash, CloudWatch, Grafana, or Loki.

    Astro provides three built-in log handlers (json, node, and console), and you can also create your own.

    JSON logging

    import { defineConfig, logHandlers } from 'astro/config';
    
    export default defineConfig({
      logger: logHandlers.json({
        pretty: true,
        level: 'warn',
      }),
    });

    Custom logger

    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
      logger: {
        entrypoint: '@org/custom-logger',
      },
    });

    Additionally, context.logger is now always available in API routes and middleware, even without a custom logger configured.

    If you were previously using this feature, please remove the experimental flag from your Astro config:

    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
    -  experimental: {
    -    logger: {
    -      entrypoint: '@org/custom-logger',
    -    },
    -  },
    +  logger: {
    +    entrypoint: '@org/custom-logger',
    +  },
    });

    If you have been waiting for stabilization before using custom loggers, you can now do so.

    Please see the Logger docs for more about this feature.

  • #16981 0d6d644 Thanks @ematipico! - Removes the setting experimental.queuedRendering. The new rendering engine is now stable and replaces the old one.

    As part of the stabilization, the queued rendering has been improved, and some features have been removed:

    • The construction of the queue has been removed, instead now Astro uses a streaming approach where components are rendered and flushed as they are encountered.
    • The node polling feature has been removed because it doesn't yield concrete savings.
    • The content cache has been descoped, and how only tag names are cached.
      If you were previously using this experimental feature, you must remove this experimental flag from your configuration as it no longer exists:
    // astro.config.mjs
    import { defineConfig } from "astro/config";
    
    export default defineConfig({
      experimental: {
    -    queuedRendering: {}
      }
    });

@astrojs/markdown-satteri@0.3.1-alpha.0

09 Jun 16:09
2dca5e3

Choose a tag to compare

Pre-release

@astrojs/markdown-satteri

0.3.0-alpha.0

Minor Changes

  • #16969 4a31f90 Thanks @Princesseuh! - Adds support for Prism syntax highlighting to the Sätteri Markdown and MDX processors. Setting markdown.syntaxHighlight to 'prism' now highlights your code blocks with Prism.

    // astro.config.mjs
    import { satteri } from '@astrojs/markdown-satteri';
    
    export default defineConfig({
      markdown: {
        processor: satteri(),
        syntaxHighlight: 'prism',
      },
    });

0.3.0

Minor Changes

  • #16969 4a31f90 Thanks @Princesseuh! - Adds support for Prism syntax highlighting to the Sätteri Markdown and MDX processors. Setting markdown.syntaxHighlight to 'prism' now highlights your code blocks with Prism.

    // astro.config.mjs
    import { satteri } from '@astrojs/markdown-satteri';
    
    export default defineConfig({
      markdown: {
        processor: satteri(),
        syntaxHighlight: 'prism',
      },
    });

0.2.2

Patch Changes

0.2.1

Patch Changes

0.2.0

Minor Changes

  • #16848 f732f3c Thanks @Princesseuh! - Adds @astrojs/markdown-satteri, a Markdown processor based on Sätteri, a fast Markdown pipeline written in Rust.

    Sätteri is much faster than the default Remark-based processor, and supports a wide range of Markdown features out of the box, without requiring additional plugins. In the future, we plan to make this the default Markdown processor in Astro.

    npm install @astrojs/markdown-satteri
    // astro.config.mjs
    import { satteri } from '@astrojs/markdown-satteri';
    
    export default defineConfig({
      markdown: {
        processor: satteri(),
      },
    });

    Note that this processor currently does not support Prism syntax highlighting, and require using syntaxHighlight: 'shiki' or disabling syntax highlighting altogether for now.

Patch Changes

  • Updated dependencies [f732f3c]:
    • @astrojs/internal-helpers@0.10.0

astro@7.0.0-alpha.2

08 Jun 17:05
17c4178

Choose a tag to compare

astro@7.0.0-alpha.2 Pre-release
Pre-release

Major Changes

  • #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.

  • #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.

Patch Changes

  • #16980 1f07343 Thanks @matthewp! - Removes state.provide(), state.resolve(), state.finalizeAll(), and App.Providers from the public advanced routing API. These context provider extension points are now internal-only. If you were using them in an integration, use locals to share per-request state instead.

  • #16982 1e000e2 Thanks @matthewp! - Improves the warning when accessing Astro.session without session storage configured. The session property is now always defined on the context object, and accessing it without configuration logs a helpful message instead of silently returning undefined.

  • #16990 ebeb830 Thanks @ocavue! - Fixes Astro.request.url not reflecting validated X-Forwarded-Proto/X-Forwarded-Host headers when security.allowedDomains is configured. Previously, only Astro.url was updated with the forwarded origin while Astro.request.url retained the socket-derived URL, causing the two to diverge behind TLS-terminating proxies.