diff --git a/.changeset/adapter-interface-breaking.md b/.changeset/adapter-interface-breaking.md deleted file mode 100644 index 60af327c4ca8..000000000000 --- a/.changeset/adapter-interface-breaking.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'astro': minor ---- - -Adds new optional properties to `setAdapter()` for adapter entrypoint handling in the Adapter API - -**Changes:** -- 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. diff --git a/.changeset/astro-ssr-check-metadata.md b/.changeset/astro-ssr-check-metadata.md deleted file mode 100644 index 8c51662d7d8e..000000000000 --- a/.changeset/astro-ssr-check-metadata.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': minor ---- - -Updates the internal logic during SSR by providing additional metadata for UI framework integrations. diff --git a/.changeset/beige-clowns-read.md b/.changeset/beige-clowns-read.md deleted file mode 100644 index b196bf1c0e35..000000000000 --- a/.changeset/beige-clowns-read.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removes `entryPoints` on `astro:build:ssr` hook (Integration API) - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#removed-entrypoints-on-astrobuildssr-hook-integration-api)) \ No newline at end of file diff --git a/.changeset/beta-tag-alpinejs.md b/.changeset/beta-tag-alpinejs.md deleted file mode 100644 index 6413c26f274c..000000000000 --- a/.changeset/beta-tag-alpinejs.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/alpinejs': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-check.md b/.changeset/beta-tag-check.md deleted file mode 100644 index 509a3dc3cee0..000000000000 --- a/.changeset/beta-tag-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/check': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-create-astro.md b/.changeset/beta-tag-create-astro.md deleted file mode 100644 index 9ca3ec34cf08..000000000000 --- a/.changeset/beta-tag-create-astro.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'create-astro': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-db.md b/.changeset/beta-tag-db.md deleted file mode 100644 index 6b923f0351d3..000000000000 --- a/.changeset/beta-tag-db.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/db': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-language-server.md b/.changeset/beta-tag-language-server.md deleted file mode 100644 index 1ba32eb01227..000000000000 --- a/.changeset/beta-tag-language-server.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/language-server': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-markdown-remark.md b/.changeset/beta-tag-markdown-remark.md deleted file mode 100644 index ff29f3ce5459..000000000000 --- a/.changeset/beta-tag-markdown-remark.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/markdown-remark': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-mdx.md b/.changeset/beta-tag-mdx.md deleted file mode 100644 index f57009df0d03..000000000000 --- a/.changeset/beta-tag-mdx.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/mdx': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-netlify.md b/.changeset/beta-tag-netlify.md deleted file mode 100644 index 7ce3eeea3f31..000000000000 --- a/.changeset/beta-tag-netlify.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/netlify': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-preact.md b/.changeset/beta-tag-preact.md deleted file mode 100644 index e85ec9d6a047..000000000000 --- a/.changeset/beta-tag-preact.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/preact': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-prism.md b/.changeset/beta-tag-prism.md deleted file mode 100644 index 15a0247bde64..000000000000 --- a/.changeset/beta-tag-prism.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/prism': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-react.md b/.changeset/beta-tag-react.md deleted file mode 100644 index 06efe83985b2..000000000000 --- a/.changeset/beta-tag-react.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/react': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-rss.md b/.changeset/beta-tag-rss.md deleted file mode 100644 index 16b75afa7e77..000000000000 --- a/.changeset/beta-tag-rss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/rss': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-sitemap.md b/.changeset/beta-tag-sitemap.md deleted file mode 100644 index 9c616fc57c00..000000000000 --- a/.changeset/beta-tag-sitemap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/sitemap': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-solid.md b/.changeset/beta-tag-solid.md deleted file mode 100644 index 555b7756acbb..000000000000 --- a/.changeset/beta-tag-solid.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/solid-js': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/beta-tag-upgrade.md b/.changeset/beta-tag-upgrade.md deleted file mode 100644 index bd96a025603c..000000000000 --- a/.changeset/beta-tag-upgrade.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/upgrade': patch ---- - -Update to Astro 6 beta diff --git a/.changeset/better-redirect-error.md b/.changeset/better-redirect-error.md deleted file mode 100644 index 38c4e45cf4e6..000000000000 --- a/.changeset/better-redirect-error.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -Improves error message when a dynamic redirect destination does not match any existing route. - -Previously, configuring a redirect like `/categories/[category]` → `/categories/[category]/1` in 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. diff --git a/.changeset/big-cups-drive.md b/.changeset/big-cups-drive.md deleted file mode 100644 index de0607247e01..000000000000 --- a/.changeset/big-cups-drive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Deprecates `loadManifest()` and `loadApp()` from `astro/app/node` (Adapter API) - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#deprecated-loadmanifest-and-loadapp-from-astroappnode-adapter-api)) diff --git a/.changeset/big-forks-lead.md b/.changeset/big-forks-lead.md deleted file mode 100644 index 15c24ed26da1..000000000000 --- a/.changeset/big-forks-lead.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue where CSS from unused components, when using content collections, could be incorrectly included between page navigations in development mode. diff --git a/.changeset/big-jobs-make.md b/.changeset/big-jobs-make.md deleted file mode 100644 index 8e1201a4183e..000000000000 --- a/.changeset/big-jobs-make.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue where the use of the Astro internal logger couldn't work with Cloudflare Vite plugin. diff --git a/.changeset/big-laws-dig.md b/.changeset/big-laws-dig.md deleted file mode 100644 index 27734e093d7d..000000000000 --- a/.changeset/big-laws-dig.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes behavior when shortcuts are used before server is ready diff --git a/.changeset/bold-ghosts-sink.md b/.changeset/bold-ghosts-sink.md deleted file mode 100644 index 07af875f8f8d..000000000000 --- a/.changeset/bold-ghosts-sink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improves JSDoc annotations for `AstroGlobal`, `AstroSharedContext` and `APIContext` types diff --git a/.changeset/breezy-schools-travel.md b/.changeset/breezy-schools-travel.md deleted file mode 100644 index 17cde2d3aa5e..000000000000 --- a/.changeset/breezy-schools-travel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improves `astro info` by supporting more operating systems when copying the information to the clipboard. diff --git a/.changeset/bright-parrots-hear.md b/.changeset/bright-parrots-hear.md deleted file mode 100644 index 1e3ff4646d41..000000000000 --- a/.changeset/bright-parrots-hear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removes session `test` driver - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#removed-session-test-driver)) diff --git a/.changeset/bright-pens-dance.md b/.changeset/bright-pens-dance.md deleted file mode 100644 index bd3db4783ca6..000000000000 --- a/.changeset/bright-pens-dance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improves zod union type error messages to show expected vs received types instead of generic "Invalid input" diff --git a/.changeset/bright-symbols-see.md b/.changeset/bright-symbols-see.md deleted file mode 100644 index a6d194413d9b..000000000000 --- a/.changeset/bright-symbols-see.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -'astro': major ---- - -**BREAKING CHANGE to the v6 beta Adapter API only**: renames `entryType` to `entrypointResolution` and updates possible values - -Astro 6 introduced a way to let adapters have more control over the entrypoint by passing `entryType: 'self'` to `setAdapter()`. However during beta development, the name was unclear and confusing. - -`entryType` is now renamed to `entrypointResolution` and its possible values are updated: - -- `legacy-dynamic` becomes `explicit`. -- `self` becomes `auto`. - -If you are building an adapter with v6 beta and specifying `entryType`, update it: - -```diff -setAdapter({ - // ... -- entryType: 'legacy-dynamic' -+ entrypointResolution: 'explicit' -}) - -setAdapter({ - // ... -- entryType: 'self' -+ entrypointResolution: 'auto' -}) -``` diff --git a/.changeset/bright-worlds-juggle.md b/.changeset/bright-worlds-juggle.md deleted file mode 100644 index 48ea54332ca6..000000000000 --- a/.changeset/bright-worlds-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a bug that caused incorrect warnings of duplicate entries to be logged by the glob loader when editing a file diff --git a/.changeset/brown-beds-pay.md b/.changeset/brown-beds-pay.md deleted file mode 100644 index bc3dfab11035..000000000000 --- a/.changeset/brown-beds-pay.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -'astro': minor ---- - -Adds a new optional `getRemoteSize()` 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 extends `inferRemoteSize()`, 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: - -```js -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](https://docs.astro.build/en/reference/image-service-reference/#getremotesize) for more information. diff --git a/.changeset/busy-actors-follow.md b/.changeset/busy-actors-follow.md deleted file mode 100644 index ef32448585f6..000000000000 --- a/.changeset/busy-actors-follow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/markdoc': patch ---- - -Fixes an issue where the package wasn't correctly published diff --git a/.changeset/busy-humans-smoke.md b/.changeset/busy-humans-smoke.md deleted file mode 100644 index e97be68d2756..000000000000 --- a/.changeset/busy-humans-smoke.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/sitemap': patch -'@astrojs/rss': patch -'@astrojs/db': patch ---- - -Updates usage of zod to own dependency rather than relying on `astro/zod` diff --git a/.changeset/busy-olives-chew.md b/.changeset/busy-olives-chew.md deleted file mode 100644 index b75c6935bfa0..000000000000 --- a/.changeset/busy-olives-chew.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removes the deprecated `emitESMImage()` function - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#removed-emitesmimage)) \ No newline at end of file diff --git a/.changeset/cache-disabled-no-throw.md b/.changeset/cache-disabled-no-throw.md deleted file mode 100644 index 7f683f267e7c..000000000000 --- a/.changeset/cache-disabled-no-throw.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -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 modes - -Adds a `cache.enabled` property to `CacheLike` so libraries can check whether caching is active without try/catch. diff --git a/.changeset/calm-bats-create.md b/.changeset/calm-bats-create.md deleted file mode 100644 index 3d11c5ec15dc..000000000000 --- a/.changeset/calm-bats-create.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/preact': patch ---- - -Fixed an issue where the Preact integration would incorrectly intercept React 19 components, triggering "Invalid hook call" error logs. diff --git a/.changeset/calm-birds-fly.md b/.changeset/calm-birds-fly.md deleted file mode 100644 index c4793d13cd3b..000000000000 --- a/.changeset/calm-birds-fly.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/node': patch ---- - -Improves error page loading to read from disk first before falling back to configured host diff --git a/.changeset/chubby-plums-rule.md b/.changeset/chubby-plums-rule.md deleted file mode 100644 index 88a5a0bf297b..000000000000 --- a/.changeset/chubby-plums-rule.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@astrojs/internal-helpers': minor ---- - -Added a new entry point called `/request`, which exposes utilities to work with the `Request` type: -- `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 the `x-forwarded-for` header. diff --git a/.changeset/chubby-tips-change.md b/.changeset/chubby-tips-change.md deleted file mode 100644 index a9547317e251..000000000000 --- a/.changeset/chubby-tips-change.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Removes types for the `astro:ssr-manifest` module, which was removed diff --git a/.changeset/clean-planets-flow.md b/.changeset/clean-planets-flow.md deleted file mode 100644 index 40804e46970e..000000000000 --- a/.changeset/clean-planets-flow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improves rendering by preserving `hidden="until-found"` value in attributes diff --git a/.changeset/clear-areas-cry.md b/.changeset/clear-areas-cry.md deleted file mode 100644 index a04d1303d2ab..000000000000 --- a/.changeset/clear-areas-cry.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/cloudflare': patch -'astro': patch ---- - -Removes an exposed internal API of the preview server diff --git a/.changeset/clear-route-cache-content.md b/.changeset/clear-route-cache-content.md deleted file mode 100644 index 7e84854b56de..000000000000 --- a/.changeset/clear-route-cache-content.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Clear the route cache on content changes so slug pages reflect updated data during dev. diff --git a/.changeset/clever-clubs-listen.md b/.changeset/clever-clubs-listen.md deleted file mode 100644 index 0624100758bc..000000000000 --- a/.changeset/clever-clubs-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Deprecates session driver string signature - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#deprecated-session-driver-string-signature)) diff --git a/.changeset/cloudflare-dev-styles.md b/.changeset/cloudflare-dev-styles.md deleted file mode 100644 index 331d4a8d7cde..000000000000 --- a/.changeset/cloudflare-dev-styles.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes styles missing in dev for prerendered pages when using Cloudflare adapter diff --git a/.changeset/cloudflare-entrypoint-breaking.md b/.changeset/cloudflare-entrypoint-breaking.md deleted file mode 100644 index 629d3744ea83..000000000000 --- a/.changeset/cloudflare-entrypoint-breaking.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -'@astrojs/cloudflare': major ---- - -Changes the API for creating a custom `entrypoint`, replacing the `createExports()` function with a direct export pattern. - -#### What should I do? - -If you're using a custom `entryPoint` in your Cloudflare adapter config, update your existing worker file that uses `createExports()` to reflect the new, simplified pattern: - - -__my-entry.ts__ - -```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 { - 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, - MyDurableObject: MyDurableObject, - } -} -``` - -To create the same custom `entrypoint` using the updated API, export the following function instead: - -__my-entry.ts__ - -```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, -``` - -The manifest is now created internally by the adapter. diff --git a/.changeset/cloudflare-image-component.md b/.changeset/cloudflare-image-component.md deleted file mode 100644 index a49676031a92..000000000000 --- a/.changeset/cloudflare-image-component.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/cloudflare": major ---- - -Changes the default image service from `compile` to `cloudflare-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](https://docs.astro.build/en/guides/integrations-guide/cloudflare/#changed-imageservice-default)) diff --git a/.changeset/cloudflare-image-dev-fix.md b/.changeset/cloudflare-image-dev-fix.md deleted file mode 100644 index d199034787fb..000000000000 --- a/.changeset/cloudflare-image-dev-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Improves compatibility of the built-in image endpoint with runtimes that don't support CJS dependencies correctly diff --git a/.changeset/cloudflare-image-service-object.md b/.changeset/cloudflare-image-service-object.md deleted file mode 100644 index 1ca90bcce12d..000000000000 --- a/.changeset/cloudflare-image-service-object.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@astrojs/cloudflare": minor ---- - -Adds support for configuring the image service as an object with separate `build` and `runtime` options - -It 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'`: - -```js title="astro.config.mjs" ins={6} -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 `imageService` docs](https://docs.astro.build/en/guides/integrations-guide/cloudflare/#imageservice) for more information about configuring your image service. diff --git a/.changeset/cloudflare-integration-wrangler.md b/.changeset/cloudflare-integration-wrangler.md deleted file mode 100644 index 4bcc0bc4cf50..000000000000 --- a/.changeset/cloudflare-integration-wrangler.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/cloudflare': patch ---- - -Updates `wrangler` dependency to be a `peerDependency` over a `dependency` - diff --git a/.changeset/cloudflare-workerd-prerender.md b/.changeset/cloudflare-workerd-prerender.md deleted file mode 100644 index 7d1032dbcd18..000000000000 --- a/.changeset/cloudflare-workerd-prerender.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/cloudflare': minor ---- - -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. diff --git a/.changeset/common-knives-rescue.md b/.changeset/common-knives-rescue.md deleted file mode 100644 index 6d42ae1eb01b..000000000000 --- a/.changeset/common-knives-rescue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/cloudflare': patch ---- - -Fixes static content deployment by moving it to another folder, so Wrangler can tell the static and worker content apart diff --git a/.changeset/common-signs-punch.md b/.changeset/common-signs-punch.md deleted file mode 100644 index 94073a0a984e..000000000000 --- a/.changeset/common-signs-punch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Adds support for converting SVGs to raster images (PNGs, WebP, etc) to the default Sharp image service - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#changed-svg-rasterization)) diff --git a/.changeset/csp-shiki-warning.md b/.changeset/csp-shiki-warning.md deleted file mode 100644 index d30942d12fba..000000000000 --- a/.changeset/csp-shiki-warning.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -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 diff --git a/.changeset/cuddly-trains-pay.md b/.changeset/cuddly-trains-pay.md new file mode 100644 index 000000000000..6da84cede4a8 --- /dev/null +++ b/.changeset/cuddly-trains-pay.md @@ -0,0 +1,5 @@ +--- +'astro-vscode': patch +--- + +Fixes failed publish for 2.16.11. diff --git a/.changeset/cuddly-worlds-beam.md b/.changeset/cuddly-worlds-beam.md deleted file mode 100644 index f2a5358247bb..000000000000 --- a/.changeset/cuddly-worlds-beam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removes `routes` on `astro:build:done` hook (Integration API) - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#removed-routes-on-astrobuilddone-hook-integration-api)) \ No newline at end of file diff --git a/.changeset/custom-prerenderer-api.md b/.changeset/custom-prerenderer-api.md deleted file mode 100644 index 3a70983b3be1..000000000000 --- a/.changeset/custom-prerenderer-api.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -'astro': minor ---- - -Updates the Integration API to add `setPrerenderer()` to the `astro:build:start` hook, allowing adapters to provide custom prerendering logic. - -The new API accepts either an `AstroPrerenderer` object directly, or a factory function that receives the default prerenderer: - -```js -'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-paths` virtual module, which exports a `StaticPaths` class 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: - -```js -// 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](https://docs.astro.build/en/reference/adapter-reference/#custom-prerenderer) for more details on implementing a custom prerenderer. - diff --git a/.changeset/cute-bottles-study.md b/.changeset/cute-bottles-study.md deleted file mode 100644 index e1cdf5638db3..000000000000 --- a/.changeset/cute-bottles-study.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": major ---- - -Throws an error when `getImage()` from `astro:assets` is called on the client - ([v6 upgrade guidance](https://v6.docs.astro.build/en/guides/upgrade-to/v6/#changed-getimage-throws-when-called-on-the-client)) diff --git a/.changeset/cute-suns-check.md b/.changeset/cute-suns-check.md deleted file mode 100644 index f2af230aa9ed..000000000000 --- a/.changeset/cute-suns-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/node': patch ---- - -Updates to new Adapter API introduced in v6 diff --git a/.changeset/cyan-crews-cross.md b/.changeset/cyan-crews-cross.md deleted file mode 100644 index 135289f4dda1..000000000000 --- a/.changeset/cyan-crews-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removes the old `app.render()` signature (Adapter API) - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#removed-old-apprender-signature-adapter-api)) \ No newline at end of file diff --git a/.changeset/dance-ornate-keen.md b/.changeset/dance-ornate-keen.md deleted file mode 100644 index 19e4146af1ea..000000000000 --- a/.changeset/dance-ornate-keen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Astro v6.0 upgrades to Zod v4 for schema validation - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#zod-4)) diff --git a/.changeset/deep-states-talk.md b/.changeset/deep-states-talk.md deleted file mode 100644 index 11d0f2d867cf..000000000000 --- a/.changeset/deep-states-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Updates how schema types are inferred for content loaders with schemas (Loader API) - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#changed-schema-types-are-inferred-instead-of-generated-content-loader-api)) diff --git a/.changeset/dirty-eggs-repeat.md b/.changeset/dirty-eggs-repeat.md new file mode 100644 index 000000000000..0bb1ea7d2085 --- /dev/null +++ b/.changeset/dirty-eggs-repeat.md @@ -0,0 +1,5 @@ +--- +'@astrojs/rss': patch +--- + +Pin `fast-xml-parser` to 5.4.1 in order to fix an upstream bug diff --git a/.changeset/discover-ssr-deps.md b/.changeset/discover-ssr-deps.md deleted file mode 100644 index 0d4426c3e90e..000000000000 --- a/.changeset/discover-ssr-deps.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/cloudflare': patch ---- - -Fixes server-side dependencies not being discovered ahead of time during development - -Previously, imports in `.astro` file 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. diff --git a/.changeset/drop-cjs-config-support.md b/.changeset/drop-cjs-config-support.md deleted file mode 100644 index 2773cb9cdced..000000000000 --- a/.changeset/drop-cjs-config-support.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removes support for CommonJS config files - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#removed-support-for-commonjs-config-files)) diff --git a/.changeset/dry-balloons-brush.md b/.changeset/dry-balloons-brush.md deleted file mode 100644 index 816d5a50cf6d..000000000000 --- a/.changeset/dry-balloons-brush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue where CSP headers were incorrectly injected in the development server. diff --git a/.changeset/dry-icons-nail.md b/.changeset/dry-icons-nail.md deleted file mode 100644 index f9ba5fdf7fc7..000000000000 --- a/.changeset/dry-icons-nail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improves the `AstroAdapter` type and how legacy adapters are handled diff --git a/.changeset/dull-jeans-work.md b/.changeset/dull-jeans-work.md deleted file mode 100644 index 270848267931..000000000000 --- a/.changeset/dull-jeans-work.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/cloudflare': patch ---- - -Fixes types of the `handle()` function exported from `/handler`, that could be incompatible with types generated by `wrangler types` diff --git a/.changeset/dull-mangos-travel.md b/.changeset/dull-mangos-travel.md deleted file mode 100644 index 9e9d72f6db14..000000000000 --- a/.changeset/dull-mangos-travel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removes `prefetch()` `with` option - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#removed-prefetch-with-option)) \ No newline at end of file diff --git a/.changeset/eager-owls-stare.md b/.changeset/eager-owls-stare.md deleted file mode 100644 index 7c77ffbd5a01..000000000000 --- a/.changeset/eager-owls-stare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Prevents missing CSS when using both SSR and prerendered routes diff --git a/.changeset/early-badgers-pull.md b/.changeset/early-badgers-pull.md deleted file mode 100644 index 5043dfbacc61..000000000000 --- a/.changeset/early-badgers-pull.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro-vscode': patch ---- - -Fix "Find All References" and other TypeScript features by ensuring the plugin bundle is correctly included diff --git a/.changeset/early-times-drop.md b/.changeset/early-times-drop.md deleted file mode 100644 index 59fdc8cb8bd9..000000000000 --- a/.changeset/early-times-drop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/cloudflare': patch ---- - -Fixes duplicate logging showing up in some cases when prerendering pages diff --git a/.changeset/eight-lines-dig.md b/.changeset/eight-lines-dig.md deleted file mode 100644 index ea8077574125..000000000000 --- a/.changeset/eight-lines-dig.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixed an issue where queued rendering wasn't correctly re-using the saved nodes. diff --git a/.changeset/emit-client-asset-api.md b/.changeset/emit-client-asset-api.md deleted file mode 100644 index 3d3ae3deb4f1..000000000000 --- a/.changeset/emit-client-asset-api.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'astro': minor ---- - -Adds a new `emitClientAsset` function to `astro/assets/utils` for 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. - -```ts -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, -}); -``` diff --git a/.changeset/encoding-static-builds.md b/.changeset/encoding-static-builds.md deleted file mode 100644 index 7709ff94b444..000000000000 --- a/.changeset/encoding-static-builds.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removes support for routes with percent-encoded percent signs (e.g. `%25`) - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#removed-percent-encoding-in-routes)) diff --git a/.changeset/every-carpets-grin.md b/.changeset/every-carpets-grin.md deleted file mode 100644 index fc7ca91cf698..000000000000 --- a/.changeset/every-carpets-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/svelte': patch ---- - -Improve Svelte `children` prop type checking diff --git a/.changeset/every-ghosts-like.md b/.changeset/every-ghosts-like.md deleted file mode 100644 index 2cc90d7fac82..000000000000 --- a/.changeset/every-ghosts-like.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/cloudflare': patch ---- - -Update the underneath `@cloudflare/workers-types` library to address a warning emitted by the package manager during the installation. diff --git a/.changeset/every-oranges-begin.md b/.changeset/every-oranges-begin.md deleted file mode 100644 index 3bcd003dd313..000000000000 --- a/.changeset/every-oranges-begin.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/markdown-remark': minor -'astro': patch ---- - -Fixes an issue where the function `createShikiHighlighter` would 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. diff --git a/.changeset/famous-trees-tan.md b/.changeset/famous-trees-tan.md deleted file mode 100644 index 60e6256453c7..000000000000 --- a/.changeset/famous-trees-tan.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/cloudflare': patch ---- - -Fixes auto-provisioning of default bindings (SESSION KV, IMAGES, and ASSETS). Default bindings are now correctly applied whether or not you have a `wrangler.json` file. -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. diff --git a/.changeset/fancy-bananas-sing.md b/.changeset/fancy-bananas-sing.md deleted file mode 100644 index 63f18cd02d3b..000000000000 --- a/.changeset/fancy-bananas-sing.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a case where using the Fonts API with `netlify dev` wouldn't work because of query parameters diff --git a/.changeset/fast-bushes-fall.md b/.changeset/fast-bushes-fall.md deleted file mode 100644 index 5c661674e86b..000000000000 --- a/.changeset/fast-bushes-fall.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Deprecates `Astro` in `getStaticPaths()` - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#deprecated-astro-in-getstaticpaths)) \ No newline at end of file diff --git a/.changeset/fast-wolves-render.md b/.changeset/fast-wolves-render.md deleted file mode 100644 index 28ba531e297e..000000000000 --- a/.changeset/fast-wolves-render.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -Improves `.astro` component 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). diff --git a/.changeset/fifty-dingos-study.md b/.changeset/fifty-dingos-study.md deleted file mode 100644 index 63bdb5a6b86b..000000000000 --- a/.changeset/fifty-dingos-study.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -'astro': minor ---- - -Updates the Adapter API to allow providing a `serverEntrypoint` when using `entryType: 'self'` - -Astro 6 introduced a new powerful yet simple Adapter API for defining custom server entrypoints. You can now call `setAdapter()` with the `entryType: 'self'` option and specify your custom `serverEntrypoint`: - -```js -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 `serverEntrypoint` and instead specify your custom server entrypoint with [`vite.build.rollupOptions.input`](https://rollupjs.org/configuration-options/#input). diff --git a/.changeset/fix-action-prototype-traversal.md b/.changeset/fix-action-prototype-traversal.md deleted file mode 100644 index e5e11f035ae6..000000000000 --- a/.changeset/fix-action-prototype-traversal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes action route handling to return 404 for requests to prototype method names like `constructor` or `toString` used as action paths diff --git a/.changeset/fix-cloudflare-static-output.md b/.changeset/fix-cloudflare-static-output.md deleted file mode 100644 index 5b6b635d3e78..000000000000 --- a/.changeset/fix-cloudflare-static-output.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/cloudflare': patch ---- - -Fixes deployment of static sites with the Cloudflare adapter - -Fixes an issue with detecting and building fully static sites that caused deployment errors when using `output: 'static'` with the Cloudflare adapter \ No newline at end of file diff --git a/.changeset/fix-content-hmr.md b/.changeset/fix-content-hmr.md deleted file mode 100644 index f62fe0f2c8e8..000000000000 --- a/.changeset/fix-content-hmr.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Fix dev reloads for content collection Markdown updates under Vite 7. diff --git a/.changeset/fix-create-astro-registry-hang.md b/.changeset/fix-create-astro-registry-hang.md deleted file mode 100644 index 0e475794d82c..000000000000 --- a/.changeset/fix-create-astro-registry-hang.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'create-astro': patch ---- - -Fixes a hang that could occur when the npm registry is slow or unresponsive by adding a 10 second timeout to the version check diff --git a/.changeset/fix-envprefix-secret-leak.md b/.changeset/fix-envprefix-secret-leak.md deleted file mode 100644 index 68a9f3324984..000000000000 --- a/.changeset/fix-envprefix-secret-leak.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -'astro': patch ---- - -Prevents `vite.envPrefix` misconfiguration from exposing `access: "secret"` environment variables in client-side bundles. Astro now throws a clear error at startup if any `vite.envPrefix` entry matches a variable declared with `access: "secret"` in `env.schema`. - -For example, the following configuration will throw an error for `API_SECRET` because it's defined as `secret` its name matches `['PUBLIC_', 'API_']` defined in `env.schema`: - -```js -// 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_'], - }, -}) -``` diff --git a/.changeset/fix-font-head-swap.md b/.changeset/fix-font-head-swap.md deleted file mode 100644 index 951845eee525..000000000000 --- a/.changeset/fix-font-head-swap.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -Fixes font flash (FOUT) during ClientRouter navigation by preserving inline ` - -``` - -Visit the updated [fonts guide](https://docs.astro.build/en/guides/fonts/) to learn more about adding custom fonts to your project. diff --git a/.changeset/spicy-beds-boil.md b/.changeset/spicy-beds-boil.md deleted file mode 100644 index dc895fecba24..000000000000 --- a/.changeset/spicy-beds-boil.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a Windows-specific build issue when importing an Astro component with a ` - -` ---- - -``` - -See the [`` component documentation](https://docs.astro.build/en/guides/syntax-highlighting/#code-) for more details. diff --git a/.changeset/tangy-years-grin.md b/.changeset/tangy-years-grin.md deleted file mode 100644 index 01c066530e4e..000000000000 --- a/.changeset/tangy-years-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue where the `astro:page-load` event did not fire on initial page loads. diff --git a/.changeset/ten-numbers-rush.md b/.changeset/ten-numbers-rush.md deleted file mode 100644 index 2b332b6c9157..000000000000 --- a/.changeset/ten-numbers-rush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/cloudflare': patch ---- - -Adds an error when running on Stackblitz, since `workerd` doesn't support it diff --git a/.changeset/tender-bats-tan.md b/.changeset/tender-bats-tan.md deleted file mode 100644 index e11976d27a29..000000000000 --- a/.changeset/tender-bats-tan.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/internal-helpers': minor ---- - -Adds a new `/cli` specifier and the utility `NPM_PACKAGE_NAME_REGEX`. diff --git a/.changeset/tender-moose-help.md b/.changeset/tender-moose-help.md deleted file mode 100644 index 5aca575951a2..000000000000 --- a/.changeset/tender-moose-help.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -'astro': patch ---- - -**BREAKING CHANGE to the experimental Fonts API only** - -Changes the font format downloaded by default when using the experimental Fonts API. Additionally, adds a new `formats` configuration option to specify which font formats to download. - -Previously, Astro was opinionated about which font sources would be kept for usage, mainly keeping `woff2` and `woff` files. - -You can now specify what font formats should be downloaded (if available). Only `woff2` files are downloaded by default. - -#### What should I do? - -If you were previously relying on Astro downloading the `woff` format, you will now need to specify this explicitly with the new `formats` configuration option. Additionally, you may also specify any additional file formats to download if available: - -```diff -// 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'] - }] - } -}) -``` diff --git a/.changeset/thin-hands-find.md b/.changeset/thin-hands-find.md deleted file mode 100644 index 86aab66ffc64..000000000000 --- a/.changeset/thin-hands-find.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'astro': minor ---- - -Adds an option `prerenderConflictBehavior` to configure the behavior of conflicting prerendered routes - -By 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-1` path. In such cases, Astro renders only the [highest priority route](https://docs.astro.build/en/guides/routing/#route-priority-order) 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 `prerenderConflictBehavior` configuration option, you can now configure this further: - -- `prerenderConflictBehavior: 'error'` fails the build -- `prerenderConflictBehavior: 'warn'` (default) logs a warning and the highest-priority route wins -- `prerenderConflictBehavior: 'ignore'` silently picks the highest-priority route when conflicts occur - -```diff -import { defineConfig } from 'astro/config'; - -export default defineConfig({ -+ prerenderConflictBehavior: 'error', -}); -``` diff --git a/.changeset/thirty-experts-tickle.md b/.changeset/thirty-experts-tickle.md deleted file mode 100644 index bcc6cba4e589..000000000000 --- a/.changeset/thirty-experts-tickle.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -'@astrojs/node': major ---- - -Removes the `experimentalErrorPageHost` option - -This 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: - -```diff -// 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: - -```ts -// 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 -}) -``` diff --git a/.changeset/three-sheep-burn.md b/.changeset/three-sheep-burn.md deleted file mode 100644 index 6f442eb712f2..000000000000 --- a/.changeset/three-sheep-burn.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@astrojs/vercel': minor ---- - -Adds new `middlewareMode` adapter feature and deprecates `edgeMiddleware` option - -The `edgeMiddleware` option is now deprecated and will be removed in a future release, so users should transition to using the new `middlewareMode` feature as soon as possible. - -```diff -export default defineConfig({ - adapter: vercel({ -- edgeMiddleware: true -+ middlewareMode: 'edge' - }) -}) -``` diff --git a/.changeset/tiny-books-scream.md b/.changeset/tiny-books-scream.md deleted file mode 100644 index 858ebc8226df..000000000000 --- a/.changeset/tiny-books-scream.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@astrojs/netlify': minor -'@astrojs/vercel': minor -'@astrojs/node': minor -'astro': minor ---- - -Removes the `experimental.csp` flag and replaces it with a new configuration option `security.csp` - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#experimental-flags)) diff --git a/.changeset/tired-eels-cough.md b/.changeset/tired-eels-cough.md deleted file mode 100644 index 7f4a5777174c..000000000000 --- a/.changeset/tired-eels-cough.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue when importing using an import alias a file with a name matching a directory name. diff --git a/.changeset/tired-poems-shake.md b/.changeset/tired-poems-shake.md deleted file mode 100644 index 891ca6fa9aba..000000000000 --- a/.changeset/tired-poems-shake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a vite warning log during builds when using npm diff --git a/.changeset/tricky-donkeys-camp.md b/.changeset/tricky-donkeys-camp.md deleted file mode 100644 index 4e9a85600622..000000000000 --- a/.changeset/tricky-donkeys-camp.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@astrojs/cloudflare': major -'@astrojs/alpinejs': minor -'@astrojs/markdoc': minor -'@astrojs/netlify': major -'@astrojs/preact': major -'@astrojs/svelte': major -'@astrojs/react': major -'@astrojs/solid-js': major -'@astrojs/mdx': major -'@astrojs/vue': major -'astro': major -'@astrojs/db': minor ---- - -Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#vite-70)) \ No newline at end of file diff --git a/.changeset/true-bats-punch.md b/.changeset/true-bats-punch.md deleted file mode 100644 index d834a745ea84..000000000000 --- a/.changeset/true-bats-punch.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/cloudflare': patch -'astro': patch ---- - -Fixes a regression where `build.serverEntry` stopped working as expected. diff --git a/.changeset/true-dingos-attack.md b/.changeset/true-dingos-attack.md deleted file mode 100644 index 3da0bbb4eeb9..000000000000 --- a/.changeset/true-dingos-attack.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/internal-helpers': minor ---- - -**BREAKING CHANGE** - -Removes `collapseDuplicateSlashes()`, `startsWithForwardSlash()`, `startsWithDotDotSlash()`, `startsWithDotSlash()` and `isAbsolutePath()` from the `/path` export diff --git a/.changeset/twenty-signs-brush.md b/.changeset/twenty-signs-brush.md deleted file mode 100644 index a18ed3f1991c..000000000000 --- a/.changeset/twenty-signs-brush.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -'@astrojs/cloudflare': minor ---- - -Adds support for more `@cloudflare/vite-plugin` options - -The adapter now accepts the following [options from Cloudflare's Vite plugin](https://developers.cloudflare.com/workers/vite-plugin/reference/api/): - -- `auxiliaryWorkers` -- `configPath` -- `inspectorPort` -- `persistState` -- `remoteBindings` -- `experimental.headersAndRedirectsDevModeSupport` - -For example, you can now set `inspectorPort` to provide a custom port for debugging your Workers: - -```js -// astro.config.mjs -import { defineConfig } from 'astro/config' -import cloudflare from '@astrojs/cloudflare' - -export default defineConfig({ - adapter: cloudflare({ - inspectorPort: 3456 - }) -}) -``` \ No newline at end of file diff --git a/.changeset/twenty-zebras-hammer.md b/.changeset/twenty-zebras-hammer.md deleted file mode 100644 index 0fe530d8425b..000000000000 --- a/.changeset/twenty-zebras-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/cloudflare': patch ---- - -Fixes a regression where using the adapter would throw an error when using an integration that uses JSX. diff --git a/.changeset/upset-dodos-rhyme.md b/.changeset/upset-dodos-rhyme.md deleted file mode 100644 index c0b92cbcc6d4..000000000000 --- a/.changeset/upset-dodos-rhyme.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Changes how styles of responsive images are emitted - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#changed-how-responsive-image-styles-are-emitted)) diff --git a/.changeset/vite-environments-breaking.md b/.changeset/vite-environments-breaking.md deleted file mode 100644 index 0a74c3623171..000000000000 --- a/.changeset/vite-environments-breaking.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Changes integration hooks and HMR access patterns in the Integration API - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#changed-integration-hooks-and-hmr-access-patterns-integration-api)) diff --git a/.changeset/vite-plugin-react-v5.md b/.changeset/vite-plugin-react-v5.md deleted file mode 100644 index e15f26705479..000000000000 --- a/.changeset/vite-plugin-react-v5.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/react': minor ---- - -Update `@vitejs/plugin-react` to v5. diff --git a/.changeset/vite-plugin-vue-v6.md b/.changeset/vite-plugin-vue-v6.md deleted file mode 100644 index e8cbfa0b4347..000000000000 --- a/.changeset/vite-plugin-vue-v6.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/vue': minor ---- - -Updates `@vitejs/plugin-vue` to v6, `@vitejs/plugin-vue-jsx` to v5, and `vite-plugin-vue-devtools` to v8. No changes are needed from users. diff --git a/.changeset/warm-comics-pump.md b/.changeset/warm-comics-pump.md deleted file mode 100644 index cbae54f49826..000000000000 --- a/.changeset/warm-comics-pump.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -'astro': minor ---- - -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 `.astro` pages) or `context.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 using `experimental.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.cache` with a cache provider in your Astro config: - -```js -// 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.cache` and `context.cache` - -In `.astro` pages, use `Astro.cache.set()` to control caching: - -```astro ---- -// 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 -}); ---- -Cached page -``` - -In API routes and middleware, use `context.cache`: - -```ts -// 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 multiple `set()` calls within a request. -- **`lastModified`** (Date): When multiple `set()` calls provide `lastModified`, 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, `lastModified` uses most-recent-wins, and tags accumulate. - -#### Invalidation - -Purge cached entries by tag or path using `cache.invalidate()`: - -```ts -// 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.routeRules` to set default cache options for routes without modifying route code. Supports Nitro-style shortcuts for ergonomic configuration: - -```js -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-route `cache.set()` calls merge with (and can override) the config-level defaults. - -You can also read the current cache state via `cache.options`: - -```ts -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 an `X-Astro-Cache` header (HIT/MISS/STALE) for observability. - -#### Built-in memory cache provider - -Astro includes a built-in, in-memory LRU runtime cache provider. Import `memoryCache` from `astro/config` to 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-Cache` response header: `HIT`, `MISS`, or `STALE` -- Query parameter sorting for better hit rates (`?b=2&a=1` and `?a=1&b=2` hit the same entry) -- Common tracking parameters (`utm_*`, `fbclid`, `gclid`, etc.) excluded from cache keys by default -- `Vary` header support — responses that set `Vary` automatically get separate cache entries per variant -- Configurable query parameter filtering via `query.exclude` (glob patterns) and `query.include` (allowlist) - -For more information on enabling and using this feature in your project, see the [Experimental Route Caching docs](https://docs.astro.build/en/reference/experimental-flags/route-caching/). -For a complete overview and to give feedback on this experimental API, see the [Route Caching RFC](https://github.com/withastro/roadmap/pull/1245). diff --git a/.changeset/warm-donuts-learn.md b/.changeset/warm-donuts-learn.md deleted file mode 100644 index 6332d5446dac..000000000000 --- a/.changeset/warm-donuts-learn.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'astro': minor ---- - -Adds `streaming` option to the `createApp()` function in the Adapter API, mirroring the same functionality available when creating a new `App` instance - -An adapter's `createApp()` function now accepts `streaming` (defaults to `true`) 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: false` to `createApp()`: - -```ts -import { createApp } from 'astro/app/entrypoint' - -const app = createApp({ streaming: false }) -``` - -See more about [the `createApp()` function](https://docs.astro.build/en/reference/adapter-reference/#createapp) in the Adapter API reference. diff --git a/.changeset/warm-dots-glow.md b/.changeset/warm-dots-glow.md deleted file mode 100644 index 528987cd2749..000000000000 --- a/.changeset/warm-dots-glow.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'astro': patch -'@astrojs/cloudflare': patch ---- - -Excludes `astro:*` and `virtual:astro:*` from client optimizeDeps in core. Needed for prefetch users since virtual modules are now in the dependency graph. diff --git a/.changeset/warm-pens-glow.md b/.changeset/warm-pens-glow.md deleted file mode 100644 index 0c40ed0af75a..000000000000 --- a/.changeset/warm-pens-glow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -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. diff --git a/.changeset/warm-worms-talk.md b/.changeset/warm-worms-talk.md deleted file mode 100644 index e9ee37aaecac..000000000000 --- a/.changeset/warm-worms-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Reverts changes made to TSConfig templates diff --git a/.changeset/wet-animals-pump.md b/.changeset/wet-animals-pump.md deleted file mode 100644 index 780c54661a05..000000000000 --- a/.changeset/wet-animals-pump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/internal-helpers': minor ---- - -Adds the new utilities `MANY_LEADING_SLASHES` and `collapseDuplicateLeadingSlashes`. diff --git a/.changeset/wet-lines-wear.md b/.changeset/wet-lines-wear.md deleted file mode 100644 index e16d118775a4..000000000000 --- a/.changeset/wet-lines-wear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removes the unused `astro:ssr-manifest` virtual module - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#removed-astrossr-manifest-virtual-module-integration-api)) diff --git a/.changeset/wet-suits-help.md b/.changeset/wet-suits-help.md deleted file mode 100644 index 0b91a4652e02..000000000000 --- a/.changeset/wet-suits-help.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Updates `import.meta.env` values to always be inlined - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#changed-importmetaenv-values-are-always-inlined)) \ No newline at end of file diff --git a/.changeset/whole-geckos-think.md b/.changeset/whole-geckos-think.md deleted file mode 100644 index 9a96148e82ae..000000000000 --- a/.changeset/whole-geckos-think.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Updates ` + + `; + --- + + + ``` + + See the [`` component documentation](https://docs.astro.build/en/guides/syntax-highlighting/#code-) for more details. + +- [#14826](https://github.com/withastro/astro/pull/14826) [`170f64e`](https://github.com/withastro/astro/commit/170f64e977290b8f9d316b5f283bd03bae33ddde) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds an option `prerenderConflictBehavior` to configure the behavior of conflicting prerendered routes + + By 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-1` path. In such cases, Astro renders only the [highest priority route](https://docs.astro.build/en/guides/routing/#route-priority-order) 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 `prerenderConflictBehavior` configuration option, you can now configure this further: + - `prerenderConflictBehavior: 'error'` fails the build + - `prerenderConflictBehavior: 'warn'` (default) logs a warning and the highest-priority route wins + - `prerenderConflictBehavior: 'ignore'` silently picks the highest-priority route when conflicts occur + + ```diff + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + + prerenderConflictBehavior: 'error', + }); + ``` + +- [#14946](https://github.com/withastro/astro/pull/14946) [`95c40f7`](https://github.com/withastro/astro/commit/95c40f7109ce240206c3951761a7bb439dd809cb) Thanks [@ematipico](https://github.com/ematipico)! - Removes the `experimental.csp` flag and replaces it with a new configuration option `security.csp` - ([v6 upgrade guidance](https://docs.astro.build/en/guides/upgrade-to/v6/#experimental-flags)) + +- [#15579](https://github.com/withastro/astro/pull/15579) [`08437d5`](https://github.com/withastro/astro/commit/08437d531e31b79a42333a9f7aabaa9fe646ce4f) Thanks [@ascorbic](https://github.com/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 `.astro` pages) or `context.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 using `experimental.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.cache` with a cache provider in your Astro config: + + ```js + // 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.cache` and `context.cache` + + In `.astro` pages, use `Astro.cache.set()` to control caching: + + ```astro + --- + // 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 + }); + --- + + Cached page + ``` + + In API routes and middleware, use `context.cache`: + + ```ts + // 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 multiple `set()` calls within a request. + - **`lastModified`** (Date): When multiple `set()` calls provide `lastModified`, 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, `lastModified` uses most-recent-wins, and tags accumulate. + + #### Invalidation + + Purge cached entries by tag or path using `cache.invalidate()`: + + ```ts + // 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.routeRules` to set default cache options for routes without modifying route code. Supports Nitro-style shortcuts for ergonomic configuration: + + ```js + 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-route `cache.set()` calls merge with (and can override) the config-level defaults. + + You can also read the current cache state via `cache.options`: + + ```ts + 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 an `X-Astro-Cache` header (HIT/MISS/STALE) for observability. + + #### Built-in memory cache provider + + Astro includes a built-in, in-memory LRU runtime cache provider. Import `memoryCache` from `astro/config` to 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-Cache` response header: `HIT`, `MISS`, or `STALE` + - Query parameter sorting for better hit rates (`?b=2&a=1` and `?a=1&b=2` hit the same entry) + - Common tracking parameters (`utm_*`, `fbclid`, `gclid`, etc.) excluded from cache keys by default + - `Vary` header support — responses that set `Vary` automatically get separate cache entries per variant + - Configurable query parameter filtering via `query.exclude` (glob patterns) and `query.include` (allowlist) + + For more information on enabling and using this feature in your project, see the [Experimental Route Caching docs](https://docs.astro.build/en/reference/experimental-flags/route-caching/). + For a complete overview and to give feedback on this experimental API, see the [Route Caching RFC](https://github.com/withastro/roadmap/pull/1245). + +- [#15483](https://github.com/withastro/astro/pull/15483) [`7be3308`](https://github.com/withastro/astro/commit/7be3308bf4b1710a3f378ba338d09a8528e01e76) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds `streaming` option to the `createApp()` function in the Adapter API, mirroring the same functionality available when creating a new `App` instance + + An adapter's `createApp()` function now accepts `streaming` (defaults to `true`) 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: false` to `createApp()`: + + ```ts + import { createApp } from 'astro/app/entrypoint'; + + const app = createApp({ streaming: false }); + ``` + + See more about [the `createApp()` function](https://docs.astro.build/en/reference/adapter-reference/#createapp) in the Adapter API reference. + +### Patch Changes + +- [#15423](https://github.com/withastro/astro/pull/15423) [`c5ea720`](https://github.com/withastro/astro/commit/c5ea720261a35324988147fbf69d8200e496e1d0) Thanks [@matthewp](https://github.com/matthewp)! - Improves error message when a dynamic redirect destination does not match any existing route. + + Previously, configuring a redirect like `/categories/[category]` → `/categories/[category]/1` in 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](https://github.com/withastro/astro/pull/15167) [`4fca170`](https://github.com/withastro/astro/commit/4fca1701eca1d107df43ef280cab342dfdacbb44) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes an issue where CSS from unused components, when using content collections, could be incorrectly included between page navigations in development mode. + +- [#15565](https://github.com/withastro/astro/pull/15565) [`30cd6db`](https://github.com/withastro/astro/commit/30cd6dbebe771efb6f71dcff7e6b44026fad6797) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the use of the Astro internal logger couldn't work with Cloudflare Vite plugin. + +- [#15508](https://github.com/withastro/astro/pull/15508) [`2c6484a`](https://github.com/withastro/astro/commit/2c6484a4c34e86b8a26342a48986da26768de27b) Thanks [@KTibow](https://github.com/KTibow)! - Fixes behavior when shortcuts are used before server is ready + +- [#15125](https://github.com/withastro/astro/pull/15125) [`6feb0d7`](https://github.com/withastro/astro/commit/6feb0d7bec1e333eb795ae0fc51516182a73eb2b) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Improves JSDoc annotations for `AstroGlobal`, `AstroSharedContext` and `APIContext` types + +- [#15712](https://github.com/withastro/astro/pull/15712) [`7ac43c7`](https://github.com/withastro/astro/commit/7ac43c713be0c69b8df0fdaaca1e85e022361216) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Improves `astro info` by supporting more operating systems when copying the information to the clipboard. + +- [#15054](https://github.com/withastro/astro/pull/15054) [`22db567`](https://github.com/withastro/astro/commit/22db567d4cea7a4476271c101c452a2624b7d996) Thanks [@matthewp](https://github.com/matthewp)! - Improves zod union type error messages to show expected vs received types instead of generic "Invalid input" + +- [#15064](https://github.com/withastro/astro/pull/15064) [`caf5621`](https://github.com/withastro/astro/commit/caf5621b324344fc0d46fb462c88c0d79fccca6b) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug that caused incorrect warnings of duplicate entries to be logged by the glob loader when editing a file + +- [#15801](https://github.com/withastro/astro/pull/15801) [`01db4f3`](https://github.com/withastro/astro/commit/01db4f37ddc14e2148df8390e0c0c600677a2417) Thanks [@ascorbic](https://github.com/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 modes + + Adds a `cache.enabled` property to `CacheLike` so libraries can check whether caching is active without try/catch. + +- [#15562](https://github.com/withastro/astro/pull/15562) [`e14a51d`](https://github.com/withastro/astro/commit/e14a51d30196bad534bacb14aac7033b91aed741) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Removes types for the `astro:ssr-manifest` module, which was removed + +- [#15542](https://github.com/withastro/astro/pull/15542) [`9760404`](https://github.com/withastro/astro/commit/97604040b73ec1d029f5d5a489aa744aaecfd173) Thanks [@rururux](https://github.com/rururux)! - Improves rendering by preserving `hidden="until-found"` value in attributes + +- [#15044](https://github.com/withastro/astro/pull/15044) [`7cac71b`](https://github.com/withastro/astro/commit/7cac71b89f7462e197a69d797bdfefe6c7d15689) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Removes an exposed internal API of the preview server + +- [#15573](https://github.com/withastro/astro/pull/15573) [`d789452`](https://github.com/withastro/astro/commit/d78945221d68ceab073f93572d87f12be0c72d47) Thanks [@matthewp](https://github.com/matthewp)! - Clear the route cache on content changes so slug pages reflect updated data during dev. + +- [#15308](https://github.com/withastro/astro/pull/15308) [`89cbcfa`](https://github.com/withastro/astro/commit/89cbcfadcf2d777dc5dbd210f9f88117c0101931) Thanks [@matthewp](https://github.com/matthewp)! - Fixes styles missing in dev for prerendered pages when using Cloudflare adapter + +- [#15435](https://github.com/withastro/astro/pull/15435) [`957b9fe`](https://github.com/withastro/astro/commit/957b9fe2d887a365c55c6e87f0c67c10beb60d1b) Thanks [@rururux](https://github.com/rururux)! - Improves compatibility of the built-in image endpoint with runtimes that don't support CJS dependencies correctly + +- [#15640](https://github.com/withastro/astro/pull/15640) [`4c1a801`](https://github.com/withastro/astro/commit/4c1a801618b9c4a3147b683d6b4c8f35dc4bdb26) Thanks [@ematipico](https://github.com/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](https://github.com/withastro/astro/pull/15415) [`cc3c46c`](https://github.com/withastro/astro/commit/cc3c46c73774d5c4b67c3b7a68f7da5de5544ba8) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where CSP headers were incorrectly injected in the development server. + +- [#15412](https://github.com/withastro/astro/pull/15412) [`c546563`](https://github.com/withastro/astro/commit/c546563f361343b2494ebfb1c06ef3101a4d083c) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Improves the `AstroAdapter` type and how legacy adapters are handled + +- [#15322](https://github.com/withastro/astro/pull/15322) [`18e0980`](https://github.com/withastro/astro/commit/18e09800e459ff292f33370d4cf5f70d97bdbdb4) Thanks [@matthewp](https://github.com/matthewp)! - Prevents missing CSS when using both SSR and prerendered routes + +- [#15760](https://github.com/withastro/astro/pull/15760) [`f49a27f`](https://github.com/withastro/astro/commit/f49a27fd2ac2559c06671979487f642360791a92) Thanks [@ematipico](https://github.com/ematipico)! - Fixed an issue where queued rendering wasn't correctly re-using the saved nodes. + +- [#15277](https://github.com/withastro/astro/pull/15277) [`cb99214`](https://github.com/withastro/astro/commit/cb99214ebb991d1b929978f46e1b3ae68b561366) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the function `createShikiHighlighter` would 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](https://github.com/withastro/astro/pull/15394) [`5520f89`](https://github.com/withastro/astro/commit/5520f89d5df125e0c2d7fcdb3f9f0c81ff754e86) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a case where using the Fonts API with `netlify dev` wouldn't work because of query parameters + +- [#15605](https://github.com/withastro/astro/pull/15605) [`f6473fd`](https://github.com/withastro/astro/commit/f6473fd45b74291e1a038f2f4142eb61a932d01d) Thanks [@ascorbic](https://github.com/ascorbic)! - Improves `.astro` component 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](https://github.com/withastro/astro/pull/15721) [`e6e146c`](https://github.com/withastro/astro/commit/e6e146cb0ac535e21c26f6b1c3d2f65be9dbdb4c) Thanks [@matthewp](https://github.com/matthewp)! - Fixes action route handling to return 404 for requests to prototype method names like `constructor` or `toString` used as action paths + +- [#15497](https://github.com/withastro/astro/pull/15497) [`a93c81d`](https://github.com/withastro/astro/commit/a93c81de493e912aeba1d829d9ccf6997b2eb806) Thanks [@matthewp](https://github.com/matthewp)! - Fix dev reloads for content collection Markdown updates under Vite 7. + +- [#15780](https://github.com/withastro/astro/pull/15780) [`e0ac125`](https://github.com/withastro/astro/commit/e0ac1250bb6db87f4c2ac79b6521b0fee0092d7a) Thanks [@ematipico](https://github.com/ematipico)! - Prevents `vite.envPrefix` misconfiguration from exposing `access: "secret"` environment variables in client-side bundles. Astro now throws a clear error at startup if any `vite.envPrefix` entry matches a variable declared with `access: "secret"` in `env.schema`. + + For example, the following configuration will throw an error for `API_SECRET` because it's defined as `secret` its name matches `['PUBLIC_', 'API_']` defined in `env.schema`: + + ```js + // 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](https://github.com/withastro/astro/pull/15514) [`999a7dd`](https://github.com/withastro/astro/commit/999a7dd1f2913ea04e4f18f3557e8363edef45a8) Thanks [@veeceey](https://github.com/veeceey)! - Fixes font flash (FOUT) during ClientRouter navigation by preserving inline `