Packages/astro

Releases of astro

730 stable releases, newest first. Release notes are kept for the last 90 days; older ones link to where they were published.

  1. 7.4.1

    19 October 2026

    Patch Changes

    • Preserves the last modified date of cached optimized images and incrementally restored build output when copying them into the build output on all platforms

    • Fixes a typo in the error message shown when a font cssVariable is invalid

    • Fixes a bug where projects whose path contains an apostrophe (') failed to load sessions, middleware, a cache provider, or a src/fetch.ts handler

  2. 7.4.0

    15 October 2026

    Minor Changes

    • Adds a new --timings flag to astro build to help you find what slows down your builds

      When a build takes longer than expected, it can be hard to tell whether the cause is an integration, a Markdown processor plugin, image processing, or even syntax highlighting. Add the --timings flag to your build command to print a summary once the build finishes:

      astro build --timings

      This is helpful to decide what to optimize first, or to compare build times before and after a change to your project.

    • Adds a new optional getFontProperties() callback to font providers

      Font providers can now expose the weights, styles, subsets and formats a font family actually has. Astro uses it when resolving your font configuration to warn about values a provider cannot serve, for example a weight a font family does not offer.

      All built-in providers implement it. If you maintain a custom font provider, implementing this callback is optional for now but it will be required in Astro 8:

      import type { FontProvider } from 'astro';
      
      const provider: FontProvider = {
          name: 'my-provider',
          resolveFont: ({ familyName }) => {
              // ...
          },
          getFontProperties: ({ familyName }) => ({
              weights: ['400', '700'],
              styles: ['normal', 'italic'],
              subsets: ['latin'],
              formats: ['woff2'],
          }),
      };
    • Adds a fetch() function to the font provider init() context

      This function requests a provider API, retrying transient failures and more. It lets providers that wrap a 3rd-party unifont provider pass the context to it directly:

      import type { FontProvider } from 'astro';
      import type { InitializedProvider } from 'unifont';
      import { acmeProvider } from '@acme/unifont-provider';
      
      export function acmeFontProvider(): FontProvider {
          const provider = acmeProvider();
          let initializedProvider: InitializedProvider | undefined;
          return {
              name: provider._name,
              async init(context) {
                  initializedProvider = await provider(context);
              },
              // ...
          };
      }
  3. 7.3.8

    8 October 2026

    Patch Changes

    • Fixes Astro.cache being undefined when a custom 404 or 500 page is rendered by the error handler, for example after a request to an API route with an HTTP method the route doesn't export

    • Fixes astro add removing existing allowBuilds approvals from pnpm-workspace.yaml with pnpm v11.0–v11.22

    • Refactors internal bundling and code transforms to use Vite's Oxc-based transformWithOxc and Rolldown instead of esbuild. These packages no longer depend on esbuild directly.

  4. 7.3.7

    7 October 2026

    Patch Changes

    • Fixes a build error when a Markdown content collection entry loaded with glob({ deferRender: true }) has a layout frontmatter property. layout is now ignored for content collection entries, as documented.

    • Fixes astro add cloudflare failing to install dependencies with pnpm v11+ by approving the workerd build script, and shows the package manager's error output when astro add fails to install dependencies

    • Fixes an issue where AVIF images were served as image/heif instead of image/avif in the dev server.

  5. 7.3.6

    6 October 2026

    Patch Changes

    • Fixes an intermittent dev server crash when using astro:actions inside a server island with adapters that use a pre-bundled SSR environment (e.g. @astrojs/cloudflare)

    • Fixes stale scoped styles during HMR when both markup and <style> are changed in a single save

    • Fixes CSS from other pages leaking into a page's <head> in dev when the page imports a module such as astro:config/server.

  6. 7.3.5

    24 September 2026

    Patch Changes

    • Adds a new container function called renderComponent(), which renders Astro components with inlined styles and scripts.

      Users must import the component with the new ?container query string:

      import { experimental_AstroContainer } from "astro/container";
      import TodoList from "../components/TodoList.astro?container";
      
      const container = await experimental_AstroContainer.create();
      
      const _string = container.renderComponent(TodoList);
  7. 7.3.4

    22 September 2026

    Patch Changes

    • Fixes incremental builds repeatedly rendering unchanged pages when modules or compiled CSS reference bundled assets.

    • Improves the astro check error shown for TypeScript 7. The command now explains that TypeScript 7 is not currently supported and provides instructions for experimentally type-checking Astro files with TypeScript 7.1 and @astrojs/ts-content-mapper.

    • Fix double-escaped ampersands in Markdown image alt and title attributes. The __ASTRO_IMAGE_ round-trip now decodes the numeric (&#x26;) and named (&amp;) character references the Markdown processors emit, so an & in an alt or title is escaped exactly once in the final HTML instead of twice.

  8. 7.3.3

    16 September 2026

    Patch Changes

    • Refactors internal version handling to use a smaller, ESM-native dependency

    • Returns appropriate 400 and 404 responses from the image endpoint for invalid and missing local image paths

    • Fixes Astro.preferredLocaleList returning an empty list when a locale is configured with the object form ({ path, codes }) and the browser sends the code with different casing or an underscore, such as en-US matching a configured en-us

  9. 7.3.2

    8 September 2026

    Patch Changes

    • Fixes <script>/<style> rendering in MDX so that only literal content (including content injected by remark/rehype plugins) is treated as trusted markup. A dynamic value passed as a <script>/<style> child (e.g. <script>{value}</script>) is now escaped like any other element's content instead of being rendered raw. Use set:html to explicitly opt a dynamic value back into raw rendering.

    • Fixes the dev toolbar returning a 504 "Outdated Optimize Dep" error when a workspace-linked package imports a dependency that Vite's initial scan did not discover

    • Fixes i18n fallback routing replacing the first substring match instead of the actual locale segment, which mangled paths like /energy/en/about into /esergy/en/about

  10. 7.3.1

    3 September 2026

    Patch Changes

    • Fixes an error that prevented projects using astro:assets from starting or building

  11. 7.3.0

    3 September 2026

    Minor Changes

    • Adds --ignore-lock flag to astro preview, allowing multiple preview servers to run simultaneously on different ports. This is useful for E2E testing workflows (e.g., Playwright) that need to run several preview servers at once.

    • Adds a logger parameter to image services hooks

      Custom image services now receive Astro's runtime logger as an extra argument. Messages logged with it are routed through the destination configured in logger and respect your log level, instead of being written straight to the console:

      import type { LocalImageService } from 'astro';
      
      const service: LocalImageService = {
        // ...
        async transform(inputBuffer, transform, imageConfig, logger) {
          logger.warn(`Could not optimize "${transform.src}". Passing it through unchanged.`);
          return { data: inputBuffer, format: 'png' };
        },
      };

      Astro's built-in Sharp service now uses this logger for the warnings it emits when it encounters an unexpected or unsupported source format.

    • Adds logger to the context object passed to cache providers

      Custom cache providers now receive Astro's runtime logger on the context passed to onRequest(). Messages logged with it are routed through the destination configured in logger and respect your log level, instead of being written straight to the console:

      import type { CacheProvider } from 'astro';
      
      const provider: CacheProvider = {
        name: 'my-cache',
        async onRequest({ request, url, logger }, next) {
          logger.warn(`Skipping cache for ${url.pathname} because the response sets a cookie.`);
          return next();
        },
        // ...
      };

      Astro's built-in memoryCache() provider now uses this logger for the warnings it emits when it skips caching a response that sets cookies, and when a background revalidation fails.

  12. 7.2.10

    31 August 2026

    Patch Changes

    • Fixes @astrojs/markdown-remark being pinned to an exact version.

    • Fixes SSR manifest placeholder not being replaced when the server build is minified, which caused a runtime Invalid URL crash at server boot

    • Fixes a case where the logger was improperly initialized at runtime in dev.

  13. 7.2.9

    27 August 2026

    Patch Changes

    • Fixes importing .html files not being typed outside of .astro files

    • Fixes a crash when requesting /index.html against a dynamic page route like [slug].astro

    • Fixes SSR manifest containing stale entryModules references to prerender-only chunks that no longer exist in the final build output

  14. 7.2.8

    26 August 2026

    Patch Changes

    • Updates the minimum supported version of Sharp to 0.35.4

    • Replaces the internal find-process dependency with a smaller, lighter alternative

  15. 7.2.7

    25 August 2026

    Patch Changes

    • Deserializes each route once when loading the SSR manifest

    • Fixes route selection for normalized request paths in adapter and development request handling

    • Updates generated and default Cloudflare compatibility_date values to match the installed runtime and requires Wrangler ^4.125.0

  16. 7.2.6

    24 August 2026

    Patch Changes

    • Fixes a bug where new FetchState(request) could fail in development when server dependencies were optimized

  17. 7.2.5

    24 August 2026

    Patch Changes

    • Fixes a bug where experimental_getFontFileURL() rejected valid font URLs when using the Cloudflare adapter

    • Skips no-op pathname writes when normalizing SSR request URLs

    • Updates deprecation messages target from Astro 7 to 8

  18. 7.2.4

    19 August 2026

    Patch Changes

    • Fixes builds hanging when an image file is malformed

    • Fixes base path stripping to respect path-segment boundaries. With a configured base such as /docs, a request like /docs-archive/page is no longer treated as being under the base, so routing and context.url.pathname now agree on the same pathname.

    • Fixes astro build throwing TypeError: Missing parameter for dynamic routes when build.format: 'preserve' and trailingSlash: 'always' are used together. Stripping the framework-injected .html suffix dropped the trailing slash that the compiled route pattern requires, so the route no longer matched itself and its params resolved as empty.

  19. 7.2.3

    18 August 2026

    Patch Changes

    • Fixes an issue where Astro could run out of memory when experimental.collectionStorage is set to chunked and there are multiple concurrent updates to the same collection.

    • Fixes the dev server sometimes matching against stale routes after pages were added, removed, or renamed, requiring a dev server restart to pick up the change

    • Fixes the composable request helpers (astro/fetch) throwing an error when used on a request that had been rewritten with Astro.rewrite() or next()

  20. 7.2.2

    13 August 2026

    Patch Changes

    • Fixes component styles rendered from content entries remaining stale until a second save when an adapter uses Astro's fallback development environment

    • Fixes incremental builds dropping optimized images for cached pages when using a collectStaticImages prerenderer (e.g. @astrojs/cloudflare with compile-time image optimization)

    • Fixes intermittent ImageNotFound errors during build on projects with many images. The build now limits concurrent image file reads to avoid exhausting OS file descriptors (EMFILE) and retries transient I/O errors with backoff. Non-transient errors are no longer silently swallowed.

  21. 7.2.1

    11 August 2026

    Patch Changes

    • Fixes CSS hot module replacement after navigating between pages with ClientRouter

    • Fixes a CSP violation when using both security.csp and experimental.clientPrerender with data-astro-prefetch links. The dynamically injected <script type="speculationrules"> now uses a static "source": "document" approach with a CSS selector, producing a deterministic payload that is hashed and included in the CSP script-src directive at build time.

    • Fixes middleware HMR not responding to changes in imported modules. Previously, only direct edits to the middleware file would trigger a reload.

  22. 7.2.0

    6 August 2026

    Minor Changes

    • Adds the astro preview --background flag to start preview servers as background processes.

      This makes preview servers easier to manage from scripts and AI coding agents because the command returns after the server is ready instead of keeping the terminal attached to the long-running process.

      astro preview --background

      When a preview server is running in the background, you can inspect or stop it with new astro preview subcommands:

      astro preview status
      astro preview logs
      astro preview logs --follow
      astro preview stop

      If Astro detects that astro preview is being run by an AI coding agent, background mode is enabled automatically. This matches the existing behavior for astro dev, allowing agents to continue working after the preview server starts while still receiving the server URL and process ID.

      To opt out of automatic background mode for preview servers, set ASTRO_PREVIEW_BACKGROUND=0 before running astro preview.

    • Adds support for paths relative to your project root in logger.entrypoint

      Previously, pointing logger.entrypoint at a custom log handler living in your own project required building an absolute URL. You can now write the path directly:

      // astro.config.mjs
      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        logger: {
      -    entrypoint: new URL('./src/logger.js', import.meta.url),
      +    entrypoint: './src/logger.js',
        },
      });

      Paths starting with ./ or ../ are resolved against your project root. Package specifiers such as @org/astro-logger, absolute paths, and URL entrypoints keep working as before.

    • Widens the AstroPrerenderer render() return type so prerenderers can report incremental-build metadata

      A prerenderer's render() may now resolve to either a Response (as before) or a PrerenderResult object that pairs the response with the content entries and optimized-image transforms the page resolved. This lets prerenderers that render out of process (for example, in an adapter's runtime like workerd) report those dependencies back to the build, so incremental static builds can track and replay them for skipped pages.

      import type { AstroPrerenderer, PrerenderResult } from 'astro';
      
      const prerenderer: AstroPrerenderer = {
        name: 'my-adapter:prerenderer',
        getStaticPaths,
        async render(request, { routeData }): Promise<PrerenderResult> {
          const { response, metadata } = await renderInRuntime(request, routeData);
          return { response, metadata };
        },
      };

      This is a non-breaking widening: prerenderers that return a bare Response continue to work unchanged, and in-process prerenderers can keep returning a Response since the build collects their metadata directly.

  23. 7.1.6

    29 July 2026

    Patch Changes

    • Fixes concurrent static builds failing to generate i18n rewrite fallbacks for dynamic routes

    • Fixes stale dev CSS after editing component style blocks and CSS files in dev

    • Adds a feature to experimental.collectionStorage that allows to change the size of chunks.

      For example, you can reduce the size of chunks to 1MB:

      // astro.config.mjs
      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        experimental: {
          collectionStorage: {
            type: 'chunked',
            chunkSize: 1024 * 1024,
          },
        },
      });
  24. 7.1.5

    28 July 2026

    Patch Changes

    • Fixes a bug where an error while finalizing a request could prevent a response from being sent

    • Fixes a case where a custom logger.entrypoint failed to load at runtime in a built server bundle.

    • Fixes action path resolution so that properties of a resolved action function are not treated as routable path segments

  25. 7.1.4

    27 July 2026

    Patch Changes

    • Fixes duplicate CSS files being emitted in server output when a prerendered page and a server-rendered page share the same styles (e.g. a shared layout importing Tailwind). The prerender and SSR environments each emitted their own copy of the same stylesheet (index.X.css and _..Y.css); the SSR build now reuses the CSS asset filename from the prerender build when the stylesheet is backed by the same CSS source modules, so only a single file is emitted.

    • Adds the missing background prop to the <Image /> and <Picture /> component types. The prop already worked at runtime, but was absent from the types, causing astro check to report that background does not exist on the component props

    • Fixes missing scoped styles for child components inside client:only islands in production builds

  26. 7.1.3

    20 July 2026
  27. 7.1.2

    20 July 2026
  28. 7.1.1

    17 July 2026
  29. 7.1.0

    16 July 2026
  30. 7.0.9

    13 July 2026
  31. 7.0.8

    13 July 2026
  32. 7.0.7

    8 July 2026
  33. 7.0.6

    2 July 2026
  34. 7.0.5

    1 July 2026
  35. 7.0.4

    30 June 2026
  36. 7.0.3

    25 June 2026
  37. 7.0.2

    23 June 2026
  38. 7.0.1

    23 June 2026
  39. 7.0.0

    22 June 2026
  40. 6.4.8

    17 June 2026
  41. 6.4.7

    15 June 2026
  42. 6.4.6

    10 June 2026
  43. 6.4.5

    9 June 2026
  44. 6.4.4

    3 June 2026
  45. 6.4.3

    2 June 2026
  46. 6.4.2

    28 May 2026
  47. 6.4.1

    28 May 2026
  48. 6.4.0

    28 May 2026
  49. 6.3.8

    26 May 2026
  50. 6.3.7

    21 May 2026