AstroEco is Releasing…
Display your GitHub releases using astro-loader-github-releases
Patch Changes
-
#15870
920f10bThanks @matthewp! - Prebundleastro/toolbarin dev when custom dev toolbar apps are registered, preventing re-optimization reloads that can hide or break the toolbar. -
#15876
f47ac53Thanks @ematipico! - FixesredirectToDefaultLocaleproducing a protocol-relative URL (//locale) instead of an absolute path (/locale) whenbaseis'/'. -
#15767
e0042f7Thanks @matthewp! - Fixes server islands (server:defer) not working when only used in prerendered pages withoutput: 'server'. -
#15873
35841edThanks @matthewp! - Fix a dev server bug where newly created pages could miss layout-imported CSS until restart. -
#15874
ce0669dThanks @ematipico! - Fixes a warning when usingprefetchAll -
#15754
58f1d63Thanks @rururux! - Fixes a bug where a directory at the project root sharing the same name as a page route would cause the dev server to return a 404 instead of serving the page. -
#15869
76b3a5eThanks @matthewp! - Update the unknown file extension error hint to recommendvite.resolve.noExternal, which is the correct Vite 7 config key.
Patch Changes
-
#15815
d1872eeThanks @matthewp! - Prebundle additional Astro runtime dependencies for Cloudflare development server, speeding up initial start time and preventing required restarts. -
#15872
3b47b89Thanks @Princesseuh! - Fixes images not working in dev mode when using thecloudflareoption -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.1
Patch Changes
-
#15868
bb2b8f5Thanks @ematipico! - Fixes an issue where the adapter would cause a series of warnings during the build. -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.1
Patch Changes
- #15868
bb2b8f5Thanks @ematipico! - Fixes an issue where the adapter would cause a series of warnings during the build.
Patch Changes
-
#15711
b2bd27bThanks @OliverSpeir! - Improves Astro core's dev environment handling for prerendered routes by ensuring route/CSS updates and prerender middleware behavior work correctly across both SSR and prerender environments.This enables integrations that use Astro's prerender dev environment (such as Cloudflare with
prerenderEnvironment: 'node') to get consistent route matching and HMR behavior during development. -
#15852
1cdaf9fThanks @ematipico! - Fixes a regression where the the routes emitted by theastro:build:donehook didn't have thedistURLarray correctly populated. -
#15765
ca76ff1Thanks @matthewp! - Hardens server island POST endpoint validation to use own-property checks for improved consistency
Minor Changes
-
#15711
b2bd27bThanks @OliverSpeir! - Adds aprerenderEnvironmentoption to the Cloudflare adapter.By default, Cloudflare uses its workerd runtime for prerendering static pages. Set
prerenderEnvironmentto'node'to use Astro's built-in Node.js prerender environment instead, giving prerendered pages access to the full Node.js ecosystem during both build and dev. This is useful when your prerendered pages depend on Node.js-specific APIs or NPM packages that aren't compatible with workerd.// astro.config.mjs import cloudflare from '@astrojs/cloudflare'; import { defineConfig } from 'astro/config'; export default defineConfig({ adapter: cloudflare({ prerenderEnvironment: 'node', }), });
Patch Changes
-
#15845
50fcc8bThanks @aqiray! - fix: show actionable error when running astro preview without prior build -
#15794
d1ac58eThanks @OliverSpeir! - Fixes image serving inpassthroughmode by using the CloudflareASSETSbinding instead of generic fetch, which does not work in Workers for local assets -
#15850
660da74Thanks @tristanbes! - fix(cloudflare): forwardconfigPathand otherPluginConfigoptions to the Cloudflare Vite PluginOptions like
configPath,inspectorPort,persistState,remoteBindings, andauxiliaryWorkerswere accepted by the type system but never forwarded tocfVitePlugin(), making them silently ignored.Also fixes
addWatchFileforconfigPathwhich resolved the path relative to the adapter'snode_modulesdirectory instead of the project root. -
#15843
fcd237dThanks @Calvin-LL! - fix cloudflare image transform ignoring quality parameter -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.1
Minor Changes
-
#3644
0d2e7edThanks @HiDeoo! - Adds support for Astro v6, drops support for Astro v5.Upgrade Astro and dependencies
⚠️ BREAKING CHANGE: Astro v5 is no longer supported. Make sure you update Astro and any other official integrations at the same time as updating Starlight:npx @astrojs/upgrade
Community Starlight plugins and Astro integrations may also need to be manually updated to work with Astro v6. If you encounter any issues, please reach out to the plugin or integration author to see if it is a known issue or if an updated version is being worked on.
Update your collections
⚠️ BREAKING CHANGE: Drops support for content collections backwards compatibility.In Astro 5.x, projects could delay upgrading to the new Content Layer API introduced for content collections because of some existing automatic backwards compatibility that was not previously behind a flag. This meant that it was possible to upgrade from Astro 4 to Astro 5 without updating your content collections, even if you had not enabled the
legacy.collectionsflag. Projects would continue to build, and no errors or warnings would be displayed.Astro v6.0 now removes this automatic legacy content collections support, along with the
legacy.collectionsflag.If you experience content collections errors after updating to v6, check your project for any removed legacy features that may need updating to the Content Layer API. See the Starlight v0.30.0 upgrade guide for detailed instructions on upgrading legacy collections to the new Content Layer API.
If you are unable to make any changes to your collections at this time, including Starlight's default
docsandi18ncollections, you can enable thelegacy.collectionsBackwardsCompatflag to upgrade to v6 without updating your collections. This temporary flag preserves some legacy v4 content collections features, and will allow you to keep your collections in their current state until the legacy flag is no longer supported. -
#3704
375edccThanks @florian-lefebvre! - Fixes autocomplete for components exported from@astrojs/starlight/components/*⚠️ Potentially breaking change: This change moves some files used in Starlight’s component internals out of thecomponents/directory. Direct use of these files was not and is not officially supported. If you previously importedTableOfContents/starlight-toc.ts,TableOfContents/TableOfContentsList.astro,Icons.ts, orSidebarPersistState.ts, please review your code when updating. -
#3729
3642625Thanks @delucis! - Improves Starlight’s default body font stack to better support languages such as Chinese, Japanese, and Korean on Windows.
For most users there should be no visible change.If you would prefer to keep the previous font stack, you can add the following custom CSS to your site:
:root { --sl-font-system: ui-sans-serif, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; }
-
#3598
fff38d5Thanks @HiDeoo! - Makes hover styles consistent in Starlight’s navigation barPreviously, the social icon links and language/theme switchers in Starlight’s navigation bar, dimmed on hover.
After this change, they now increase in contrast on hover instead.
This matches hover behavior elsewhere, for example in the sidebar, table of contents, or search button.⚠️ Potentially breaking change: this is a subtle change to the hover style colors.
If you want to preserve the previous styling, you can add the following custom CSS to your site:starlight-theme-select label, starlight-lang-select label { color: var(--sl-color-gray-1); &:hover { color: var(--sl-color-white); } } .social-icons a:hover { color: var(--sl-color-text-accent); opacity: 0.66; }
Patch Changes
-
#15832
95e12a2Thanks @Princesseuh! - Fixesreturn;syntax not working in the frontmatter correctly in certain contexts -
#15803
e42b015Thanks @merlinnot! - Fixes the Cloudflare adapter adding aSESSIONKV binding even when sessions are explicitly configured to use a different driver, such asunstorage/drivers/null. -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.1
Patch Changes
- #15832
95e12a2Thanks @Princesseuh! - Fixesreturn;syntax not working in the frontmatter correctly in certain contexts
Patch Changes
- #15820
e20474bThanks @Princesseuh! - Fixes broken publish
Patch Changes
- #15830
8d3f3aaThanks @Princesseuh! - Pinfast-xml-parserto 5.4.1 in order to fix an upstream bug
Patch Changes
- #15825
2cfe935Thanks @Princesseuh! - Fixes failed publish for 2.16.11.
Patch Changes
- Updated dependencies [
c2cd371]:- @astrojs/internal-helpers@0.7.6
- @astrojs/underscore-redirects@1.0.0
Patch Changes
- Updated dependencies [
c2cd371]:- @astrojs/internal-helpers@0.7.6
Patch Changes
- #15828
c2cd371Thanks @Princesseuh! - Fixes glob matching of remote patterns matching more paths than intended in select situations
Patch Changes
- Updated dependencies [
c2cd371]:- @astrojs/internal-helpers@0.7.6
Patch Changes
- Updated dependencies [
c2cd371]:- @astrojs/internal-helpers@0.7.6
Patch Changes
- Updated dependencies [
c2cd371]:- @astrojs/internal-helpers@0.7.6
- @astrojs/markdown-remark@6.3.11
Patch Changes
- Updated dependencies []:
- @astrojs/markdown-remark@6.3.11
Patch Changes
- Updated dependencies [
c2cd371]:- @astrojs/internal-helpers@0.7.6
- @astrojs/underscore-redirects@1.0.0
Major Changes
-
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance) -
#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Minor Changes
Patch Changes
-
#15125
6feb0d7Thanks @florian-lefebvre! - Improve Sveltechildrenprop type checking -
#15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22 -
#15581
2851f10Thanks @renovate! - Updatessvelteto v5.51.5
Minor Changes
- #14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Patch Changes
Major Changes
- #14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance)
Patch Changes
Major Changes
-
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance) -
#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Minor Changes
Patch Changes
-
#15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22 -
#15700
4e7f3e8Thanks @ocavue! - Improves how React components are identified when setting theincludeand/orexcludeoptions in projects where multiple JSX frameworks are used together -
Updated dependencies [
4ebc1e3,4e7f3e8,a164c77,cf6ea6b,a18d727,240c317,745e632]:- @astrojs/internal-helpers@0.8.0
Major Changes
-
#15654
a32aee6Thanks @florian-lefebvre! - Removes theexperimentalErrorPageHostoptionThis option allowed fetching a prerendered error page from a different host than the server is currently running on.
However, there can be security implications with prefetching from other hosts, and often more customization was required to do this safely. This has now been removed as a built-in option so that you can implement your own secure solution as needed and appropriate for your project via middleware.
What should I do?
If you were previously using this feature, you must remove the option from your adapter configuration as it no longer exists:
// astro.config.mjs import { defineConfig } from 'astro/config' import node from '@astrojs/node' export default defineConfig({ adapter: node({ mode: 'standalone', - experimentalErrorPageHost: 'http://localhost:4321' }) })You can replicate the previous behavior by checking the response status in a middleware and fetching the prerendered page yourself:
// src/middleware.ts import { defineMiddleware } from 'astro:middleware'; export const onRequest = defineMiddleware(async (ctx, next) => { const response = await next(); if (response.status === 404 || response.status === 500) { return fetch(`http://localhost:4321/${response.status}.html`); } return response; });
Minor Changes
-
#15258
d339a18Thanks @ematipico! - Stabilizes the adapter featureexperimentalStatiHeaders. If you were using this feature in any of the supported adapters, you'll need to change the name of the flag:export default defineConfig({ adapter: netlify({ - experimentalStaticHeaders: true + staticHeaders: true }) }) -
#15759
39ff2a5Thanks @matthewp! - Adds a newbodySizeLimitoption to the@astrojs/nodeadapterYou can now configure a maximum allowed request body size for your Node.js standalone server. The default limit is 1 GB. Set the value in bytes, or pass
0to disable the limit entirely:import node from '@astrojs/node'; import { defineConfig } from 'astro/config'; export default defineConfig({ adapter: node({ mode: 'standalone', bodySizeLimit: 1024 * 1024 * 100, // 100 MB }), });
-
#15006
f361730Thanks @florian-lefebvre! - Adds new session driver object shapeFor greater flexibility and improved consistency with other Astro code, session drivers are now specified as an object:
-import { defineConfig } from 'astro/config' +import { defineConfig, sessionDrivers } from 'astro/config' export default defineConfig({ session: { - driver: 'redis', - options: { - url: process.env.REDIS_URL - }, + driver: sessionDrivers.redis({ + url: process.env.REDIS_URL + }), } })
Specifying the session driver as a string has been deprecated, but will continue to work until this feature is removed completely in a future major version. The object shape is the current recommended and documented way to configure a session driver.
-
#14946
95c40f7Thanks @ematipico! - Removes theexperimental.cspflag and replaces it with a new configuration optionsecurity.csp- (v6 upgrade guidance)
Patch Changes
-
#15473
d653b86Thanks @matthewp! - Improves error page loading to read from disk first before falling back to configured host -
#15562
e14a51dThanks @florian-lefebvre! - Updates to new Adapter API introduced in v6 -
#15585
98ea30cThanks @matthewp! - Add a default body size limit for server actions to prevent oversized requests from exhausting memory. -
#15777
02e24d9Thanks @matthewp! - Fixes CSRF origin check mismatch by passing the actual server listening port tocreateRequest, ensuring the constructed URL origin includes the correct port (e.g.,http://localhost:4321instead ofhttp://localhost). Also restrictsX-Forwarded-Prototo only be trusted whenallowedDomainsis configured. -
#15714
9a2c949Thanks @ematipico! - Fixes an issue where static headers weren't correctly applied when the website usesbase. -
#15763
1567e8cThanks @matthewp! - Normalizes static file paths before evaluating dotfile access rules for improved consistency -
#15164
54dc11dThanks @HiDeoo! - Fixes an issue where the Node.js adapter could fail to serve a 404 page matching a pre-rendered dynamic route pattern. -
#15745
20b05c0Thanks @matthewp! - Hardens static file handler path resolution to ensure resolved paths stay within the client directory -
#15495
5b99e90Thanks @leekeh! - Refactors to usemiddlewareModeadapter feature (set toclassic) -
#15657
cb625b6Thanks @qzio! - Adds a newsecurity.actionBodySizeLimitoption to configure the maximum size of Astro Actions request bodies.This lets you increase the default 1 MB limit when your actions need to accept larger payloads. For example, actions that handle file uploads or large JSON payloads can now opt in to a higher limit.
If you do not set this option, Astro continues to enforce the 1 MB default to help prevent abuse.
// astro.config.mjs export default defineConfig({ security: { actionBodySizeLimit: 10 * 1024 * 1024, // set to 10 MB }, });
-
Updated dependencies [
4ebc1e3,4e7f3e8,a164c77,cf6ea6b,a18d727,240c317,745e632]:- @astrojs/internal-helpers@0.8.0
Major Changes
- #14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Minor Changes
-
#15258
d339a18Thanks @ematipico! - Stabilizes the adapter featureexperimentalStatiHeaders. If you were using this feature in any of the supported adapters, you'll need to change the name of the flag:export default defineConfig({ adapter: netlify({ - experimentalStaticHeaders: true + staticHeaders: true }) }) -
#15809
94b4a46Thanks @Princesseuh! - Adds support for thefitoption to the image service -
#15495
5b99e90Thanks @leekeh! - Adds newmiddlewareModeadapter feature and deprecatesedgeMiddlewareoptionThe
edgeMiddlewareoption is now deprecated and will be removed in a future major release, so users should transition to using the newmiddlewareModefeature as soon as possible.export default defineConfig({ adapter: netlify({ - edgeMiddleware: true + middlewareMode: 'edge' }) }) -
#15006
f361730Thanks @florian-lefebvre! - Adds new session driver object shapeFor greater flexibility and improved consistency with other Astro code, session drivers are now specified as an object:
-import { defineConfig } from 'astro/config' +import { defineConfig, sessionDrivers } from 'astro/config' export default defineConfig({ session: { - driver: 'redis', - options: { - url: process.env.REDIS_URL - }, + driver: sessionDrivers.redis({ + url: process.env.REDIS_URL + }), } })
Specifying the session driver as a string has been deprecated, but will continue to work until this feature is removed completely in a future major version. The object shape is the current recommended and documented way to configure a session driver.
-
#15413
736216bThanks @florian-lefebvre! - Updates the implementation to use the new Adapter API -
#14946
95c40f7Thanks @ematipico! - Removes theexperimental.cspflag and replaces it with a new configuration optionsecurity.csp- (v6 upgrade guidance)
Patch Changes
-
#15781
2de969dThanks @ematipico! - Adds a newclientAddressoption to thecreateContext()functionProviding this value gives adapter and middleware authors explicit control over the client IP address. When not provided, accessing
clientAddressthrows an error consistent with other contexts where it is not set by the adapter.Additionally, both of the official Netlify and Vercel adapters have been updated to provide this information in their edge middleware.
import { createContext } from 'astro/middleware'; createContext({ clientAddress: context.headers.get('x-real-ip'), });
-
#15665
52a7efdThanks @matthewp! - Fixes builds that were failing with "Entry module cannot be external" error when using the Netlify adapterThis error was preventing sites from building after recent internal changes. Your builds should now work as expected without any changes to your code.
-
#15679
19ba822Thanks @matthewp! - Fixes server-rendered routes returning 404 errorsA configuration error in the build output prevented Netlify from correctly routing requests to server-rendered pages, causing them to return 404 errors. This fix ensures that all server routes are properly handled by the Netlify SSR function.
-
#15809
94b4a46Thanks @Princesseuh! - Fixes the image CDN being used in development despite being disabled in certain cases -
#15460
ee7e53fThanks @florian-lefebvre! - Updates to use the new Adapter API -
#15450
50c9129Thanks @florian-lefebvre! - Fixes a case wherebuild.serverEntrywould not be respected when using the new Adapter API -
#15461
9f21b24Thanks @florian-lefebvre! - Updates to new Adapter API introduced in v6 -
Updated dependencies [
4ebc1e3,4e7f3e8,a164c77,cf6ea6b,a18d727,240c317,745e632]:- @astrojs/internal-helpers@0.8.0
- @astrojs/underscore-redirects@1.0.0
Major Changes
-
#14306
141c4a2Thanks @ematipico! - Changes the API for creating a customentrypoint, replacing thecreateExports()function with a direct export pattern.What should I do?
If you're using a custom
entryPointin your Cloudflare adapter config, update your existing worker file that usescreateExports()to reflect the new, simplified pattern:my-entry.ts
import type { SSRManifest } from 'astro'; import { App } from 'astro/app'; import { handle } from '@astrojs/cloudflare/handler'; import { DurableObject } from 'cloudflare:workers'; class MyDurableObject extends DurableObject<Env> { constructor(ctx: DurableObjectState, env: Env) { super(ctx, env); } } export function createExports(manifest: SSRManifest) { const app = new App(manifest); return { default: { async fetch(request, env, ctx) { await env.MY_QUEUE.send('log'); return handle(manifest, app, request, env, ctx); }, async queue(batch, _env) { let messages = JSON.stringify(batch.messages); console.log(`consumed from our queue: ${messages}`); }, } satisfies ExportedHandler<Env>, MyDurableObject: MyDurableObject, }; }
To create the same custom
entrypointusing the updated API, export the following function instead:my-entry.ts
import { handle } from '@astrojs/cloudflare/utils/handler'; export default { async fetch(request, env, ctx) { await env.MY_QUEUE.send("log"); return handle(manifest, app, request, env, ctx); }, async queue(batch, _env) { let messages = JSON.stringify(batch.messages); console.log(`consumed from our queue: ${messages}`); } } satisfies ExportedHandler<Env>,
The manifest is now created internally by the adapter.
-
#15435
957b9feThanks @rururux! - Changes the default image service fromcompiletocloudflare-binding. Image services options that resulted in broken images in development due to Node JS incompatiblities have now been updated to use the noop passthrough image service in dev mode. - (Cloudflare v13 and Astro6 upgrade guidance) -
#15400
41eb284Thanks @florian-lefebvre! - Removes theworkerEntryPointoption, which wasn't used anymore. Set themainfield of your wrangler config insteadSee how to migrate
-
#14306
141c4a2Thanks @ematipico! - Development server now runs in workerdastro devnow runs your Cloudflare application using Cloudflare's workerd runtime instead of Node.js. This means your development environment is now a near-exact replica of your production environment—the same JavaScript engine, the same APIs, the same behavior. You'll catch issues during development that would have only appeared in production, and features like Durable Objects, Workers Analytics Engine, and R2 bindings work exactly as they do on Cloudflare's platform.New runtime
Previously,
Astro.locals.runtimeprovided access to Cloudflare-specific APIs. These APIs have now moved to align with Cloudflare's native patterns.What should I do?
Update occurrences of
Astro.locals.runtime:Astro.locals.runtime.env→ Importenvfromcloudflare:workersAstro.locals.runtime.cf→ Access viaAstro.request.cfAstro.locals.runtime.caches→ Use the globalcachesobjectAstro.locals.runtime(forExecutionContext) → UseAstro.locals.cfContext
Here's an example showing how to update your code:
Before:
--- const { env, cf, caches, ctx } = Astro.locals.runtime; const value = await env.MY_KV.get('key'); const country = cf.country; await caches.default.put(request, response); ctx.waitUntil(promise); --- <h1>Country: {country}</h1>
After:
--- import { env } from 'cloudflare:workers'; const value = await env.MY_KV.get('key'); const country = Astro.request.cf.country; await caches.default.put(request, response); Astro.locals.cfContext.waitUntil(promise); --- <h1>Country: {country}</h1>
-
#15345
840fbf9Thanks @matthewp! - Removes thecloudflareModulesadapter optionThe
cloudflareModulesoption has been removed because it is no longer necessary. Cloudflare natively supports importing.sql,.wasm, and other module types.What should I do?
Remove the
cloudflareModulesoption from your Cloudflare adapter configuration if you were using it:import cloudflare from '@astrojs/cloudflare'; export default defineConfig({ adapter: cloudflare({ - cloudflareModules: true }) }); -
#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance) -
#15037
8641805Thanks @matthewp! - Updates the Wrangler entrypointPreviously, the
mainfield inwrangler.jsoncpointed to the built output, since Wrangler only ran in production after the build completed:Now that Wrangler runs in both development (via workerd) and production, Astro provides a default entrypoint that works for both scenarios.
What should I do?
Update your
wrangler.jsoncto use the new entrypoint:{ "main": "@astrojs/cloudflare/entrypoints/server", }This single entrypoint handles both
astro devand production deployments. -
#15480
e118214Thanks @alexanderniebuhr! - Drops official support for Cloudflare Pages in favor of Cloudflare WorkersThe Astro Cloudflare adapter now only supports deployment to Cloudflare Workers by default in order to comply with Cloudflare's recommendations for new projects. If you are currently deploying to Cloudflare Pages, consider migrating to Workers by following the Cloudflare guide for an optimal experience and full feature support.
Minor Changes
-
#15435
957b9feThanks @rururux! - Adds support for configuring the image service as an object with separatebuildandruntimeoptionsIt is now possible to set both a build-time and runtime service independently. Currently,
'compile'is the only available build time option. The supported runtime options are'passthrough'(default) and'cloudflare-binding':import { defineConfig } from 'astro/config'; import cloudflare from '@astrojs/cloudflare'; export default defineConfig({ adapter: cloudflare({ imageService: { build: 'compile', runtime: 'cloudflare-binding' }, }), });
See the Cloudflare adapter
imageServicedocs for more information about configuring your image service. -
#15077
a164c77Thanks @matthewp! - Adds support for prerendering pages using the workerd runtime.The Cloudflare adapter now uses the new
setPrerenderer()API to prerender pages via HTTP requests to a local preview server running workerd, instead of using Node.js. This ensures prerendered pages are built using the same runtime that serves them in production. -
#14306
141c4a2Thanks @ematipico! - Adds support forastro previewcommandDevelopers can now use
astro previewto test their Cloudflare Workers application locally before deploying. The preview runs using Cloudflare's workerd runtime, giving you a staging environment that matches production exactly—including support for KV namespaces, environment variables, and other Cloudflare-specific features. -
#15037
8641805Thanks @matthewp! - The Wrangler configuration file is now optional. If you don't have custom Cloudflare bindings (KV, D1, Durable Objects, etc.), Astro will automatically generate a default configuration for you.What should I do?
If your
wrangler.jsonconly contains basic configuration like this:{ "main": "@astrojs/cloudflare/entrypoints/server", "compatibility_date": "2026-01-28", "assets": { "directory": "./dist", "binding": "ASSETS", }, }You can safely delete the file. Astro will handle this configuration automatically.
You only need a wrangler config file if you're using:
- KV namespaces
- D1 databases
- Durable Objects
- R2 buckets
- Environment variables
- Custom compatibility flags
- Other Cloudflare-specific features
-
#15006
f361730Thanks @florian-lefebvre! - Adds new session driver object shapeFor greater flexibility and improved consistency with other Astro code, session drivers are now specified as an object:
-import { defineConfig } from 'astro/config' +import { defineConfig, sessionDrivers } from 'astro/config' export default defineConfig({ session: { - driver: 'redis', - options: { - url: process.env.REDIS_URL - }, + driver: sessionDrivers.redis({ + url: process.env.REDIS_URL + }), } })
Specifying the session driver as a string has been deprecated, but will continue to work until this feature is removed completely in a future major version. The object shape is the current recommended and documented way to configure a session driver.
-
#15556
8fb329bThanks @florian-lefebvre! - Adds support for more@cloudflare/vite-pluginoptionsThe adapter now accepts the following options from Cloudflare's Vite plugin:
auxiliaryWorkersconfigPathinspectorPortpersistStateremoteBindingsexperimental.headersAndRedirectsDevModeSupport
For example, you can now set
inspectorPortto provide a custom port for debugging your Workers:// astro.config.mjs import { defineConfig } from 'astro/config'; import cloudflare from '@astrojs/cloudflare'; export default defineConfig({ adapter: cloudflare({ inspectorPort: 3456, }), });
Patch Changes
-
#15044
7cac71bThanks @florian-lefebvre! - Removes an exposed internal API of the preview server -
#15080
f67b738Thanks @gameroman! - Updateswranglerdependency to be apeerDependencyover adependency -
#15039
6cc96e7Thanks @matthewp! - Fixes static content deployment by moving it to another folder, so Wrangler can tell the static and worker content apart -
#15452
e1aa3f3Thanks @matthewp! - Fixes server-side dependencies not being discovered ahead of time during developmentPreviously, imports in
.astrofile frontmatter were not scanned by Vite's dependency optimizer, causing a "new dependencies optimized" message and page reload when the dependency was first encountered. Astro is now able to scan these dependencies ahead of time. -
#15391
5d996ccThanks @florian-lefebvre! - Fixes types of thehandle()function exported from/handler, that could be incompatible with types generated bywrangler types -
#15696
a9fd221Thanks @Princesseuh! - Fixes duplicate logging showing up in some cases when prerendering pages -
#15309
4b9c8b8Thanks @ematipico! - Update the underneath@cloudflare/workers-typeslibrary to address a warning emitted by the package manager during the installation. -
#15079
4463a55Thanks @ascorbic! - Fixes auto-provisioning of default bindings (SESSION KV, IMAGES, and ASSETS). Default bindings are now correctly applied whether or not you have awrangler.jsonfile.
Previously, these bindings were only added when no wrangler config file existed. Now they are added in both cases, unless you've already defined them yourself. -
#15694
66449c9Thanks @matthewp! - Fixes deployment of static sites with the Cloudflare adapterFixes an issue with detecting and building fully static sites that caused deployment errors when using
output: 'static'with the Cloudflare adapter -
#15565
30cd6dbThanks @ematipico! - Fixes an issue where the use of theCodecomponent would result in an unexpected error. -
#15121
06261e0Thanks @ematipico! - Fixes a bug where the Astro, with the Cloudflare integration, couldn't correctly serve certain routes in the development server. -
#15026
90c608cThanks @matthewp! - Improves prebundling of internal Astro modules -
#15778
4ebc1e3Thanks @ematipico! - Fixes an issue where the computedclientAddresswas incorrect in cases of a Request header with multiple values. TheclientAddressis now also validated to contain only characters valid in IP addresses, rejecting injection payloads. -
#15669
d5a888bThanks @florian-lefebvre! - Removes thecssescdependencyThis CommonJS dependency could sometimes cause errors because Astro is ESM-only. It is now replaced with a built-in ESM-friendly implementation.
-
#15075
ee2c260Thanks @matthewp! - Adds deprecation errors forAstro.locals.runtimeproperties to help migrate from Astro v5 to v6When accessing the removed
Astro.locals.runtimeproperties on Cloudflare, developers now receive clear error messages explaining the migration path:Astro.locals.runtime.env→ Useimport { env } from "cloudflare:workers"Astro.locals.runtime.cf→ UseAstro.request.cfAstro.locals.runtime.caches→ Use the globalcachesobjectAstro.locals.runtime.ctx→ UseAstro.locals.cfContext
-
#15336
9cce92eThanks @ascorbic! - Fixes a dev server issue where framework components from linked packages would fail to load with a 504 error.This could occur when using
client:onlyor other client directives with components from monorepo packages (linked viafile:or workspace protocol). The first request would trigger Vite's dependency optimizer mid-request, causing concurrent client module requests to fail. -
#15255
a66783aThanks @florian-lefebvre! - Fixes a case where the types ofhandle()could mismatch with the ones from the user's project. They now rely on globals, that can be obtained by runningwrangler types -
#15045
31074fcThanks @ematipico! - Fixes an issue where using the Vue integration with the Cloudflare adapter resulted in some runtime errors. -
#15386
a0234a3Thanks @OliverSpeir! - Updatesastro add cloudflareto use the latest validcompatibility_datein the wrangler config, if available -
#15432
e2ad69eThanks @OliverSpeir! - Removes unnecessary warning about sharp from being printed at start of dev server and build -
#15588
425ea16Thanks @rururux! - Fixes an issue whereesbuildwould throw a "Top-level return cannot be used inside an ECMAScript module" error during dependency scanning in certain environments. -
#15450
50c9129Thanks @florian-lefebvre! - Fixes a case wherebuild.serverEntrywould not be respected when using the new Adapter API -
#15030
b5aa52bThanks @ematipico! - Fixed an issue where the featureexperimental.chromeDevtoolsWorkspacewasn't supported by the new version of the adapter. -
#15648
802426bThanks @rururux! - Restore and fix<Code />component functionality on Cloudflare Workers. -
#15478
ee519e5Thanks @matthewp! - Fixes fully static sites to not output server-side worker code. When all routes are prerendered, the_worker.jsdirectory is now removed from the build output. -
#15636
5ecd04cThanks @florian-lefebvre! - Adds an error when running on Stackblitz, sinceworkerddoesn't support it -
#15269
6f82aaeThanks @ematipico! - Fixes a regression wherebuild.serverEntrystopped working as expected. -
#15798
05771cfThanks @rururux! - Fixes a regression where using the adapter would throw an error when using an integration that uses JSX. -
#15053
674b63fThanks @matthewp! - Excludesastro:*andvirtual:astro:*from client optimizeDeps in core. Needed for prefetch users since virtual modules are now in the dependency graph. -
#15495
5b99e90Thanks @leekeh! - Refactors to usemiddlewareModeadapter feature (set toclassic) -
Updated dependencies [
4ebc1e3,4e7f3e8,a164c77,cf6ea6b,a18d727,240c317,745e632]:- @astrojs/internal-helpers@0.8.0
- @astrojs/underscore-redirects@1.0.0
Minor Changes
- #14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Patch Changes
Major Changes
-
#14494
727b0a2Thanks @florian-lefebvre! - Updates Markdown heading ID generation - (v6 upgrade guidance) -
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance) -
#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Patch Changes
-
#15475
36fc0e0Thanks @delucis! - Fixes edge cases where anexport const components = {...}declaration would fail to be detected with theoptimizeoption enabled -
#15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22 -
Updated dependencies [
bbb5811,cb99214,80f0225,727b0a2,1fa4177,7c55f80,6f19ecc,f94d3c5]:- @astrojs/markdown-remark@7.0.0
Major Changes
-
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance) -
#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Patch Changes
Minor Changes
-
#15778
4ebc1e3Thanks @ematipico! - Added a new entry point called/request, which exposes utilities to work with theRequesttype:getFirstForwardedValue: retrieves the first value of a multi-value header.isValidIpAddress: checks whether a string contains only characters valid in IPv4/IPv6 addresses.getValidatedIpFromHeader: extracts the first value from a header and validates it as an IP address.getClientIpAddress: retrieves and validates the first IP from thex-forwarded-forheader.
-
#15077
a164c77Thanks @matthewp! - AddsnormalizePathname()utility function for normalizing URL pathnames to match the canonical form used by route generation. -
#15419
a18d727Thanks @ematipico! - Adds a new/clispecifier and the utilityNPM_PACKAGE_NAME_REGEX. -
#15369
240c317Thanks @florian-lefebvre! - BREAKING CHANGERemoves
collapseDuplicateSlashes(),startsWithForwardSlash(),startsWithDotDotSlash(),startsWithDotSlash()andisAbsolutePath()from the/pathexport -
#15771
745e632Thanks @rururux! - Adds the new utilitiesMANY_LEADING_SLASHESandcollapseDuplicateLeadingSlashes.
Patch Changes
Major Changes
- #14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance)
Patch Changes
-
#15344
9d87f77Thanks @matthewp! - Fixes a hang that could occur when the npm registry is slow or unresponsive by adding a 10 second timeout to the version check -
#15350
d758b68Thanks @matthewp! - Errors when--addand--no-installflags are used together, as--addrequires dependencies to be installed -
#15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22 -
#15419
a18d727Thanks @ematipico! - Fixes an issue where--addcould accept any kind of string, leading to different errors. Now--addaccepts only values of valid integrations and adapters. -
#15419
a18d727Thanks @ematipico! - Fixes an issue where theaddcommand could accept any arbitrary value, leading the possible command injections. Nowaddand--addaccepts
values that are only acceptable npmjs.org names.
Major Changes
-
#14494
727b0a2Thanks @florian-lefebvre! - Updates Markdown heading ID generation - (v6 upgrade guidance) -
#15726
6f19eccThanks @ocavue! - Updates dependencyshikito v4Check Shiki's upgrade guide.
Minor Changes
-
#15277
cb99214Thanks @ematipico! - Fixes an issue where the functioncreateShikiHighlighterwould always create a new Shiki highlighter instance. Now the function returns a cached version of the highlighter based on the Shiki options. This should improve the performance for sites that heavily rely on Shiki and code in their pages. -
#15332
7c55f80Thanks @matthewp! - Exposes thefileURLoption inMarkdownProcessorRenderOptions, allowing callers to specify the file URL for resolving relative image paths.
Patch Changes
-
#15297
80f0225Thanks @rururux! - Fixes a case where code blocks generated by prism would include theis:rawattribute in the final output -
#15676
1fa4177Thanks @rururux! - Fixes an issue where the use of theCodecomponent would result in an unexpected error. -
#15651
f94d3c5Thanks @ocavue! - Reuses cached Shiki highlighter instances across languages. -
Updated dependencies [
bbb5811,4ebc1e3,11efb05,4e7f3e8,a164c77,cf6ea6b,e131261,a18d727,240c317,745e632]:- @astrojs/prism@4.0.0
- @astrojs/internal-helpers@0.8.0
Major Changes
- #15413
736216bThanks @florian-lefebvre! - Removes the deprecated@astrojs/vercel/serverlessand@astrojs/vercel/staticexports. Use the@astrojs/vercelexport instead
Minor Changes
-
#15258
d339a18Thanks @ematipico! - Stabilizes the adapter featureexperimentalStatiHeaders. If you were using this feature in any of the supported adapters, you'll need to change the name of the flag:export default defineConfig({ adapter: netlify({ - experimentalStaticHeaders: true + staticHeaders: true }) }) -
#15413
736216bThanks @florian-lefebvre! - Updates the implementation to use the new Adapter API -
#15495
5b99e90Thanks @leekeh! - Adds newmiddlewareModeadapter feature and deprecatesedgeMiddlewareoptionThe
edgeMiddlewareoption is now deprecated and will be removed in a future release, so users should transition to using the newmiddlewareModefeature as soon as possible.export default defineConfig({ adapter: vercel({ - edgeMiddleware: true + middlewareMode: 'edge' }) }) -
#14946
95c40f7Thanks @ematipico! - Removes theexperimental.cspflag and replaces it with a new configuration optionsecurity.csp- (v6 upgrade guidance)
Patch Changes
-
#15781
2de969dThanks @ematipico! - Adds a newclientAddressoption to thecreateContext()functionProviding this value gives adapter and middleware authors explicit control over the client IP address. When not provided, accessing
clientAddressthrows an error consistent with other contexts where it is not set by the adapter.Additionally, both of the official Netlify and Vercel adapters have been updated to provide this information in their edge middleware.
import { createContext } from 'astro/middleware'; createContext({ clientAddress: context.headers.get('x-real-ip'), });
-
#15778
4ebc1e3Thanks @ematipico! - Fixes an issue where the computedclientAddresswas incorrect in cases of a Request header with multiple values. TheclientAddressis now also validated to contain only characters valid in IP addresses, rejecting injection payloads. -
#15460
ee7e53fThanks @florian-lefebvre! - Updates to use the new Adapter API -
#15450
50c9129Thanks @florian-lefebvre! - Fixes a case wherebuild.serverEntrywould not be respected when using the new Adapter API -
#15461
9f21b24Thanks @florian-lefebvre! - Updates to new Adapter API introduced in v6 -
#15125
6feb0d7Thanks @florian-lefebvre! - Updates Node versions data to account for v24 as the default -
Updated dependencies [
4ebc1e3,4e7f3e8,a164c77,cf6ea6b,a18d727,240c317,745e632]:- @astrojs/internal-helpers@0.8.0
Major Changes
-
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance) -
#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Patch Changes
-
#15619
bbfa7c8Thanks @rururux! - Fixed an issue where the Preact integration would incorrectly intercept React 19 components, triggering "Invalid hook call" error logs. -
#15383
876b664Thanks @matthewp! - Fixes Preact components failing to render when using the Cloudflare adapter in dev mode. -
#15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22 -
#15700
4e7f3e8Thanks @ocavue! - Improves how Preact components are identified when setting theincludeand/orexcludeoptions in projects where multiple JSX frameworks are used together -
Updated dependencies [
4ebc1e3,4e7f3e8,a164c77,cf6ea6b,a18d727,240c317,745e632]:- @astrojs/internal-helpers@0.8.0
Minor Changes
-
#14494
727b0a2Thanks @florian-lefebvre! - Updates Markdown heading ID generation - (v6 upgrade guidance) -
#15345
840fbf9Thanks @matthewp! - Uses Astro's newemitClientAssetAPI for image emission in content collections -
#15097
be1b9bfThanks @matthewp! - Updates internal image processing to be compatible with Astro 6. This change is internal-only and does not affect the public API.The integration now uses Astro's new
emitImageMetadata()function instead of the removedemitESMImage()function for processing images referenced in Markdoc content during build time. This ensures continued compatibility with Astro's asset processing pipeline while maintaining the same behavior for users. -
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance) -
#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Patch Changes
-
#15184
f47c071Thanks @ematipico! - Fixes an issue where the package wasn't correctly published -
#15457
6e8da44Thanks @AhmadYasser1! - Fixes custom attributes on Markdoc's built-in{% table %}tag causing "Invalid attribute" validation errors.In Markdoc,
tableexists as both a tag ({% table %}) and a node (the inner table structure). When users defined custom attributes on eithernodes.tableortags.table, the attributes weren't synced to the counterpart, causing validation to fail on whichever side was missing the declaration.The fix automatically syncs custom attribute declarations between tags and nodes that share the same name, so users can define attributes on either side and have them work correctly.
-
#15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22 -
#15335
75931c2Thanks @matthewp! - Fixes an issue where spreading a built-in Markdoc node config (e.g.,...Markdoc.nodes.fence) and specifying a customrendercomponent would not work because the built-intransform()function was overriding the custom component. Now,renderwins overtransformwhen both are specified. -
Updated dependencies [
bbb5811,bbb5811,4ebc1e3,cb99214,80f0225,727b0a2,11efb05,4e7f3e8,a164c77,1fa4177,7c55f80,cf6ea6b,e131261,6f19ecc,f94d3c5,a18d727,240c317,745e632]:- @astrojs/markdown-remark@7.0.0
- @astrojs/prism@4.0.0
- @astrojs/internal-helpers@0.8.0
Major Changes
- #14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Minor Changes
- #15425
0317e99Thanks @ocavue! - Updates@vitejs/plugin-vueto v6,@vitejs/plugin-vue-jsxto v5, andvite-plugin-vue-devtoolsto v8. No changes are needed from users.
Patch Changes
-
#15125
6feb0d7Thanks @florian-lefebvre! - Adds support for arbitrary HTML attributes on Vue components -
#15045
31074fcThanks @ematipico! - Fixes an issue where using the Vue integration with the Cloudflare adapter resulted in some runtime errors.
Minor Changes
- #14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance)
Patch Changes
Patch Changes
-
#15125
6feb0d7Thanks @florian-lefebvre! - Fix "Find All References" and other TypeScript features by ensuring the plugin bundle is correctly included -
#15125
6feb0d7Thanks @florian-lefebvre! - Fixes syntax highlighting sometimes not working when the frontmatter or script tags ended with certain TypeScript constructs -
#15496
eb7cddaThanks @matthewp! - Fix syntax highlighting for lowercase component tags that start with "style" or "script".
Major Changes
-
#14446
ece667aThanks @florian-lefebvre! - RemovesentryPointsonastro:build:ssrhook (Integration API) - (v6 upgrade guidance) -
#15535
dfe2e22Thanks @florian-lefebvre! - DeprecatesloadManifest()andloadApp()fromastro/app/node(Adapter API) - (v6 upgrade guidance) -
#15006
f361730Thanks @florian-lefebvre! - Removes sessiontestdriver - (v6 upgrade guidance) -
#15461
9f21b24Thanks @florian-lefebvre! - BREAKING CHANGE to the v6 beta Adapter API only: renamesentryTypetoentrypointResolutionand updates possible valuesAstro 6 introduced a way to let adapters have more control over the entrypoint by passing
entryType: 'self'tosetAdapter(). However during beta development, the name was unclear and confusing.entryTypeis now renamed toentrypointResolutionand its possible values are updated:legacy-dynamicbecomesexplicit.selfbecomesauto.
If you are building an adapter with v6 beta and specifying
entryType, update it:setAdapter({ // ... - entryType: 'legacy-dynamic' + entrypointResolution: 'explicit' }) setAdapter({ // ... - entryType: 'self' + entrypointResolution: 'auto' }) -
#14426
861b9ccThanks @florian-lefebvre! - Removes the deprecatedemitESMImage()function - (v6 upgrade guidance) -
#15006
f361730Thanks @florian-lefebvre! - Deprecates session driver string signature - (v6 upgrade guidance) -
#15180
8780ff2Thanks @Princesseuh! - Adds support for converting SVGs to raster images (PNGs, WebP, etc) to the default Sharp image service - (v6 upgrade guidance) -
#14446
ece667aThanks @florian-lefebvre! - Removesroutesonastro:build:donehook (Integration API) - (v6 upgrade guidance) -
#15424
33d6146Thanks @Princesseuh! - Throws an error whengetImage()fromastro:assetsis called on the client - (v6 upgrade guidance) -
#14462
9fdfd4cThanks @florian-lefebvre! - Removes the oldapp.render()signature (Adapter API) - (v6 upgrade guidance) -
#14956
0ff51dfThanks @matthewp! - Astro v6.0 upgrades to Zod v4 for schema validation - (v6 upgrade guidance) -
#14759
d7889f7Thanks @florian-lefebvre! - Updates how schema types are inferred for content loaders with schemas (Loader API) - (v6 upgrade guidance) -
#15192
ada2808Thanks @gameroman! - Removes support for CommonJS config files - (v6 upgrade guidance) -
#14462
9fdfd4cThanks @florian-lefebvre! - Removesprefetch()withoption - (v6 upgrade guidance) -
#14306
141c4a2Thanks @ematipico! - Removes support for routes with percent-encoded percent signs (e.g.%25) - (v6 upgrade guidance) -
#14432
b1d87ecThanks @florian-lefebvre! - DeprecatesAstroingetStaticPaths()- (v6 upgrade guidance) -
#14759
d7889f7Thanks @florian-lefebvre! - Removes the option to define dynamic schemas in content loaders as functions and adds a new equivalentcreateSchema()property (Loader API) - (v6 upgrade guidance) -
#14457
049da87Thanks @florian-lefebvre! - Updates trailing slash behavior of endpoint URLs - (v6 upgrade guidance) -
#14494
727b0a2Thanks @florian-lefebvre! - Updates Markdown heading ID generation - (v6 upgrade guidance) -
#14461
55a1a91Thanks @florian-lefebvre! - Deprecatesimport.meta.env.ASSETS_PREFIX- (v6 upgrade guidance) -
#14586
669ca5bThanks @ocavue! - Changes the values allowed inparamsreturned bygetStaticPaths()- (v6 upgrade guidance) -
#15668
1118ac4Thanks @florian-lefebvre! - Changes TypeScript configuration - (v6 upgrade guidance) -
#14421
df6d2d7Thanks @florian-lefebvre! - Removes the previously deprecatedAstro.glob()- (v6 upgrade guidance) -
#15049
beddfebThanks @Ntale3! - Removes the ability to render Astro components in Vitest client environments - (v6 upgrade guidance) -
#15461
9f21b24Thanks @florian-lefebvre! - DeprecatescreateExports()andstart()(Adapter API) - (v6 upgrade guidance) -
#15535
dfe2e22Thanks @florian-lefebvre! - DeprecatesNodeAppfromastro/app/node(Adapter API) - (v6 upgrade guidance) -
#14462
9fdfd4cThanks @florian-lefebvre! - Removes thehandleFormsprop for the<ClientRouter />component - (v6 upgrade guidance) -
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance) -
#15332
7c55f80Thanks @matthewp! - Adds frontmatter parsing support torenderMarkdownin content loaders. When markdown content includes frontmatter, it is now extracted and available inmetadata.frontmatter, and excluded from the HTML output. This makesrenderMarkdownbehave consistently with theglobloader.const loader = { name: 'my-loader', load: async ({ store, renderMarkdown }) => { const content = `--- title: My Post --- # Hello World `; const rendered = await renderMarkdown(content); // rendered.metadata.frontmatter is now { title: 'My Post' } // rendered.html contains only the content, not the frontmatter }, };
-
#14400
c69c7deThanks @ellielok! - Removes the deprecated<ViewTransitions />component - (v6 upgrade guidance) -
#14306
141c4a2Thanks @ematipico! - RemovesRouteData.generatefrom the Integration API - (v6 upgrade guidance) -
#14406
4f11510Thanks @florian-lefebvre! - Changes the default routing configuration value ofi18n.routing.redirectToDefaultLocalefromtruetofalse- (v6 upgrade guidance) -
#14989
73e8232Thanks @florian-lefebvre! - Deprecates exposedastro:transitionsinternals - (v6 upgrade guidance) -
#15726
6f19eccThanks @ocavue! - Updates dependencyshikito v4Check Shiki's upgrade guide.
-
#14758
010f773Thanks @florian-lefebvre! - Removes thesetManifestDatamethod fromAppandNodeApp(Adapter API) - (v6 upgrade guidance) -
#14477
25fe093Thanks @florian-lefebvre! - Removesrewrite()from Actions context - (v6 upgrade guidance) -
#14826
170f64eThanks @florian-lefebvre! - Removes theexperimental.failOnPrerenderConflictflag and replaces it with a new configuration optionprerenderConflictBehavior- (v6 upgrade guidance) -
#14923
95a1969Thanks @florian-lefebvre! - Deprecatesastro:schemaandzfromastro:contentin favor ofastro/zod- (v6 upgrade guidance) -
#14844
8d43b1dThanks @trueberryless! - Removes exposedastro:actionsinternals - (v6 upgrade guidance) -
#14306
141c4a2Thanks @ematipico! - Changes the shape ofSSRManifestproperties and adds several new required properties in the Adapter API - (v6 upgrade guidance) -
#15266
f7c9365Thanks @florian-lefebvre! - AllowsAstro.cspandcontext.cspto be undefined instead of throwing errors whencsp: trueis not configuredWhen using the experimental Content Security Policy feature in Astro 5.x,
context.cspwas always defined but would throw ifexperimental.cspwas not enabled in the Astro config.For the stable version of this API in Astro 6,
context.cspcan now be undefined if CSP is not enabled and its methods will never throw.What should I do?
If you were using experimental CSP runtime utilities, you must now access methods conditionally:
-Astro.csp.insertDirective("default-src 'self'"); +Astro.csp?.insertDirective("default-src 'self'");
-
#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance) -
#15407
aedbbd8Thanks @ematipico! - Changes how styles of responsive images are emitted - (v6 upgrade guidance) -
#14306
141c4a2Thanks @ematipico! - Changes integration hooks and HMR access patterns in the Integration API - (v6 upgrade guidance) -
#14306
141c4a2Thanks @ematipico! - Removes the unusedastro:ssr-manifestvirtual module - (v6 upgrade guidance) -
#14485
6f67c6eThanks @florian-lefebvre! - Updatesimport.meta.envvalues to always be inlined - (v6 upgrade guidance) -
#14480
36a461bThanks @florian-lefebvre! - Updates<script>and<style>tags to render in the order they are defined - (v6 upgrade guidance) -
#14407
3bda3ceThanks @ascorbic! - Removes legacy content collection support - (v6 upgrade guidance)
Minor Changes
-
#14306
141c4a2Thanks @ematipico! - Adds new optional properties tosetAdapter()for adapter entrypoint handling in the Adapter APIChanges:
- New optional properties:
entryType?: 'self' | 'legacy-dynamic'- determines if the adapter provides its own entrypoint ('self') or if Astro constructs one ('legacy-dynamic', default)
Migration: Adapter authors can optionally add these properties to support custom dev entrypoints. If not specified, adapters will use the legacy behavior.
- New optional properties:
-
#15700
4e7f3e8Thanks @ocavue! - Updates the internal logic during SSR by providing additional metadata for UI framework integrations. -
#15231
3928b87Thanks @rururux! - Adds a new optionalgetRemoteSize()method to the Image Service API.Previously,
inferRemoteSize()had a fixed implementation that fetched the entire image to determine its dimensions.
With this new helper function that extendsinferRemoteSize(), you can now override or extend how remote image metadata is retrieved.This enables use cases such as:
- Caching: Storing image dimensions in a database or local cache to avoid redundant network requests.
- Provider APIs: Using a specific image provider's API (like Cloudinary or Vercel) to get dimensions without downloading the file.
For example, you can add a simple cache layer to your existing image service:
const cache = new Map(); const myService = { ...baseService, async getRemoteSize(url, imageConfig) { if (cache.has(url)) return cache.get(url); const result = await baseService.getRemoteSize(url, imageConfig); cache.set(url, result); return result; }, };
See the Image Services API reference documentation for more information.
-
#15077
a164c77Thanks @matthewp! - Updates the Integration API to addsetPrerenderer()to theastro:build:starthook, allowing adapters to provide custom prerendering logic.The new API accepts either an
AstroPrerendererobject directly, or a factory function that receives the default prerenderer:'astro:build:start': ({ setPrerenderer }) => { setPrerenderer((defaultPrerenderer) => ({ name: 'my-prerenderer', async setup() { // Optional: called once before prerendering starts }, async getStaticPaths() { // Returns array of { pathname: string, route: RouteData } return defaultPrerenderer.getStaticPaths(); }, async render(request, { routeData }) { // request: Request // routeData: RouteData // Returns: Response }, async teardown() { // Optional: called after all pages are prerendered } })); }
Also adds the
astro:static-pathsvirtual module, which exports aStaticPathsclass for adapters to collect all prerenderable paths from within their target runtime. This is useful when implementing a custom prerenderer that runs in a non-Node environment:// In your adapter's request handler (running in target runtime) import { App } from 'astro/app'; import { StaticPaths } from 'astro:static-paths'; export function createApp(manifest) { const app = new App(manifest); return { async fetch(request) { const { pathname } = new URL(request.url); // Expose endpoint for prerenderer to get static paths if (pathname === '/__astro_static_paths') { const staticPaths = new StaticPaths(app); const paths = await staticPaths.getAll(); return new Response(JSON.stringify({ paths })); } // Normal request handling return app.render(request); }, }; }
See the adapter reference for more details on implementing a custom prerenderer.
-
#15345
840fbf9Thanks @matthewp! - Adds a newemitClientAssetfunction toastro/assets/utilsfor integration authors. This function allows emitting assets that will be moved to the client directory during SSR builds, useful for assets referenced in server-rendered content that need to be available on the client.import { emitClientAsset } from 'astro/assets/utils'; // Inside a Vite plugin's transform or load hook const handle = emitClientAsset(this, { type: 'asset', name: 'my-image.png', source: imageBuffer, });
-
#15460
ee7e53fThanks @florian-lefebvre! - Updates the Adapter API to allow providing aserverEntrypointwhen usingentryType: 'self'Astro 6 introduced a new powerful yet simple Adapter API for defining custom server entrypoints. You can now call
setAdapter()with theentryType: 'self'option and specify your customserverEntrypoint:export function myAdapter() { return { name: 'my-adapter', hooks: { 'astro:config:done': ({ setAdapter }) => { setAdapter({ name: 'my-adapter', entryType: 'self', serverEntrypoint: 'my-adapter/server.js', supportedAstroFeatures: { // ... }, }); }, }, }; }
If you need further customization at the Vite level, you can omit
serverEntrypointand instead specify your custom server entrypoint withvite.build.rollupOptions.input. -
#15781
2de969dThanks @ematipico! - Adds a newclientAddressoption to thecreateContext()functionProviding this value gives adapter and middleware authors explicit control over the client IP address. When not provided, accessing
clientAddressthrows an error consistent with other contexts where it is not set by the adapter.Additionally, both of the official Netlify and Vercel adapters have been updated to provide this information in their edge middleware.
import { createContext } from 'astro/middleware'; createContext({ clientAddress: context.headers.get('x-real-ip'), });
-
#15258
d339a18Thanks @ematipico! - Stabilizes the adapter featureexperimentalStatiHeaders. If you were using this feature in any of the supported adapters, you'll need to change the name of the flag:export default defineConfig({ adapter: netlify({ - experimentalStaticHeaders: true + staticHeaders: true }) }) -
#15535
dfe2e22Thanks @florian-lefebvre! - Exports newcreateRequest()andwriteResponse()utilities fromastro/app/nodeTo replace the deprecated
NodeApp.createRequest()andNodeApp.writeResponse()methods, theastro/app/nodemodule now exposes newcreateRequest()andwriteResponse()utilities. These can be used to convert a NodeJSIncomingMessageinto a web-standardRequestand stream a web-standardResponseinto a NodeJSServerResponse:import { createApp } from 'astro/app/entrypoint'; import { createRequest, writeResponse } from 'astro/app/node'; import { createServer } from 'node:http'; const app = createApp(); const server = createServer(async (req, res) => { const request = createRequest(req); const response = await app.render(request); await writeResponse(response, res); });
-
#15755
f9ee868Thanks @matthewp! - Adds a newsecurity.serverIslandBodySizeLimitconfiguration optionServer island POST endpoints now enforce a body size limit, similar to the existing
security.actionBodySizeLimitfor Actions. The new option defaults to1048576(1 MB) and can be configured independently.Requests exceeding the limit are rejected with a 413 response. You can customize the limit in your Astro config:
export default defineConfig({ security: { serverIslandBodySizeLimit: 2097152, // 2 MB }, });
-
#15529
a509941Thanks @florian-lefebvre! - Adds a new build-in font providernpmto access fonts installed as NPM packagesYou can now add web fonts specified in your
package.jsonthrough Astro's type-safe Fonts API. Thenpmfont provider allows you to add fonts either from locally installed packages innode_modulesor from a CDN.Set
fontProviders.npm()as your fonts provider along with the requirednameandcssVariablevalues, and addoptionsas needed:import { defineConfig, fontProviders } from 'astro/config'; export default defineConfig({ experimental: { fonts: [ { name: 'Roboto', provider: fontProviders.npm(), cssVariable: '--font-roboto', }, ], }, });
See the NPM font provider reference documentation for more details.
-
#15471
32b4302Thanks @ematipico! - Adds a new experimental flagqueuedRenderingto enable a queue-based rendering engineThe new engine is based on a two-pass process, where the first pass
traverses the tree of components, emits an ordered queue, and then the queue is rendered.The new engine does not use recursion, and comes with two customizable options.
Early benchmarks showed significant speed improvements and memory efficiency in big projects.
Queue-rendered based
The new engine can be enabled in your Astro config with
experimental.queuedRendering.enabledset totrue, and can be further customized with additional sub-features.// astro.config.mjs export default defineConfig({ experimental: { queuedRendering: { enabled: true, }, }, });
Pooling
With the new engine enabled, you now have the option to have a pool of nodes that can be saved and reused across page rendering. Node pooling has no effect when rendering pages on demand (SSR) because these rendering requests don't share memory. However, it can be very useful for performance when building static pages.
// astro.config.mjs export default defineConfig({ experimental: { queuedRendering: { enabled: true, poolSize: 2000, // store up to 2k nodes to be reused across renderers }, }, });
Content caching
The new engine additionally unlocks a new
contentCacheoption. This allows you to cache values of nodes during the rendering phase. This is currently a boolean feature with no further customization (e.g. size of cache) that uses sensible defaults for most large content collections:When disabled, the pool engine won't cache strings, but only types.
// astro.config.mjs export default defineConfig({ experimental: { queuedRendering: { enabled: true, contentCache: true, // enable re-use of node values }, }, });
For more information on enabling and using this feature in your project, see the experimental queued rendering docs for more details.
-
#14888
4cd3fe4Thanks @OliverSpeir! - Updatesastro add cloudflareto better setup types, by adding./worker-configuration.d.tsto tsconfig includes and agenerate-typesscript to package.json -
#15646
0dd9d00Thanks @delucis! - Removes redundantfetchpriorityattributes from the output of Astro’s<Image>componentPreviously, Astro would always include
fetchpriority="auto"on images not using thepriorityattribute.
However, this is the default value, so specifying it is redundant. This change omits the attribute by default. -
#15291
89b6cddThanks @florian-lefebvre! - Removes theexperimental.fontsflag and replaces it with a new configuration optionfonts- (v6 upgrade guidance) -
#15495
5b99e90Thanks @leekeh! - Adds a newmiddlewareModeadapter feature to replace the previousedgeMiddlewareoption.This feature only impacts adapter authors. If your adapter supports
edgeMiddleware, you should upgrade to the newmiddlewareModeoption to specify the middleware mode for your adapter as soon as possible. TheedgeMiddlewarefeature is deprecated and will be removed in a future major release.export default function createIntegration() { return { name: '@example/my-adapter', hooks: { 'astro:config:done': ({ setAdapter }) => { setAdapter({ name: '@example/my-adapter', serverEntrypoint: '@example/my-adapter/server.js', adapterFeatures: { - edgeMiddleware: true + middlewareMode: 'edge' } }); }, }, }; } -
#15694
66449c9Thanks @matthewp! - AddspreserveBuildClientDiroption to adapter featuresAdapters can now opt in to preserving the client/server directory structure for static builds by setting
preserveBuildClientDir: truein their adapter features. When enabled, static builds will output files tobuild.clientinstead of directly tooutDir.This is useful for adapters that require a consistent directory structure regardless of the build output type, such as deploying to platforms with specific file organization requirements.
// my-adapter/index.js export default function myAdapter() { return { name: 'my-adapter', hooks: { 'astro:config:done': ({ setAdapter }) => { setAdapter({ name: 'my-adapter', adapterFeatures: { buildOutput: 'static', preserveBuildClientDir: true, }, }); }, }, }; }
-
#15332
7c55f80Thanks @matthewp! - Adds afileURLoption torenderMarkdownin content loaders, enabling resolution of relative image paths. When provided, relative image paths in markdown will be resolved relative to the specified file URL and included inmetadata.localImagePaths.const loader = { name: 'my-loader', load: async ({ store, renderMarkdown }) => { const content = ` # My Post  `; // Provide a fileURL to resolve relative image paths const fileURL = new URL('./posts/my-post.md', import.meta.url); const rendered = await renderMarkdown(content, { fileURL }); // rendered.metadata.localImagePaths now contains the resolved image path }, };
-
#15407
aedbbd8Thanks @ematipico! - Adds support for responsive images whensecurity.cspis enabled, out of the box.Astro's implementation of responsive image styles has been updated to be compatible with a configured Content Security Policy.
Instead of, injecting style elements at runtime, Astro will now generate your styles at build time using a combination of
class=""anddata-*attributes. This means that your processed styles are loaded and hashed out of the box by Astro.If you were previously choosing between Astro's CSP feature and including responsive images on your site, you may now use them together.
-
#15543
d43841dThanks @Princesseuh! - Adds a newexperimental.rustCompilerflag to opt into the experimental Rust-based Astro compilerThis experimental compiler is faster, provides better error messages, and generally has better support for modern JavaScript, TypeScript, and CSS features.
After enabling in your Astro config, the
@astrojs/compiler-rspackage must also be installed into your project separately:import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { rustCompiler: true, }, });
This new compiler is still in early development and may exhibit some differences compared to the existing Go-based compiler. Notably, this compiler is generally more strict in regard to invalid HTML syntax and may throw errors in cases where the Go-based compiler would have been more lenient. For example, unclosed tags (e.g.
<p>My paragraph) will now result in errors.For more information about using this experimental feature in your project, especially regarding expected differences and limitations, please see the experimental Rust compiler reference docs. To give feedback on the compiler, or to keep up with its development, see the RFC for a new compiler for Astro for more information and discussion.
-
#15349
a257c4cThanks @ascorbic! - Passes collection name to live content loadersLive content collection loaders now receive the collection name as part of their parameters. This is helpful for loaders that manage multiple collections or need to differentiate behavior based on the collection being accessed.
export function storeLoader({ field, key }) { return { name: 'store-loader', loadCollection: async ({ filter, collection }) => { // ... }, loadEntry: async ({ filter, collection }) => { // ... }, }; }
-
#15006
f361730Thanks @florian-lefebvre! - Adds new session driver object shapeFor greater flexibility and improved consistency with other Astro code, session drivers are now specified as an object:
-import { defineConfig } from 'astro/config' +import { defineConfig, sessionDrivers } from 'astro/config' export default defineConfig({ session: { - driver: 'redis', - options: { - url: process.env.REDIS_URL - }, + driver: sessionDrivers.redis({ + url: process.env.REDIS_URL + }), } })
Specifying the session driver as a string has been deprecated, but will continue to work until this feature is removed completely in a future major version. The object shape is the current recommended and documented way to configure a session driver.
-
#15291
89b6cddThanks @florian-lefebvre! - Adds a new Fonts API to provide first-party support for adding custom fonts in Astro.This feature allows you to use fonts from both your file system and several built-in supported providers (e.g. Google, Fontsource, Bunny) through a unified API. Keep your site performant thanks to sensible defaults and automatic optimizations including preloading and fallback font generation.
To enable this feature, configure
fontswith one or more fonts:import { defineConfig, fontProviders } from 'astro/config'; export default defineConfig({ fonts: [ { provider: fontProviders.fontsource(), name: 'Roboto', cssVariable: '--font-roboto', }, ], });
Import and include the
<Font />component with the requiredcssVariableproperty in the head of your page, usually in a dedicatedHead.astrocomponent or in a layout component directly:--- // src/layouts/Layout.astro import { Font } from 'astro:assets'; --- <html> <head> <Font cssVariable="--font-roboto" preload /> </head> <body> <slot /> </body> </html>
In any page rendered with that layout, including the layout component itself, you can now define styles with your font's
cssVariableto apply your custom font.In the following example, the
<h1>heading will have the custom font applied, while the paragraph<p>will not.--- // src/pages/example.astro import Layout from '../layouts/Layout.astro'; --- <Layout> <h1>In a galaxy far, far away...</h1> <p>Custom fonts make my headings much cooler!</p> <style> h1 { font-family: var('--font-roboto'); } </style> </Layout>
Visit the updated fonts guide to learn more about adding custom fonts to your project.
-
#14550
9c282b5Thanks @ascorbic! - Adds support for live content collectionsLive content collections are a new type of content collection that fetch their data at runtime rather than build time. This allows you to access frequently updated data from CMSs, APIs, databases, or other sources using a unified API, without needing to rebuild your site when the data changes.
Live collections vs build-time collections
In Astro 5.0, the content layer API added support for adding diverse content sources to content collections. You can create loaders that fetch data from any source at build time, and then access it inside a page via
getEntry()andgetCollection(). The data is cached between builds, giving fast access and updates.However, there was no method for updating the data store between builds, meaning any updates to the data needed a full site deploy, even if the pages are rendered on demand. This meant that content collections were not suitable for pages that update frequently. Instead, these pages tended to access the APIs directly in the frontmatter. This worked, but it led to a lot of boilerplate, and meant users didn't benefit from the simple, unified API that content loaders offer. In most cases, users tended to individually create loader libraries shared between pages.
Live content collections (introduced experimentally in Astro 5.10) solve this problem by allowing you to create loaders that fetch data at runtime, rather than build time. This means that the data is always up-to-date, without needing to rebuild the site.
How to use
To use live collections, create a new
src/live.config.tsfile (alongside yoursrc/content.config.tsif you have one) to define your live collections with a live content loader using the newdefineLiveCollection()function from theastro:contentmodule:import { defineLiveCollection } from 'astro:content'; import { storeLoader } from '@mystore/astro-loader'; const products = defineLiveCollection({ loader: storeLoader({ apiKey: process.env.STORE_API_KEY, endpoint: 'https://api.mystore.com/v1', }), }); export const collections = { products };
You can then use the
getLiveCollection()andgetLiveEntry()functions to access your live data, along with error handling (since anything can happen when requesting live data!):--- import { getLiveCollection, getLiveEntry, render } from 'astro:content'; // Get all products const { entries: allProducts, error } = await getLiveCollection('products'); if (error) { // Handle error appropriately console.error(error.message); } // Get products with a filter (if supported by your loader) const { entries: electronics } = await getLiveCollection('products', { category: 'electronics' }); // Get a single product by ID (string syntax) const { entry: product, error: productError } = await getLiveEntry('products', Astro.params.id); if (productError) { return Astro.redirect('/404'); } // Get a single product with a custom query (if supported by your loader) using a filter object const { entry: productBySlug } = await getLiveEntry('products', { slug: Astro.params.slug }); const { Content } = await render(product); --- <h1>{product.data.title}</h1> <Content />
Upgrading from experimental live collections
If you were using the experimental feature, you must remove the
experimental.liveContentCollectionsflag from yourastro.config.*file:export default defineConfig({ // ... - experimental: { - liveContentCollections: true, - }, });No other changes to your project code are required as long as you have been keeping up with Astro 5.x patch releases, which contained breaking changes to this experimental feature. If you experience problems with your live collections after upgrading to Astro v6 and removing this flag, please review the Astro CHANGELOG from 5.10.2 onwards for any potential updates you might have missed, or follow the current v6 documentation for live collections.
-
#15548
5b8f573Thanks @florian-lefebvre! - Adds a new optionalembeddedLangsprop to the<Code />component to support languages beyond the primarylangThis allows, for example, highlighting
.vuefiles with a<script setup lang="tsx">block correctly:--- import { Code } from 'astro:components'; const code = ` <script setup lang="tsx"> const Text = ({ text }: { text: string }) => <div>{text}</div>; </script> <template> <Text text="hello world" /> </template>`; --- <Code {code} lang="vue" embeddedLangs={['tsx']} />
See the
<Code />component documentation for more details. -
#14826
170f64eThanks @florian-lefebvre! - Adds an optionprerenderConflictBehaviorto configure the behavior of conflicting prerendered routesBy default, Astro warns you during the build about any conflicts between multiple dynamic routes that can result in the same output path. For example
/blog/[slug]and/blog/[...all]both could try to prerender the/blog/post-1path. In such cases, Astro renders only the highest priority route for the conflicting path. This allows your site to build successfully, although you may discover that some pages are rendered by unexpected routes.With the new
prerenderConflictBehaviorconfiguration option, you can now configure this further:prerenderConflictBehavior: 'error'fails the buildprerenderConflictBehavior: 'warn'(default) logs a warning and the highest-priority route winsprerenderConflictBehavior: 'ignore'silently picks the highest-priority route when conflicts occur
import { defineConfig } from 'astro/config'; export default defineConfig({ + prerenderConflictBehavior: 'error', }); -
#14946
95c40f7Thanks @ematipico! - Removes theexperimental.cspflag and replaces it with a new configuration optionsecurity.csp- (v6 upgrade guidance) -
#15579
08437d5Thanks @ascorbic! - Adds two new experimental flags for a Route Caching API and further configuration-level Route Rules for controlling SSR response caching.Route caching gives you a platform-agnostic way to cache server-rendered responses, based on web standard cache headers. You set caching directives in your routes using
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 adapter. You can also define cache rules for routes declaratively in your config usingexperimental.routeRules, without modifying route code.This feature requires on-demand rendering. Prerendered pages are already static and do not use route caching.
Getting started
Enable the feature by configuring
experimental.cachewith a cache provider in your Astro config:// astro.config.mjs import { defineConfig } from 'astro/config'; import node from '@astrojs/node'; import { memoryCache } from 'astro/config'; export default defineConfig({ adapter: node({ mode: 'standalone' }), experimental: { cache: { provider: memoryCache(), }, }, });
Using
Astro.cacheandcontext.cacheIn
.astropages, useAstro.cache.set()to control caching:--- // src/pages/index.astro Astro.cache.set({ maxAge: 120, // Cache for 2 minutes swr: 60, // Serve stale for 1 minute while revalidating tags: ['home'], // Tag for targeted invalidation }); --- <html><body>Cached page</body></html>
In API routes and middleware, use
context.cache:// src/pages/api/data.ts export function GET(context) { context.cache.set({ maxAge: 300, tags: ['api', 'data'], }); return Response.json({ ok: true }); }
Cache options
cache.set()accepts the following options:maxAge(number): Time in seconds the response is considered fresh.swr(number): Stale-while-revalidate window in seconds. During this window, stale content is served while a fresh response is generated in the background.tags(string[]): Cache tags for targeted invalidation. Tags accumulate across multipleset()calls within a request.lastModified(Date): When multipleset()calls providelastModified, the most recent date wins.etag(string): Entity tag for conditional requests.
Call
cache.set(false)to explicitly opt out of caching for a request.Multiple calls to
cache.set()within a single request are merged: scalar values use last-write-wins,lastModifieduses most-recent-wins, and tags accumulate.Invalidation
Purge cached entries by tag or path using
cache.invalidate():// Invalidate all entries tagged 'data' await context.cache.invalidate({ tags: ['data'] }); // Invalidate a specific path await context.cache.invalidate({ path: '/api/data' });
Config-level route rules
Use
experimental.routeRulesto set default cache options for routes without modifying route code. Supports Nitro-style shortcuts for ergonomic configuration:import { memoryCache } from 'astro/config'; export default defineConfig({ experimental: { cache: { provider: memoryCache(), }, routeRules: { // Shortcut form (Nitro-style) '/api/*': { swr: 600 }, // Full form with nested cache '/products/*': { cache: { maxAge: 3600, tags: ['products'] } }, }, }, });
Route patterns support static paths, dynamic parameters (
[slug]), and rest parameters ([...path]). Per-routecache.set()calls merge with (and can override) the config-level defaults.You can also read the current cache state via
cache.options:const { maxAge, swr, tags } = context.cache.options;
Cache providers
Cache behavior is determined by the configured cache provider. There are two types:
- CDN providers set response headers (e.g.
CDN-Cache-Control,Cache-Tag) and let the CDN handle caching. Astro strips these headers before sending the response to the client. - Runtime providers implement
onRequest()to intercept and cache responses in-process, adding anX-Astro-Cacheheader (HIT/MISS/STALE) for observability.
Built-in memory cache provider
Astro includes a built-in, in-memory LRU runtime cache provider. Import
memoryCachefromastro/configto configure it.Features:
- In-memory LRU cache with configurable max entries (default: 1000)
- Stale-while-revalidate support
- Tag-based and path-based invalidation
X-Astro-Cacheresponse header:HIT,MISS, orSTALE- Query parameter sorting for better hit rates (
?b=2&a=1and?a=1&b=2hit the same entry) - Common tracking parameters (
utm_*,fbclid,gclid, etc.) excluded from cache keys by default Varyheader support — responses that setVaryautomatically get separate cache entries per variant- Configurable query parameter filtering via
query.exclude(glob patterns) andquery.include(allowlist)
For more information on enabling and using this feature in your project, see the Experimental Route Caching docs.
For a complete overview and to give feedback on this experimental API, see the Route Caching RFC. -
#15483
7be3308Thanks @florian-lefebvre! - Addsstreamingoption to thecreateApp()function in the Adapter API, mirroring the same functionality available when creating a newAppinstanceAn adapter's
createApp()function now acceptsstreaming(defaults totrue) as an option. HTML streaming breaks a document into chunks to send over the network and render on the page in order. This normally results in visitors seeing your HTML as fast as possible but factors such as network conditions and waiting for data fetches can block page rendering.HTML streaming helps with performance and generally provides a better visitor experience. In most cases, disabling streaming is not recommended.
However, when you need to disable HTML streaming (e.g. your host only supports non-streamed HTML caching at the CDN level), you can opt out of the default behavior by passing
streaming: falsetocreateApp():import { createApp } from 'astro/app/entrypoint'; const app = createApp({ streaming: false });
See more about the
createApp()function in the Adapter API reference.
Patch Changes
-
#15423
c5ea720Thanks @matthewp! - Improves error message when a dynamic redirect destination does not match any existing route.Previously, configuring a redirect like
/categories/[category]→/categories/[category]/1in static output mode would fail with a misleading "getStaticPaths required" error. Now, Astro detects this early and provides a clear error explaining that the destination does not match any existing route. -
#15167
4fca170Thanks @HiDeoo! - Fixes an issue where CSS from unused components, when using content collections, could be incorrectly included between page navigations in development mode. -
#15565
30cd6dbThanks @ematipico! - Fixes an issue where the use of the Astro internal logger couldn't work with Cloudflare Vite plugin. -
#15508
2c6484aThanks @KTibow! - Fixes behavior when shortcuts are used before server is ready -
#15125
6feb0d7Thanks @florian-lefebvre! - Improves JSDoc annotations forAstroGlobal,AstroSharedContextandAPIContexttypes -
#15712
7ac43c7Thanks @florian-lefebvre! - Improvesastro infoby supporting more operating systems when copying the information to the clipboard. -
#15054
22db567Thanks @matthewp! - Improves zod union type error messages to show expected vs received types instead of generic "Invalid input" -
#15064
caf5621Thanks @ascorbic! - Fixes a bug that caused incorrect warnings of duplicate entries to be logged by the glob loader when editing a file -
#15801
01db4f3Thanks @ascorbic! - Improves the experience of working with experimental route caching in dev mode by replacing some errors with silent no-ops, avoiding the need to write conditional logic to handle different modesAdds a
cache.enabledproperty toCacheLikeso libraries can check whether caching is active without try/catch. -
#15562
e14a51dThanks @florian-lefebvre! - Removes types for theastro:ssr-manifestmodule, which was removed -
#15542
9760404Thanks @rururux! - Improves rendering by preservinghidden="until-found"value in attributes -
#15044
7cac71bThanks @florian-lefebvre! - Removes an exposed internal API of the preview server -
#15573
d789452Thanks @matthewp! - Clear the route cache on content changes so slug pages reflect updated data during dev. -
#15308
89cbcfaThanks @matthewp! - Fixes styles missing in dev for prerendered pages when using Cloudflare adapter -
#15435
957b9feThanks @rururux! - Improves compatibility of the built-in image endpoint with runtimes that don't support CJS dependencies correctly -
#15640
4c1a801Thanks @ematipico! - Reverts the support of Shiki with CSP. Unfortunately, after exhaustive tests, the highlighter can't be supported to cover all cases.Adds a warning when both Content Security Policy (CSP) and Shiki syntax highlighting are enabled, as they are incompatible due to Shiki's use of inline styles
-
#15415
cc3c46cThanks @ematipico! - Fixes an issue where CSP headers were incorrectly injected in the development server. -
#15412
c546563Thanks @florian-lefebvre! - Improves theAstroAdaptertype and how legacy adapters are handled -
#15322
18e0980Thanks @matthewp! - Prevents missing CSS when using both SSR and prerendered routes -
#15760
f49a27fThanks @ematipico! - Fixed an issue where queued rendering wasn't correctly re-using the saved nodes. -
#15277
cb99214Thanks @ematipico! - Fixes an issue where the functioncreateShikiHighlighterwould always create a new Shiki highlighter instance. Now the function returns a cached version of the highlighter based on the Shiki options. This should improve the performance for sites that heavily rely on Shiki and code in their pages. -
#15394
5520f89Thanks @florian-lefebvre! - Fixes a case where using the Fonts API withnetlify devwouldn't work because of query parameters -
#15605
f6473fdThanks @ascorbic! - Improves.astrocomponent SSR rendering performance by up to 2x.This includes several optimizations to the way that Astro generates and renders components on the server. These are mostly micro-optimizations, but they add up to a significant improvement in performance. Most pages will benefit, but pages with many components will see the biggest improvement, as will pages with lots of strings (e.g. text-heavy pages with lots of HTML elements).
-
#15721
e6e146cThanks @matthewp! - Fixes action route handling to return 404 for requests to prototype method names likeconstructorortoStringused as action paths -
#15497
a93c81dThanks @matthewp! - Fix dev reloads for content collection Markdown updates under Vite 7. -
#15780
e0ac125Thanks @ematipico! - Preventsvite.envPrefixmisconfiguration from exposingaccess: "secret"environment variables in client-side bundles. Astro now throws a clear error at startup if anyvite.envPrefixentry matches a variable declared withaccess: "secret"inenv.schema.For example, the following configuration will throw an error for
API_SECRETbecause it's defined assecretits name matches['PUBLIC_', 'API_']defined inenv.schema:// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ env: { schema: { API_SECRET: envField.string({ context: 'server', access: 'secret', optional: true }), API_URL: envField.string({ context: 'server', access: 'public', optional: true }), }, }, vite: { envPrefix: ['PUBLIC_', 'API_'], }, });
-
#15514
999a7ddThanks @veeceey! - Fixes font flash (FOUT) during ClientRouter navigation by preserving inline<style>elements and font preload links in the head during page transitions.Previously,
@font-facedeclarations from the<Font>component were removed and re-inserted on every client-side navigation, causing the browser to re-evaluate them. -
#15560
170ed89Thanks @z0mt3c! - Fix X-Forwarded-Proto validation when allowedDomains includes both protocol and hostname fields. The protocol check no longer fails due to hostname mismatch against the hardcoded test URL. -
#15704
862d77bThanks @umutkeltek! - Fixes i18n fallback middleware intercepting non-404 responsesThe fallback middleware was triggering for all responses with status >= 300, including legitimate 3xx redirects, 403 forbidden, and 5xx server errors. This broke auth flows and form submissions on localized server routes. The fallback now correctly only triggers for 404 (page not found) responses.
-
#15661
7150a2eThanks @ematipico! - Fixes a build error when generating projects with 100k+ static routes. -
#15580
a92333cThanks @ematipico! - Fixes a build error when generating projects with a large number of static routes -
#15176
9265546Thanks @matthewp! - Fixes hydration for framework components inside MDX when usingAstro.slots.render()Previously, when multiple framework components with
client:*directives were passed as named slots to an Astro component in MDX, only the first slot would hydrate correctly. Subsequent slots would render their HTML but fail to include the necessary hydration scripts. -
#15506
074901fThanks @ascorbic! - Fixes a race condition where concurrent requests to dynamic routes in the dev server could produce incorrect params. -
#15444
10b0422Thanks @AhmadYasser1! - FixesAstro.rewritereturning 404 when rewriting to a URL with non-ASCII charactersWhen rewriting to a path containing non-ASCII characters (e.g.,
/redirected/héllo), the route lookup compared encodeddistURLhrefs against decoded pathnames, causing the comparison to always fail and resulting in a 404. This fix compares against the encoded pathname instead. -
#15728
12ca621Thanks @SvetimFM! - Improves internal state retention for persisted elements during view transitions, especially avoiding WebGL context loss in Safari and resets of CSS transitions and iframes in modern Chromium and Firefox browsers -
#15279
8983f17Thanks @ematipico! - Fixes an issue where the dev server would serve files like/README.mdfrom the project root when they shouldn't be accessible. A new route guard middleware now blocks direct URL access to files that exist outside ofsrcDirandpublicDir, returning a 404 instead. -
#15703
829182bThanks @matthewp! - Fixes server islands returning a 500 error in dev mode for adapters that do not setadapterFeatures.buildOutput(e.g.@astrojs/netlify) -
#15749
573d188Thanks @ascorbic! - Fixes a bug that causedsession.regenerate()to silently lose session dataPreviously, regenerated session data was not saved under the new session ID unless
set()was also called. -
#15549
be1c87eThanks @0xRozier! - Fixes an issue where original (unoptimized) images from prerendered pages could be kept in the build output during SSR builds. -
#15454
b47a4e1Thanks @Fryuni! - Fixes a race condition in the content layer which could result in dropped content collection entries. -
#15685
1a323e5Thanks @jcayzac! - Fix regression where SVG images in content collectionimage()fields could not be rendered as inline components. This behavior is now restored while preserving the TLA deadlock fix. -
#15603
5bc2b2cThanks @0xRozier! - Fixes a deadlock that occurred when using SVG images in content collections -
#15385
9e16d63Thanks @matthewp! - Fixes content layer loaders that use dynamic importsContent collection loaders can now use
await import()andimport.meta.glob()to dynamically import modules during build. Previously, these would fail with "Vite module runner has been closed." -
#15565
30cd6dbThanks @ematipico! - Fixes an issue where the use of theCodecomponent would result in an unexpected error. -
#15125
6feb0d7Thanks @florian-lefebvre! - Fixes remote imagesEtagheader handling by disabling internal cache -
#15317
7e1e35aThanks @matthewp! - Fixes?rawimports failing when used in both SSR and prerendered routes -
#15809
94b4a46Thanks @Princesseuh! - Fixesfitdefaults not being applied unlesslayoutwas also specified -
#15563
e959698Thanks @ematipico! - Fixes an issue where warnings would be logged during the build using one of the official adapters -
#15121
06261e0Thanks @ematipico! - Fixes a bug where the Astro, with the Cloudflare integration, couldn't correctly serve certain routes in the development server. -
#15585
98ea30cThanks @matthewp! - Add a default body size limit for server actions to prevent oversized requests from exhausting memory. -
#15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22 -
#15778
4ebc1e3Thanks @ematipico! - Fixes an issue where the computedclientAddresswas incorrect in cases of a Request header with multiple values. TheclientAddressis now also validated to contain only characters valid in IP addresses, rejecting injection payloads. -
#15565
30cd6dbThanks @ematipico! - Fixes an issue where the new Astro v6 development server didn't log anything when navigating the pages. -
#15024
22c48baThanks @florian-lefebvre! - Fixes a case where JSON schema generation would fail for unrepresentable types -
#15669
d5a888bThanks @florian-lefebvre! - Removes thecssescdependencyThis CommonJS dependency could sometimes cause errors because Astro is ESM-only. It is now replaced with a built-in ESM-friendly implementation.
-
#15740
c5016fcThanks @matthewp! - Removes an escape hatch that skipped attribute escaping for URL values containing&, ensuring all dynamic attribute values are consistently escaped -
#15756
b6c64d1Thanks @matthewp! - Hardens the dev server by validating Sec-Fetch metadata headers to restrict cross-origin subresource requests -
#15744
fabb710Thanks @matthewp! - Fixes cookie handling during error page rendering to ensure cookies set by middleware are consistently included in the response -
#15776
e9a9cc6Thanks @matthewp! - Hardens error page response merging to ensure framing headers from the original response are not carried over to the rendered error page -
#15759
39ff2a5Thanks @matthewp! - Adds a newbodySizeLimitoption to the@astrojs/nodeadapterYou can now configure a maximum allowed request body size for your Node.js standalone server. The default limit is 1 GB. Set the value in bytes, or pass
0to disable the limit entirely:import node from '@astrojs/node'; import { defineConfig } from 'astro/config'; export default defineConfig({ adapter: node({ mode: 'standalone', bodySizeLimit: 1024 * 1024 * 100, // 100 MB }), });
-
#15777
02e24d9Thanks @matthewp! - Fixes CSRF origin check mismatch by passing the actual server listening port tocreateRequest, ensuring the constructed URL origin includes the correct port (e.g.,http://localhost:4321instead ofhttp://localhost). Also restrictsX-Forwarded-Prototo only be trusted whenallowedDomainsis configured. -
#15742
9d9699cThanks @matthewp! - HardensclientAddressresolution to respectsecurity.allowedDomainsforX-Forwarded-For, consistent with the existing handling ofX-Forwarded-Host,X-Forwarded-Proto, andX-Forwarded-Port. TheX-Forwarded-Forheader is now only used to determineAstro.clientAddresswhen the request's host has been validated against anallowedDomainsentry. Without a matching domain,clientAddressfalls back to the socket's remote address. -
#15768
6328f1aThanks @matthewp! - Hardens internal cookie parsing to use a null-prototype object consistently for the fallback path, aligning with how the cookie library handles parsed values -
#15125
6feb0d7Thanks @florian-lefebvre! - Fixes images not working in development when using setups with port forwarding -
#15811
2ba0db5Thanks @ematipico! - Fixes integration-injected scripts (e.g. Alpine.js viainjectScript()) not being loaded in the dev server when using non-runnable environment adapters like@astrojs/cloudflare. -
#15208
8dbdd8eThanks @matthewp! - Makessession.driveroptional in config schema, allowing adapters to provide default driversAdapters like Cloudflare, Netlify, and Node provide default session drivers, so users can now configure session options (like
ttl) without explicitly specifying a driver. -
#15260
abca1ebThanks @ematipico! - Fixes an issue where adding new pages weren't correctly shown when using the development server. -
#15591
1ed07bfThanks @renovate! - Upgradesdevalueto v5.6.3 -
#15137
2f70bf1Thanks @matthewp! - Addslegacy.collectionsBackwardsCompatflag that restores v5 backwards compatibility behavior for legacy content collections - (v6 upgrade guidance)When enabled, this flag allows:
- Collections defined without loaders (automatically get glob loader)
- Collections with
type: 'content'ortype: 'data' - Config files located at
src/content/config.ts(legacy location) - Legacy entry API:
entry.slugandentry.render()methods - Path-based entry IDs instead of slug-based IDs
// astro.config.mjs export default defineConfig({ legacy: { collectionsBackwardsCompat: true, }, });
This is a temporary migration helper for v6 upgrades. Migrate collections to the Content Layer API, then disable this flag.
-
#15550
58df907Thanks @florian-lefebvre! - Improves the JSDoc annotations for theAstroAdaptertype -
#15696
a9fd221Thanks @Princesseuh! - Fixes images not working in MDX when using the Cloudflare adapter in certain cases -
#15386
a0234a3Thanks @OliverSpeir! - Updatesastro add cloudflareto use the latest validcompatibility_datein the wrangler config, if available -
#15036
f125a73Thanks @florian-lefebvre! - Fixes certain aliases not working when using images in JSON files with the content layer -
#15693
4db2089Thanks @ArmandPhilippot! - Fixes the links to Astro Docs to match the v6 structure. -
#15093
8d5f783Thanks @matthewp! - Reduces build memory by filtering routes per environment so each only builds the pages it needs -
#15268
54e5cc4Thanks @rururux! - fix: avoid creating unused images during build in Picture component -
#15757
631aaedThanks @matthewp! - Hardens URL pathname normalization to consistently handle backslash characters after decoding, ensuring middleware and router see the same canonical pathname -
#15337
7ff7b11Thanks @ematipico! - Fixes a bug where the development server couldn't serve newly created new pages while the development server is running. -
#15535
dfe2e22Thanks @florian-lefebvre! - Fixes the types ofcreateApp()exported fromastro/app/entrypoint -
#15073
2a39c32Thanks @ascorbic! - Don't log an error when there is no content config -
#15717
4000aaaThanks @matthewp! - Ensures that URLs with multiple leading slashes (e.g.//admin) are normalized to a single slash before reaching middleware, so that pathname checks likecontext.url.pathname.startsWith('/admin')work consistently regardless of the request URL format -
#15450
50c9129Thanks @florian-lefebvre! - Fixes a case wherebuild.serverEntrywould not be respected when using the new Adapter API -
#15331
4592be5Thanks @matthewp! - Fixes an issue where API routes would overwrite public files during build. Public files now correctly take priority over generated routes in both dev and build modes. -
#15414
faedcc4Thanks @sapphi-red! - Fixes a bug where some requests to the dev server didn't start with the leading/. -
#15419
a18d727Thanks @ematipico! - Fixes an issue where theaddcommand could accept any arbitrary value, leading the possible command injections. Nowaddand--addaccepts
values that are only acceptable npmjs.org names. -
#15507
07f6610Thanks @matthewp! - Avoid bundling SSR renderers when only API endpoints are dynamic -
#15125
6feb0d7Thanks @florian-lefebvre! - Reduces Astro’s install size by around 8 MB -
#15752
918d394Thanks @ascorbic! - Fixes an issue where a session ID from a cookie with no matching server-side data was accepted as-is. The session now generates a new ID when the cookie value has no corresponding storage entry. -
#15743
3b4252aThanks @matthewp! - Hardens config-based redirects with catch-all parameters to prevent producing protocol-relative URLs (e.g.//example.com) in theLocationheader -
#15761
8939751Thanks @ematipico! - Fixes an issue where it wasn't possible to setexperimental.queuedRendering.poolSizeto0. -
#15633
9d293c2Thanks @jwoyo! - Fixes a case where<script>tags from components passed as slots to server islands were not included in the response -
#15491
6c60b05Thanks @matthewp! - Fixes a case where settingvite.server.allowedHosts: truewas turned into an invalid array -
#15459
a4406b4Thanks @florian-lefebvre! - Fixes a case wherecontext.cspwas logging warnings in development that should be logged in production only -
#15125
6feb0d7Thanks @florian-lefebvre! - Enables the ClientRouter to preserve the original hash part of the target URL during server side redirects. -
#15133
53b125bThanks @HiDeoo! - Fixes an issue where adding or removing<style>tags in Astro components would not visually update styles during development without restarting the development server. -
#15362
dbf71c0Thanks @jcayzac! - FixesinferSizebeing kept in the HTML attributes of the emitted<img>when that option is used with an image that is not remote. -
#15421
bf62b6fThanks @Princesseuh! - Removes unintended logging -
#15732
2ce9e74Thanks @florian-lefebvre! - Updates docs links to point to the stable release -
#15718
14f37b8Thanks @florian-lefebvre! - Fixes a case where internal headers may leak when rendering error pages -
#15214
6bab8c9Thanks @ematipico! - Fixes an issue where the internal performance timers weren't correctly updated to reflect new build pipeline. -
#15112
5751d2bThanks @HiDeoo! - Fixes a Windows-specific build issue when importing an Astro component with a<script>tag using an import alias. -
#15345
840fbf9Thanks @matthewp! - Fixes an issue where.sqlfiles (and other non-asset module types) were incorrectly moved to the client assets folder during SSR builds, causing "no such module" errors at runtime.The
ssrMoveAssetsfunction now reads the Vite manifest to determine which files are actual client assets (CSS and static assets like images) and only moves those, leaving server-side module files in place. -
#15259
8670a69Thanks @ematipico! - Fixes an issue where styles weren't correctly reloaded when using the@astrojs/cloudflareadapter. -
#15473
d653b86Thanks @matthewp! - Improves Host header handling for SSR deployments behind proxies -
#15047
5580372Thanks @matthewp! - Fixes wrangler config template inastro add cloudflareto use correct entrypoint and compatibility date -
#15586
35bc814Thanks @matthewp! - Fixes an issue where allowlists were not being enforced when handling remote images -
#15422
68770efThanks @matthewp! - Upgrade to @astrojs/compiler@3.0.0-beta -
#15205
12adc55Thanks @martrapp! - Fixes an issue where theastro:page-loadevent did not fire on initial page loads. -
#15125
6feb0d7Thanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyChanges the font format downloaded by default when using the experimental Fonts API. Additionally, adds a new
formatsconfiguration option to specify which font formats to download.Previously, Astro was opinionated about which font sources would be kept for usage, mainly keeping
woff2andwofffiles.You can now specify what font formats should be downloaded (if available). Only
woff2files are downloaded by default.What should I do?
If you were previously relying on Astro downloading the
woffformat, you will now need to specify this explicitly with the newformatsconfiguration option. Additionally, you may also specify any additional file formats to download if available:// astro.config.mjs import { defineConfig, fontProviders } from 'astro/config' export default defineConfig({ experimental: { fonts: [{ name: 'Roboto', cssVariable: '--font-roboto', provider: fontProviders.google(), + formats: ['woff2', 'woff', 'otf'] }] } }) -
#15179
8c8aee6Thanks @HiDeoo! - Fixes an issue when importing using an import alias a file with a name matching a directory name. -
#15036
f125a73Thanks @florian-lefebvre! - Fixes a vite warning log during builds when using npm -
#15269
6f82aaeThanks @ematipico! - Fixes a regression wherebuild.serverEntrystopped working as expected. -
#15053
674b63fThanks @matthewp! - Excludesastro:*andvirtual:astro:*from client optimizeDeps in core. Needed for prefetch users since virtual modules are now in the dependency graph. -
#15764
44daecfThanks @matthewp! - Fixes form actions incorrectly auto-executing during error page rendering. When an error page (e.g. 404) is rendered, form actions from the original request are no longer executed, since the full request handling pipeline is not active. -
#15788
a91da9fThanks @florian-lefebvre! - Reverts changes made to TSConfig templates -
#15657
cb625b6Thanks @qzio! - Adds a newsecurity.actionBodySizeLimitoption to configure the maximum size of Astro Actions request bodies.This lets you increase the default 1 MB limit when your actions need to accept larger payloads. For example, actions that handle file uploads or large JSON payloads can now opt in to a higher limit.
If you do not set this option, Astro continues to enforce the 1 MB default to help prevent abuse.
// astro.config.mjs export default defineConfig({ security: { actionBodySizeLimit: 10 * 1024 * 1024, // set to 10 MB }, });
-
#15176
9265546Thanks @matthewp! - Fixes scripts in components not rendering when a sibling<Fragment slot="...">exists but is unused -
Updated dependencies [
bbb5811,4ebc1e3,cb99214,80f0225,727b0a2,4e7f3e8,a164c77,1fa4177,7c55f80,cf6ea6b,6f19ecc,f94d3c5,a18d727,240c317,745e632]:- @astrojs/markdown-remark@7.0.0
- @astrojs/internal-helpers@0.8.0
Minor Changes
- #15778
4ebc1e3Thanks @ematipico! - Added a new entry point called/request, which exposes utilities to work with theRequesttype:getFirstForwardedValue: retrieves the first value of a multi-value header.isValidIpAddress: checks whether a string contains only characters valid in IPv4/IPv6 addresses.getValidatedIpFromHeader: extracts the first value from a header and validates it as an IP address.getClientIpAddress: retrieves and validates the first IP from thex-forwarded-forheader.
Patch Changes
Patch Changes
-
#15781
2de969dThanks @ematipico! - Adds a newclientAddressoption to thecreateContext()functionProviding this value gives adapter and middleware authors explicit control over the client IP address. When not provided, accessing
clientAddressthrows an error consistent with other contexts where it is not set by the adapter.Additionally, both of the official Netlify and Vercel adapters have been updated to provide this information in their edge middleware.
import { createContext } from 'astro/middleware'; createContext({ clientAddress: context.headers.get('x-real-ip'), });
-
#15778
4ebc1e3Thanks @ematipico! - Fixes an issue where the computedclientAddresswas incorrect in cases of a Request header with multiple values. TheclientAddressis now also validated to contain only characters valid in IP addresses, rejecting injection payloads. -
Updated dependencies [
4ebc1e3,4e7f3e8]:- @astrojs/internal-helpers@0.8.0-beta.3
Patch Changes
-
#15781
2de969dThanks @ematipico! - Adds a newclientAddressoption to thecreateContext()functionProviding this value gives adapter and middleware authors explicit control over the client IP address. When not provided, accessing
clientAddressthrows an error consistent with other contexts where it is not set by the adapter.Additionally, both of the official Netlify and Vercel adapters have been updated to provide this information in their edge middleware.
import { createContext } from 'astro/middleware'; createContext({ clientAddress: context.headers.get('x-real-ip'), });
-
Updated dependencies [
4ebc1e3,4e7f3e8]:- @astrojs/internal-helpers@0.8.0-beta.3
- @astrojs/underscore-redirects@1.0.0
Minor Changes
-
#15759
39ff2a5Thanks @matthewp! - Adds a newbodySizeLimitoption to the@astrojs/nodeadapterYou can now configure a maximum allowed request body size for your Node.js standalone server. The default limit is 1 GB. Set the value in bytes, or pass
0to disable the limit entirely:import node from '@astrojs/node'; import { defineConfig } from 'astro/config'; export default defineConfig({ adapter: node({ mode: 'standalone', bodySizeLimit: 1024 * 1024 * 100, // 100 MB }), });
Patch Changes
-
#15777
02e24d9Thanks @matthewp! - Fixes CSRF origin check mismatch by passing the actual server listening port tocreateRequest, ensuring the constructed URL origin includes the correct port (e.g.,http://localhost:4321instead ofhttp://localhost). Also restrictsX-Forwarded-Prototo only be trusted whenallowedDomainsis configured. -
#15763
1567e8cThanks @matthewp! - Normalizes static file paths before evaluating dotfile access rules for improved consistency -
Updated dependencies [
4ebc1e3,4e7f3e8]:- @astrojs/internal-helpers@0.8.0-beta.3
Patch Changes
- Updated dependencies []:
- @astrojs/markdown-remark@7.0.0-beta.11
Patch Changes
- Updated dependencies [
745e632]:- @astrojs/internal-helpers@0.8.0-beta.2
Patch Changes
- Updated dependencies [
745e632]:- @astrojs/internal-helpers@0.8.0-beta.2
- @astrojs/markdown-remark@7.0.0-beta.10
Patch Changes
- Updated dependencies [
745e632]:- @astrojs/internal-helpers@0.8.0-beta.2
- @astrojs/underscore-redirects@1.0.0
Patch Changes
- Updated dependencies []:
- @astrojs/markdown-remark@7.0.0-beta.10
Patch Changes
- Updated dependencies [
745e632]:- @astrojs/internal-helpers@0.8.0-beta.2
Patch Changes
- Updated dependencies [
745e632]:- @astrojs/internal-helpers@0.8.0-beta.2
Minor Changes
-
#15495
5b99e90Thanks @leekeh! - Adds newmiddlewareModeadapter feature and deprecatesedgeMiddlewareoptionThe
edgeMiddlewareoption is now deprecated and will be removed in a future release, so users should transition to using the newmiddlewareModefeature as soon as possible.export default defineConfig({ adapter: vercel({ - edgeMiddleware: true + middlewareMode: 'edge' }) })
Patch Changes
-
#15419
a18d727Thanks @ematipico! - Fixes an issue where--addcould accept any kind of string, leading to different errors. Now--addaccepts only values of valid integrations and adapters. -
#15419
a18d727Thanks @ematipico! - Fixes an issue where theaddcommand could accept any arbitrary value, leading the possible command injections. Nowaddand--addaccepts
values that are only acceptable npmjs.org names.
Patch Changes
-
#15344
9d87f77Thanks @matthewp! - Fixes a hang that could occur when the npm registry is slow or unresponsive by adding a 10 second timeout to the version check -
#15350
d758b68Thanks @matthewp! - Errors when--addand--no-installflags are used together, as--addrequires dependencies to be installed
Patch Changes
- #3645
a562096Thanks @mschoeffmann! - Adds icons for Chrome, Edge, Firefox, and Safari
Last fetched: | Scheduled refresh: Every Saturday
See Customizing GitHub Activity Pages to configure your own
Inspired by releases.antfu.me
{ "main": "dist/_worker.js/index.js", }