Releases: withastro/astro
Release list
astro@7.3.2
Patch Changes
-
#17896
a548223Thanks @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. Useset:htmlto explicitly opt a dynamic value back into raw rendering. -
#17931
c1a6a89Thanks @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
42e9188Thanks @astro-factory! - Fixes i18n fallback routing replacing the first substring match instead of the actual locale segment, which mangled paths like/energy/en/aboutinto/esergy/en/about -
#17936
4b92ddcThanks @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
Patch Changes
- Updated dependencies [
a548223]:- @astrojs/markdown-satteri@0.4.1
@astrojs/markdown-satteri@0.4.1
Patch Changes
- #17896
a548223Thanks @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. Useset:htmlto explicitly opt a dynamic value back into raw rendering.
@astrojs/markdown-remark@7.3.1
Patch Changes
- #17896
a548223Thanks @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. Useset:htmlto explicitly opt a dynamic value back into raw rendering.
@astrojs/cloudflare@14.3.1
Patch Changes
-
#17914
a400504Thanks @astro-factory! - Fixes a build crash when a custom worker entrypoint exports Durable Object classes alongside prerendered pages. The prerender worker no longer inheritsdurable_objects,migrations, orworkflowsfrom the entry worker config. -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.4
astro@7.3.1
Patch Changes
- #17899
0389640Thanks @ematipico! - Fixes an error that prevented projects usingastro:assetsfrom starting or building
astro@7.3.0
Minor Changes
-
#17767
ce7c91fThanks @astro-factory! - Adds--ignore-lockflag toastro 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
c0b6581Thanks @florian-lefebvre! - Adds aloggerparameter to image services hooksCustom image services now receive Astro's runtime logger as an extra argument. Messages logged with it are routed through the destination configured in
loggerand 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
c0b6581Thanks @florian-lefebvre! - Addsloggerto the context object passed to cache providersCustom cache providers now receive Astro's runtime logger on the context passed to
onRequest(). Messages logged with it are routed through the destination configured inloggerand 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
c0b6581Thanks @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
e747cbaThanks @matthewp! - Fixes the memory cache provider to skip responses withVary: CookieorVary: * -
#17885
916b738Thanks @Princesseuh! - Improves build performance for sites with a large number of pages coming from a large amount of different modules. -
#17795
15e2debThanks @matthewp! - Adds concurrent rendering support forexperimental.incrementalBuild, including when using@astrojs/cloudflareIncremental builds no longer disable caching when
build.concurrencyis greater than1. Projects that setbuild.concurrency: 1to keep the cache enabled can remove that workaround. Cloudflare builds also reduce serialization overhead for large prerendered pages. -
#17879
21c34a6Thanks @matthewp! - Fixes missing styles, links, and scripts from content collection entries rendered inside server islands -
#17861
3193988Thanks @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 assrc/pages/en/enterprise.astrowithfallback: { es: 'en' }produced the route/es/esterpriseinstead of/es/enterprise, so the fallback never matched the intended URL. Only the leading locale segment is rewritten now.
@astrojs/vercel@11.0.10
Patch Changes
- #17818
c0b6581Thanks @florian-lefebvre! - Updates the development image service to forward every argument it receives to Astro's Sharp service, including the newloggerparameter
@astrojs/cloudflare@14.3.0
Minor Changes
-
#17795
15e2debThanks @matthewp! - Adds concurrent rendering support forexperimental.incrementalBuild, including when using@astrojs/cloudflareIncremental builds no longer disable caching when
build.concurrencyis greater than1. Projects that setbuild.concurrency: 1to keep the cache enabled can remove that workaround. Cloudflare builds also reduce serialization overhead for large prerendered pages. -
#17887
35aa62eThanks @matthewp! - Adds a Cloudflarefinalize()response handler for custom request handlersCall
finalize()to apply cookies and Cloudflare CDN cache defaults to the response from anastro/fetchpipeline: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/honomiddleware 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
41b88acThanks @astro-factory! - Fixes coldastro devcrashes by addingastro/app/manifestand@astrojs/cloudflare/cache/providerto theoptimizeDeps.includelist -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.4
astro@7.2.10
Patch Changes
-
#17262
f8e9458Thanks @Princesseuh! - Fixes@astrojs/markdown-remarkbeing pinned to an exact version. -
#17874
10c7e63Thanks @astro-factory! - Fixes SSR manifest placeholder not being replaced when the server build is minified, which caused a runtimeInvalid URLcrash at server boot -
#17869
2548abfThanks @ematipico! - Fixes a case where the logger was improperly initialized at runtime in dev. -
#17878
76eff3dThanks @ematipico! - Fixes browser heuristic caching for cached responses that includeLast-ModifiedorETagvalidators -
#17833
413a6e7Thanks @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
f7191ccThanks @jx-grxf! - Fixes Markdown images in content collections rendering an emptysrcsetattribute when no responsive candidates are generated. -
#17755
157c500Thanks @matthewp! - Fixes a bug where editing a content collection entry duringastro devon 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