Skip to content

Releases: withastro/astro

astro@7.3.2

Choose a tag to compare

@astrobot-houston astrobot-houston released this 08 Sep 15:50
aa4949e

Patch Changes

  • #17896 a548223 Thanks @matthewp! - 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.

  • #17931 c1a6a89 Thanks @astro-factory! - 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

  • #17908 42e9188 Thanks @astro-factory! - 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

  • #17936 4b92ddc Thanks @astro-factory! - Fixes sessions breaking in dev mode with the Cloudflare adapter when middleware is present

  • Updated dependencies [a548223]:

    • @astrojs/markdown-satteri@0.4.1

@astrojs/mdx@8.0.1

Choose a tag to compare

@astrobot-houston astrobot-houston released this 08 Sep 15:49
aa4949e

Patch Changes

  • Updated dependencies [a548223]:
    • @astrojs/markdown-satteri@0.4.1

@astrojs/markdown-satteri@0.4.1

Choose a tag to compare

@astrobot-houston astrobot-houston released this 08 Sep 15:49
aa4949e

Patch Changes

  • #17896 a548223 Thanks @matthewp! - 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.

@astrojs/markdown-remark@7.3.1

Choose a tag to compare

@astrobot-houston astrobot-houston released this 08 Sep 15:49
aa4949e

Patch Changes

  • #17896 a548223 Thanks @matthewp! - 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.

@astrojs/cloudflare@14.3.1

Choose a tag to compare

@astrobot-houston astrobot-houston released this 08 Sep 15:49
aa4949e

Patch Changes

  • #17914 a400504 Thanks @astro-factory! - Fixes a build crash when a custom worker entrypoint exports Durable Object classes alongside prerendered pages. The prerender worker no longer inherits durable_objects, migrations, or workflows from the entry worker config.

  • Updated dependencies []:

    • @astrojs/underscore-redirects@1.0.4

astro@7.3.1

Choose a tag to compare

@astrobot-houston astrobot-houston released this 03 Sep 13:24
92f23cc

Patch Changes

  • #17899 0389640 Thanks @ematipico! - Fixes an error that prevented projects using astro:assets from starting or building

astro@7.3.0

Choose a tag to compare

@astrobot-houston astrobot-houston released this 03 Sep 10:29
f800de1

Minor Changes

  • #17767 ce7c91f Thanks @astro-factory! - 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.

  • #17818 c0b6581 Thanks @florian-lefebvre! - 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.

  • #17818 c0b6581 Thanks @florian-lefebvre! - 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.

Patch Changes

  • #17818 c0b6581 Thanks @florian-lefebvre! - Updates Astro's remaining internal warnings and errors to be written through the configured logger instead of directly to the console, when possible

  • #17886 e747cba Thanks @matthewp! - Fixes the memory cache provider to skip responses with Vary: Cookie or Vary: *

  • #17885 916b738 Thanks @Princesseuh! - Improves build performance for sites with a large number of pages coming from a large amount of different modules.

  • #17795 15e2deb Thanks @matthewp! - Adds concurrent rendering support for experimental.incrementalBuild, including when using @astrojs/cloudflare

    Incremental builds no longer disable caching when build.concurrency is greater than 1. Projects that set build.concurrency: 1 to keep the cache enabled can remove that workaround. Cloudflare builds also reduce serialization overhead for large prerendered pages.

  • #17879 21c34a6 Thanks @matthewp! - Fixes missing styles, links, and scripts from content collection entries rendered inside server islands

  • #17861 3193988 Thanks @ethanstoner! - Fixes i18n fallback routes being generated with a corrupted path when the locale code also appears at the start of a later path segment. A page such as src/pages/en/enterprise.astro with fallback: { es: 'en' } produced the route /es/esterprise instead of /es/enterprise, so the fallback never matched the intended URL. Only the leading locale segment is rewritten now.

@astrojs/vercel@11.0.10

Choose a tag to compare

@astrobot-houston astrobot-houston released this 03 Sep 10:29
f800de1

Patch Changes

  • #17818 c0b6581 Thanks @florian-lefebvre! - Updates the development image service to forward every argument it receives to Astro's Sharp service, including the new logger parameter

@astrojs/cloudflare@14.3.0

Choose a tag to compare

@astrobot-houston astrobot-houston released this 03 Sep 10:29
f800de1

Minor Changes

  • #17795 15e2deb Thanks @matthewp! - Adds concurrent rendering support for experimental.incrementalBuild, including when using @astrojs/cloudflare

    Incremental builds no longer disable caching when build.concurrency is greater than 1. Projects that set build.concurrency: 1 to keep the cache enabled can remove that workaround. Cloudflare builds also reduce serialization overhead for large prerendered pages.

  • #17887 35aa62e Thanks @matthewp! - Adds a Cloudflare finalize() response handler for custom request handlers

    Call finalize() to apply cookies and Cloudflare CDN cache defaults to the response from an astro/fetch pipeline:

    import { astro, FetchState } from 'astro/fetch';
    import { cf, finalize } from '@astrojs/cloudflare/fetch';
    
    export default {
      async fetch(request: Request, env: Env, context: ExecutionContext) {
        const state = new FetchState(request);
        const asset = await cf(state, env, context);
        if (asset) return asset;
    
        return finalize(state, await astro(state));
      },
    };

    The @astrojs/cloudflare/hono middleware applies these response headers automatically. Cloudflare custom entrypoints also fall back to static assets when no Astro route matches and use the default server entrypoint when prerendering through workerd.

Patch Changes

  • #17895 41b88ac Thanks @astro-factory! - Fixes cold astro dev crashes by adding astro/app/manifest and @astrojs/cloudflare/cache/provider to the optimizeDeps.include list

  • Updated dependencies []:

    • @astrojs/underscore-redirects@1.0.4

astro@7.2.10

Choose a tag to compare

@astrobot-houston astrobot-houston released this 31 Aug 19:37
2fdf731

Patch Changes

  • #17262 f8e9458 Thanks @Princesseuh! - Fixes @astrojs/markdown-remark being pinned to an exact version.

  • #17874 10c7e63 Thanks @astro-factory! - Fixes SSR manifest placeholder not being replaced when the server build is minified, which caused a runtime Invalid URL crash at server boot

  • #17869 2548abf Thanks @ematipico! - Fixes a case where the logger was improperly initialized at runtime in dev.

  • #17878 76eff3d Thanks @ematipico! - Fixes browser heuristic caching for cached responses that include Last-Modified or ETag validators

  • #17833 413a6e7 Thanks @astro-factory! - Fixes prerender conflict warnings to correctly identify the route that first rendered a duplicate pathname, instead of misattributing the conflict to an unrelated route that merely matches the URL pattern

  • #17872 f7191cc Thanks @jx-grxf! - Fixes Markdown images in content collections rendering an empty srcset attribute when no responsive candidates are generated.

  • #17755 157c500 Thanks @matthewp! - Fixes a bug where editing a content collection entry during astro dev on Windows kept serving stale content until the dev server was restarted. The data store now notifies the dev server directly after each write instead of relying only on the file watcher, which can miss the atomic rename that commits the write on some platforms.

  • Updated dependencies [f8e9458, f8e9458]:

    • @astrojs/internal-helpers@0.11.0
    • @astrojs/markdown-satteri@0.4.0