Releases: withastro/astro
create-astro@5.1.0-beta.0
astro@7.0.0-beta.6
Minor Changes
-
#17116
f95e58eThanks @ascorbic! - Stabilizes route caching, removing theexperimental.cacheandexperimental.routeRulesflags and replacing them with the top-levelcacheandrouteRulesconfiguration options.Route caching, introduced experimentally in v6.0.0, is now stable. It gives you a platform-agnostic way to cache responses from on-demand rendered pages and endpoints, based on standard HTTP caching semantics.
Update your config to move
cacheandrouteRulesout of theexperimentalblock:// astro.config.mjs import { defineConfig, memoryCache } from 'astro/config'; export default defineConfig({ - experimental: { - cache: { - provider: memoryCache(), - }, - routeRules: { - '/blog/[...path]': { maxAge: 300, swr: 60 }, - }, - }, + cache: { + provider: memoryCache(), + }, + routeRules: { + '/blog/[...path]': { maxAge: 300, swr: 60 }, + }, });Set caching directives in your routes with
Astro.cache(in.astropages) orcontext.cache(in API routes and middleware), and Astro translates them into the appropriate headers or runtime behavior depending on your configured cache provider. You can also define cache rules for routes declaratively in your config usingrouteRules, without modifying route code.See the route caching guide for more information.
Patch Changes
@astrojs/mdx@7.0.0-beta.4
Patch Changes
- #17124
7e7ab87Thanks @Princesseuh! - Updatessatterito0.9.0. See the Sätteri changelog for details.
@astrojs/markdown-satteri@0.3.1-beta.2
Patch Changes
- #17124
7e7ab87Thanks @Princesseuh! - Updatessatterito0.9.0. See the Sätteri changelog for details.
@astrojs/cloudflare@14.0.0-beta.3
astro@7.0.0-beta.5
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.
Patch Changes
-
#17111
c0f33edThanks @ematipico! - Harden the limits on the number of decoding on the URL. -
#17095
e84ebc0Thanks @matthewp! - Improves build performance by removing an unfiltered transform hook from theastro:head-metadata-buildplugin. Head propagation modules are now identified by their module ID (?astroPropagatedAssets) instead of scanning every module's source code. -
#17041
4c4a91cThanks @iseraph-dev! - Fixes a bug where the advanced routingastro/hono/astro/fetchpages()handler returned the host framework's defaultInternal Server Errorresponse instead of rendering the custom500.astropage when a page threw during render. Unmatched requests with a prerendered (or absent) custom 404 page now render the 404 error page instead of failing the same way. -
#17097
5e340d7Thanks @iseraph-dev! - Fixes a bug where the advanced routingastro/hono/astro/fetchmiddleware()handler returned the host framework's defaultInternal Server Errorresponse instead of rendering the custom500.astropage when middleware threw. Unmatched requests with a prerendered (or absent) custom 404 page now render the 404 error page instead of failing the same way. Errors surfaced throughnext(the host framework's downstream chain) still propagate to the host's own error handler. -
#17104
b074a37Thanks @iseraph-dev! - Fixes the custom500.astropage receiving an emptyerrorprop when the error originated in middleware. -
#17098
637a1b6Thanks @matthewp! - Fixes internal Astro headers leaking from directpages()handler responses
@astrojs/vue@7.0.0-beta.2
Minor Changes
-
#17093
4585fe5Thanks @Princesseuh! - Replaces the import entrypoint ofgetContainerRenderer()A new
container-rendererentrypoint exportinggetContainerRenderer()has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the
getContainerRenderer()import for React:- import { getContainerRenderer } from '@astrojs/react'; + import { getContainerRenderer } from '@astrojs/react/container-renderer';
Importing
getContainerRenderer()from the package root still works, but is now deprecated and logs a warning.
@astrojs/svelte@9.0.0-beta.4
Minor Changes
-
#17093
4585fe5Thanks @Princesseuh! - Replaces the import entrypoint ofgetContainerRenderer()A new
container-rendererentrypoint exportinggetContainerRenderer()has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the
getContainerRenderer()import for React:- import { getContainerRenderer } from '@astrojs/react'; + import { getContainerRenderer } from '@astrojs/react/container-renderer';
Importing
getContainerRenderer()from the package root still works, but is now deprecated and logs a warning.
@astrojs/solid-js@7.0.0-beta.2
Minor Changes
-
#17093
4585fe5Thanks @Princesseuh! - Replaces the import entrypoint ofgetContainerRenderer()A new
container-rendererentrypoint exportinggetContainerRenderer()has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the
getContainerRenderer()import for React:- import { getContainerRenderer } from '@astrojs/react'; + import { getContainerRenderer } from '@astrojs/react/container-renderer';
Importing
getContainerRenderer()from the package root still works, but is now deprecated and logs a warning.
@astrojs/react@6.0.0-beta.2
Minor Changes
-
#17093
4585fe5Thanks @Princesseuh! - Replaces the import entrypoint ofgetContainerRenderer()A new
container-rendererentrypoint exportinggetContainerRenderer()has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the
getContainerRenderer()import for React:- import { getContainerRenderer } from '@astrojs/react'; + import { getContainerRenderer } from '@astrojs/react/container-renderer';
Importing
getContainerRenderer()from the package root still works, but is now deprecated and logs a warning.