diff --git a/.changeset/afraid-dots-whisper.md b/.changeset/afraid-dots-whisper.md
deleted file mode 100644
index 272a1e212..000000000
--- a/.changeset/afraid-dots-whisper.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-'@astrojs/cloudflare': major
-'@astrojs/partytown': major
-'@astrojs/tailwind': major
-'@astrojs/netlify': major
-'@astrojs/sitemap': major
-'@astrojs/preact': major
-'@astrojs/svelte': major
-'@astrojs/vercel': major
-'@astrojs/react': major
-'@astrojs/solid-js': major
-'@astrojs/deno': major
-'@astrojs/node': major
-'@astrojs/lit': major
-'@astrojs/vue': major
-'create-astro': major
-'@astrojs/prism': major
-'@astrojs/rss': major
-'@astrojs/telemetry': major
-'astro': major
-'@astrojs/alpinejs': minor
-'@astrojs/prefetch': minor
-'@astrojs/markdoc': minor
-'@astrojs/underscore-redirects': minor
-'@astrojs/mdx': minor
-'@astrojs/internal-helpers': minor
----
-
-Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.
diff --git a/.changeset/angry-dogs-shake.md b/.changeset/angry-dogs-shake.md
deleted file mode 100644
index 979fcf0f4..000000000
--- a/.changeset/angry-dogs-shake.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Use `undici` for File changeset for Node 16 compatibility
diff --git a/.changeset/big-tips-whisper.md b/.changeset/big-tips-whisper.md
deleted file mode 100644
index ad532760f..000000000
--- a/.changeset/big-tips-whisper.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@astrojs/internal-helpers': patch
----
-
-Trigger re-release to fix `collapseDuplicateSlashes` export
diff --git a/.changeset/brave-cheetahs-float.md b/.changeset/brave-cheetahs-float.md
deleted file mode 100644
index 84825ce0f..000000000
--- a/.changeset/brave-cheetahs-float.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Do not throw Error when users pass an object with a "type" property
diff --git a/.changeset/breezy-books-notice.md b/.changeset/breezy-books-notice.md
deleted file mode 100644
index 586b405ea..000000000
--- a/.changeset/breezy-books-notice.md
+++ /dev/null
@@ -1,6 +0,0 @@
----
-'@astrojs/telemetry': patch
-'astro': patch
----
-
-Update telemetry notice
diff --git a/.changeset/chatty-ways-hunt.md b/.changeset/chatty-ways-hunt.md
deleted file mode 100644
index d6a9584a1..000000000
--- a/.changeset/chatty-ways-hunt.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Adds a link to the error reference in the CLI when an error occurs
diff --git a/.changeset/chilled-ducks-grin.md b/.changeset/chilled-ducks-grin.md
deleted file mode 100644
index b63b1f29c..000000000
--- a/.changeset/chilled-ducks-grin.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': major
----
-
-Removed automatic flattening of `getStaticPaths` result. `.flatMap` and `.flat` should now be used to ensure that you're returning a flat array.
diff --git a/.changeset/clever-bats-breathe.md b/.changeset/clever-bats-breathe.md
deleted file mode 100644
index 2c1a6dc39..000000000
--- a/.changeset/clever-bats-breathe.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-'astro': major
----
-
-This import alias is no longer included by default with astro:assets. If you were using this alias with experimental assets, you must convert them to relative file paths, or create your own [import aliases](https://docs.astro.build/en/guides/aliases/).
-
-```diff
----
-// src/pages/posts/post-1.astro
-- import rocket from '~/assets/rocket.png'
-+ import rocket from '../../assets/rocket.png';
----
-```
diff --git a/.changeset/cool-feet-rest.md b/.changeset/cool-feet-rest.md
deleted file mode 100644
index c2e724d80..000000000
--- a/.changeset/cool-feet-rest.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-'@astrojs/solid-js': major
----
-
-New `include` and `exclude` config options
-
-The Solid integration now has new `include` and `exclude` config options. Use these if you want to use Solid alongside another JSX framework; include specifies files to be compiled for Solid and `exclude` does the opposite.
diff --git a/.changeset/cool-jokes-clap.md b/.changeset/cool-jokes-clap.md
deleted file mode 100644
index 74176b259..000000000
--- a/.changeset/cool-jokes-clap.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-'astro': major
----
-
-Fixes for the `class:list` directive
-
-- Previously, `class:list` would ocassionally not be merged the `class` prop when passed to Astro components. Now, `class:list` is always converted to a `class` prop (as a string value).
-- Previously, `class:list` diverged from [`clsx`](https://github.com/lukeed/clsx) in a few edge cases. Now, `class:list` uses [`clsx`](https://github.com/lukeed/clsx) directly.
- - `class:list` used to deduplicate matching values, but it no longer does
- - `class:list` used to sort individual values, but it no longer does
- - `class:list` used to support `Set` and other iterables, but it no longer does
diff --git a/.changeset/curvy-experts-jog.md b/.changeset/curvy-experts-jog.md
deleted file mode 100644
index 156f7eabc..000000000
--- a/.changeset/curvy-experts-jog.md
+++ /dev/null
@@ -1,30 +0,0 @@
----
-'@astrojs/cloudflare': major
-'@astrojs/partytown': major
-'@astrojs/tailwind': major
-'@astrojs/netlify': major
-'@astrojs/sitemap': major
-'@astrojs/preact': major
-'@astrojs/svelte': major
-'@astrojs/vercel': major
-'@astrojs/react': major
-'@astrojs/solid-js': major
-'@astrojs/deno': major
-'@astrojs/node': major
-'@astrojs/lit': major
-'@astrojs/mdx': major
-'@astrojs/vue': major
-'@astrojs/markdown-remark': major
-'create-astro': major
-'@astrojs/prism': major
-'@astrojs/rss': major
-'@astrojs/telemetry': major
-'astro': major
-'@astrojs/alpinejs': minor
-'@astrojs/prefetch': minor
-'@astrojs/markdoc': minor
-'@astrojs/underscore-redirects': minor
-'@astrojs/internal-helpers': minor
----
-
-Astro 3.0 Release Candidate
diff --git a/.changeset/cyan-carrots-stare.md b/.changeset/cyan-carrots-stare.md
deleted file mode 100644
index f7bcd4870..000000000
--- a/.changeset/cyan-carrots-stare.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Update error message when Sharp couldn't be found (tends to happen on pnpm notably)
diff --git a/.changeset/dirty-lies-cover.md b/.changeset/dirty-lies-cover.md
deleted file mode 100644
index ae74e348e..000000000
--- a/.changeset/dirty-lies-cover.md
+++ /dev/null
@@ -1,32 +0,0 @@
----
-'@astrojs/cloudflare': minor
-'@astrojs/netlify': minor
-'@astrojs/vercel': minor
-'@astrojs/deno': minor
-'@astrojs/node': minor
-'astro': minor
----
-
-Introduced the concept of feature map. A feature map is a list of features that are built-in in Astro, and an Adapter
-can tell Astro if it can support it.
-
-```ts
-import {AstroIntegration} from "./astro";
-
-function myIntegration(): AstroIntegration {
- return {
- name: 'astro-awesome-list',
- // new feature map
- supportedAstroFeatures: {
- hybridOutput: 'experimental',
- staticOutput: 'stable',
- serverOutput: 'stable',
- assets: {
- supportKind: 'stable',
- isSharpCompatible: false,
- isSquooshCompatible: false,
- },
- }
- }
-}
-```
diff --git a/.changeset/fair-emus-divide.md b/.changeset/fair-emus-divide.md
deleted file mode 100644
index 529760241..000000000
--- a/.changeset/fair-emus-divide.md
+++ /dev/null
@@ -1,39 +0,0 @@
----
-'astro': major
-'@astrojs/netlify': minor
----
-
-The `build.split` and `build.excludeMiddleware` configuration options are deprecated and have been replaced by options in the adapter config.
-
-If your config includes the `build.excludeMiddleware` option, replace it with `edgeMiddleware` in your adapter options:
-
-```diff
-import { defineConfig } from "astro/config";
-import netlify from "@astrojs/netlify/functions";
-
-export default defineConfig({
- build: {
-- excludeMiddleware: true
- },
- adapter: netlify({
-+ edgeMiddleware: true
- }),
-});
-```
-
-If your config includes the `build.split` option, replace it with `functionPerRoute` in your adapter options:
-
-```diff
-import { defineConfig } from "astro/config";
-import netlify from "@astrojs/netlify/functions";
-
-export default defineConfig({
- build: {
-- split: true
- },
- adapter: netlify({
-+ functionPerRoute: true
- }),
-});
-```
-
diff --git a/.changeset/fair-eyes-promise.md b/.changeset/fair-eyes-promise.md
deleted file mode 100644
index c66a42d17..000000000
--- a/.changeset/fair-eyes-promise.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-'@astrojs/mdx': major
----
-
-Support Astro 3 JSX format
-
-This upgrades the MDX plugin to correctly work with the new JSX render API in Astro 3.
diff --git a/.changeset/famous-queens-itch.md b/.changeset/famous-queens-itch.md
deleted file mode 100644
index e3538cdd6..000000000
--- a/.changeset/famous-queens-itch.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@astrojs/mdx': patch
----
-
-Re-orders the MDX plugin to run before Astro's JSX plugin
diff --git a/.changeset/five-geese-crash.md b/.changeset/five-geese-crash.md
deleted file mode 100644
index 832d3daca..000000000
--- a/.changeset/five-geese-crash.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-'astro': major
----
-
-Change the [View Transition built-in animation](https://docs.astro.build/en/guides/view-transitions/#built-in-animation-directives) options.
-
-The `transition:animate` value `morph` has been renamed to `initial`. Also, this is no longer the default animation.
-
-If no `transition:animate` directive is specified, your animations will now default to `fade`.
-
-Astro also supports a new `transition:animate` value, `none`. This value can be used on a page's `` element to disable animated full-page transitions on an entire page.
diff --git a/.changeset/four-houses-compete.md b/.changeset/four-houses-compete.md
deleted file mode 100644
index 641bb1035..000000000
--- a/.changeset/four-houses-compete.md
+++ /dev/null
@@ -1,18 +0,0 @@
----
-'astro': major
----
-
-Sharp is now the default image service used for `astro:assets`. If you would prefer to still use Squoosh, you can update your config with the following:
-
-```ts
-import { defineConfig, squooshImageService } from "astro/config";
-
-// https://astro.build/config
-export default defineConfig({
- image: {
- service: squooshImageService(),
- }
-})
-```
-
-However, not only do we recommend using Sharp as it is faster and more reliable, it is also highly likely that the Squoosh service will be removed in a future release.
diff --git a/.changeset/fresh-shrimps-happen.md b/.changeset/fresh-shrimps-happen.md
deleted file mode 100644
index deb4f5c94..000000000
--- a/.changeset/fresh-shrimps-happen.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@astrojs/react": patch
----
-
-Publish missing `vnode-children.js` file
diff --git a/.changeset/gentle-deers-yawn.md b/.changeset/gentle-deers-yawn.md
deleted file mode 100644
index 30e577c69..000000000
--- a/.changeset/gentle-deers-yawn.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Call `astro sync` once before calling `astro check`
diff --git a/.changeset/gentle-meals-crash.md b/.changeset/gentle-meals-crash.md
deleted file mode 100644
index 5314442ea..000000000
--- a/.changeset/gentle-meals-crash.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-'astro': major
----
-
-Remove support for `Astro.__renderMarkdown` which is used by `@astrojs/markdown-component`.
-
-The `` component was deprecated in Astro v1 and is completely removed in v3. This integration must now be removed from your project.
-
-As an alternative, you can use community packages that provide a similar component like https://github.com/natemoo-re/astro-remote instead.
diff --git a/.changeset/giant-plants-sip.md b/.changeset/giant-plants-sip.md
deleted file mode 100644
index 884021b8e..000000000
--- a/.changeset/giant-plants-sip.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-'astro': major
----
-
-Remove backwards-compatible kebab-case transform for camelCase CSS variable names passed to the `style` attribute. If you were relying on the kebab-case transform in your styles, make sure to use the camelCase version to prevent missing styles. For example:
-
-```astro
----
-const myValue = "red"
----
-
-
-
-
-
-
-
-
-
-```
-
-```diff
-
-```
\ No newline at end of file
diff --git a/.changeset/gorgeous-kiwis-stare.md b/.changeset/gorgeous-kiwis-stare.md
deleted file mode 100644
index d7129ed88..000000000
--- a/.changeset/gorgeous-kiwis-stare.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Use .js to import logger
diff --git a/.changeset/grumpy-pens-melt.md b/.changeset/grumpy-pens-melt.md
deleted file mode 100644
index 14faf0676..000000000
--- a/.changeset/grumpy-pens-melt.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-'astro': minor
----
-
-View Transitions unflagged
-
-View Transition support in Astro is now unflagged. For those who have used the experimental feature you can remove the flag in your Astro config:
-
-```diff
-import { defineConfig } from 'astro'
-
-export default defineConfig({
-- experimental: {
-- viewTransitions: true,
-- }
-})
-```
-
-After removing this flag, please also consult the specific [upgrade to v3.0 advice](https://docs.astro.build/en/guides/view-transitions/#upgrade-to-v30-from-v2x) as some API features have changed and you may have breaking changes with your existing view transitions.
-
-See the [View Transitions guide](https://docs.astro.build/en/guides/view-transitions/) to learn how to use the API.
diff --git a/.changeset/grumpy-years-remember.md b/.changeset/grumpy-years-remember.md
deleted file mode 100644
index 1e1906cd9..000000000
--- a/.changeset/grumpy-years-remember.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Fix, lazily initialize ResponseWithEncoding
diff --git a/.changeset/happy-penguins-hug.md b/.changeset/happy-penguins-hug.md
deleted file mode 100644
index 215031769..000000000
--- a/.changeset/happy-penguins-hug.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': major
----
-
-Remove deprecated config option types, deprecated script/style attributes, and deprecated `image` export from `astro:content`
diff --git a/.changeset/heavy-countries-wonder.md b/.changeset/heavy-countries-wonder.md
deleted file mode 100644
index 599f0d8bb..000000000
--- a/.changeset/heavy-countries-wonder.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Add a type param to AstroGlobal to type params. This will eventually be used automatically by our tooling to provide typing and completions for `Astro.params`
diff --git a/.changeset/heavy-walls-arrive.md b/.changeset/heavy-walls-arrive.md
deleted file mode 100644
index 68f64dacb..000000000
--- a/.changeset/heavy-walls-arrive.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-'@astrojs/cloudflare': major
-'@astrojs/netlify': major
-'@astrojs/vercel': major
-'astro': major
----
-
-When using an adapter that supports neither Squoosh or Sharp, Astro will now automatically use an image service that does not support processing, but still provides the other benefits of `astro:assets` such as enforcing `alt`, no CLS etc to users
diff --git a/.changeset/honest-houses-deny.md b/.changeset/honest-houses-deny.md
deleted file mode 100644
index 962e04423..000000000
--- a/.changeset/honest-houses-deny.md
+++ /dev/null
@@ -1,25 +0,0 @@
----
-'@astrojs/rss': major
----
-
-Update the `rss()` default export to return a `Response` instead of a simple object, which is deprecated in Astro 3.0. If you were directly returning the `rss()` result from an endpoint before, this breaking change should not affect you.
-
-You can also import `getRssString()` to get the RSS string directly and use it to return your own Response:
-
-```ts
-// src/pages/rss.xml.js
-import { getRssString } from '@astrojs/rss';
-
-export async function get(context) {
- const rssString = await getRssString({
- title: 'Buzz’s Blog',
- ...
- });
-
- return new Response(rssString, {
- headers: {
- 'Content-Type': 'application/xml',
- },
- });
-}
-```
diff --git a/.changeset/large-countries-share.md b/.changeset/large-countries-share.md
deleted file mode 100644
index b3101d2f2..000000000
--- a/.changeset/large-countries-share.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-'@astrojs/preact': major
----
-
-New `include` and `exclude` config options
-
-The Preact integration now has new `include` and `exclude` config options. Use these if you want to use Preact alongside another JSX framework; include specifies files to be compiled for Preact and `exclude` does the opposite.
diff --git a/.changeset/light-badgers-mate.md b/.changeset/light-badgers-mate.md
deleted file mode 100644
index ea0451bec..000000000
--- a/.changeset/light-badgers-mate.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-'astro': patch
----
-
-Specify `data-astro-reload` (no value) on an anchor element to force the browser to ignore view transitions and fall back to default loading.
-
-This is helpful when navigating to documents that have different content-types, e.g. application/pdf, where you want to use the build in viewer of the browser.
-Example: `...`
diff --git a/.changeset/long-chefs-jump.md b/.changeset/long-chefs-jump.md
deleted file mode 100644
index ed8f47614..000000000
--- a/.changeset/long-chefs-jump.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-The scrollend mechanism is a better way to record the scroll position compared to throttling, so we now use it whenever a browser supports it.
\ No newline at end of file
diff --git a/.changeset/loud-candles-admire.md b/.changeset/loud-candles-admire.md
deleted file mode 100644
index 3fe1f12e7..000000000
--- a/.changeset/loud-candles-admire.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@astrojs/mdx': patch
----
-
-Handle `components` exports handling itself
diff --git a/.changeset/lovely-walls-call.md b/.changeset/lovely-walls-call.md
deleted file mode 100644
index 408fa00c5..000000000
--- a/.changeset/lovely-walls-call.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Improve fidelity of time stats when running `astro build`
diff --git a/.changeset/many-impalas-sit.md b/.changeset/many-impalas-sit.md
deleted file mode 100644
index ad48de4f3..000000000
--- a/.changeset/many-impalas-sit.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Fix `image.service` requiring to be set manually when `image.domains` or `image.remotePatterns` was assigned a value
diff --git a/.changeset/many-mayflies-punch.md b/.changeset/many-mayflies-punch.md
new file mode 100644
index 000000000..6e33df252
--- /dev/null
+++ b/.changeset/many-mayflies-punch.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Removed extra curly brace.
diff --git a/.changeset/many-pears-explode.md b/.changeset/many-pears-explode.md
deleted file mode 100644
index 1e2a30edc..000000000
--- a/.changeset/many-pears-explode.md
+++ /dev/null
@@ -1,35 +0,0 @@
----
-'astro': major
----
-
-Export experimental `dev`, `build`, `preview`, and `sync` APIs from `astro`. These APIs allow you to run Astro's commands programmatically, and replaces the previous entry point that runs the Astro CLI.
-
-While these APIs are experimental, the inline config parameter is relatively stable without foreseeable changes. However, the returned results of these APIs are more likely to change in the future.
-
-```ts
-import { dev, build, preview, sync, type AstroInlineConfig } from 'astro';
-
-// Inline Astro config object.
-// Provide a path to a configuration file to load or set options directly inline.
-const inlineConfig: AstroInlineConfig = {
- // Inline-specific options...
- configFile: './astro.config.mjs',
- logLevel: 'info',
- // Standard Astro config options...
- site: 'https://example.com',
-};
-
-// Start the Astro dev server
-const devServer = await dev(inlineConfig);
-await devServer.stop();
-
-// Build your Astro project
-await build(inlineConfig);
-
-// Preview your built project
-const previewServer = await preview(inlineConfig);
-await previewServer.stop();
-
-// Generate types for your Astro project
-await sync(inlineConfig);
-```
diff --git a/.changeset/mighty-dancers-lay.md b/.changeset/mighty-dancers-lay.md
deleted file mode 100644
index 873c4edd1..000000000
--- a/.changeset/mighty-dancers-lay.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': major
----
-
-Removed support for old syntax of the API routes.
diff --git a/.changeset/nasty-garlics-listen.md b/.changeset/nasty-garlics-listen.md
deleted file mode 100644
index e1b19b96b..000000000
--- a/.changeset/nasty-garlics-listen.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Reimplement https://github.com/withastro/astro/pull/7509 to correctly emit pre-rendered pages now that `build.split` is deprecated and this configuration has been moved to `functionPerRoute` inside the adapter.
diff --git a/.changeset/neat-mugs-end.md b/.changeset/neat-mugs-end.md
deleted file mode 100644
index dd65708a7..000000000
--- a/.changeset/neat-mugs-end.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-'astro': minor
----
-
-
-`astro:`namespace aliases for middleware and components
-
-This adds aliases of `astro:middleware` and `astro:components` for the middleware and components modules. This is to make our documentation consistent between are various modules, where some are virtual modules and others are not. Going forward new built-in modules will use this namespace.
diff --git a/.changeset/neat-owls-run.md b/.changeset/neat-owls-run.md
deleted file mode 100644
index 501b5319f..000000000
--- a/.changeset/neat-owls-run.md
+++ /dev/null
@@ -1,25 +0,0 @@
----
-'astro': major
----
-
-Remove exports for `astro/internal/*` and `astro/runtime/server/*` in favour of `astro/runtime/*`. Add new `astro/compiler-runtime` export for compiler-specific runtime code.
-
-These are exports for Astro's internal API and should not affect your project, but if you do use these entrypoints, you can migrate like below:
-
-```diff
-- import 'astro/internal/index.js';
-+ import 'astro/runtime/server/index.js';
-
-- import 'astro/server/index.js';
-+ import 'astro/runtime/server/index.js';
-```
-
-```diff
-import { transform } from '@astrojs/compiler';
-
-const result = await transform(source, {
-- internalURL: 'astro/runtime/server/index.js',
-+ internalURL: 'astro/compiler-runtime',
- // ...
-});
-```
diff --git a/.changeset/neat-suns-search.md b/.changeset/neat-suns-search.md
deleted file mode 100644
index da743c9c7..000000000
--- a/.changeset/neat-suns-search.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-'astro': major
----
-
-Implements a new scope style strategy called `"attribute"`. When enabled, styles are applied using `data-*` attributes.
-
-The **default** value of `scopedStyleStrategy` is `"attribute"`.
-
-If you want to use the previous behaviour, you have to use the `"where"` option:
-
-```diff
-import { defineConfig } from 'astro/config';
-
-export default defineConfig({
-+ scopedStyleStrategy: 'where',
-});
-```
diff --git a/.changeset/ninety-boats-brake.md b/.changeset/ninety-boats-brake.md
deleted file mode 100644
index 30c13a820..000000000
--- a/.changeset/ninety-boats-brake.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-'@astrojs/react': patch
-'@astrojs/preact': patch
-'@astrojs/vue': patch
-'@astrojs/solid-js': patch
-'@astrojs/svelte': patch
----
-
-Automatically unmount islands when `astro:unmount` is fired
diff --git a/.changeset/odd-books-live.md b/.changeset/odd-books-live.md
deleted file mode 100644
index 40f0d7c17..000000000
--- a/.changeset/odd-books-live.md
+++ /dev/null
@@ -1,23 +0,0 @@
----
-'astro': minor
----
-
-Integrations can now log messages using Astro’s built-in logger.
-
-The logger is available to all hooks as an additional parameter:
-
-```ts
-import {AstroIntegration} from "./astro";
-
-// integration.js
-export function myIntegration(): AstroIntegration {
- return {
- name: "my-integration",
- hooks: {
- "astro:config:done": ({ logger }) => {
- logger.info("Configure integration...");
- }
- }
- }
-}
-```
diff --git a/.changeset/olive-moles-tan.md b/.changeset/olive-moles-tan.md
deleted file mode 100644
index 9840fd4e3..000000000
--- a/.changeset/olive-moles-tan.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@astrojs/deno': patch
----
-
-TypeScript users now get better suggestions when configuring the Deno adapter.
diff --git a/.changeset/perfect-horses-tell.md b/.changeset/perfect-horses-tell.md
deleted file mode 100644
index 7723c665f..000000000
--- a/.changeset/perfect-horses-tell.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-'astro': major
----
-
-Astro's JSX handling has been refactored with better support for each framework.
-
-Previously, Astro automatically scanned your components to determine which framework-specific transformations should be used. In practice, supporting advanced features like Fast Refresh with this approach proved difficult.
-
-Now, Astro determines which framework to use with `include` and `exclude` config options where you can specify files and folders on a per-framework basis. When using multiple JSX frameworks in the same project, users should manually control which files belong to each framework using the `include` and `exclude` options.
-
-```js
-export default defineConfig({
- // The `include` config is only needed in projects that use multiple JSX frameworks;
- // if only using one no extra config is needed.
- integrations: [
- preact({
- include: ['**/preact/*']
- }),
- react({
- include: ['**/react/*']
- }),
- solid({
- include: ['**/solid/*'],
- }),
- ]
-});
-```
diff --git a/.changeset/perfect-socks-hammer.md b/.changeset/perfect-socks-hammer.md
deleted file mode 100644
index baae63ffe..000000000
--- a/.changeset/perfect-socks-hammer.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Fire `astro:unmount` event when island is disconnected
diff --git a/.changeset/plenty-keys-add.md b/.changeset/plenty-keys-add.md
deleted file mode 100644
index 73a78ba3b..000000000
--- a/.changeset/plenty-keys-add.md
+++ /dev/null
@@ -1,23 +0,0 @@
----
-'@astrojs/vercel': major
----
-
-Remove the Vercel Edge adapter
-
- `@astrojs/vercel/serverless` now supports Edge middleware, so a separate adapter for Edge itself (deploying your entire app to the edge) is no longer necessary. Please update your Astro config to reflect this change:
-
- ```diff
- // astro.config.mjs
-import { defineConfig } from 'astro/config';
-- import vercel from '@astrojs/vercel/edge';
-+ import vercel from '@astrojs/vercel/serverless';
-
-export default defineConfig({
- output: 'server',
- adapter: vercel({
-+ edgeMiddleware: true
- }),
-});
-```
-
-This adapter had several known limitations and compatibility issues that prevented many people from using it in production. To reduce maintenance costs and because we have a better story with Serveless + Edge Middleware, we are removing the Edge adapter.
diff --git a/.changeset/popular-carrots-sneeze.md b/.changeset/popular-carrots-sneeze.md
deleted file mode 100644
index 0f914891d..000000000
--- a/.changeset/popular-carrots-sneeze.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Open to configured `base` when `astro dev --open` runs
diff --git a/.changeset/pre.json b/.changeset/pre.json
deleted file mode 100644
index 65f614f2a..000000000
--- a/.changeset/pre.json
+++ /dev/null
@@ -1,121 +0,0 @@
-{
- "mode": "pre",
- "tag": "rc",
- "initialVersions": {
- "astro": "2.9.6",
- "@astrojs/prism": "2.1.2",
- "@astrojs/rss": "2.4.3",
- "create-astro": "3.1.10",
- "@astrojs/alpinejs": "0.2.2",
- "@astrojs/cloudflare": "6.6.2",
- "@astrojs/deno": "4.3.0",
- "@astrojs/lit": "2.1.0",
- "@astrojs/markdoc": "0.4.4",
- "@astrojs/mdx": "0.19.7",
- "@astrojs/netlify": "2.5.1",
- "@astrojs/node": "5.3.0",
- "@astrojs/partytown": "1.2.3",
- "@astrojs/preact": "2.2.1",
- "@astrojs/prefetch": "0.3.0",
- "@astrojs/react": "2.2.1",
- "@astrojs/sitemap": "2.0.1",
- "@astrojs/solid-js": "2.2.0",
- "@astrojs/svelte": "3.1.0",
- "@astrojs/tailwind": "4.0.0",
- "@astrojs/vercel": "3.7.4",
- "@astrojs/vue": "2.2.1",
- "@astrojs/internal-helpers": "0.1.1",
- "@astrojs/markdown-remark": "2.2.1",
- "@astrojs/telemetry": "2.1.1",
- "@astrojs/underscore-redirects": "0.2.0"
- },
- "changesets": [
- "afraid-dots-whisper",
- "angry-dogs-shake",
- "big-tips-whisper",
- "brave-cheetahs-float",
- "breezy-books-notice",
- "chatty-ways-hunt",
- "chilled-ducks-grin",
- "clever-bats-breathe",
- "cool-feet-rest",
- "cool-jokes-clap",
- "curvy-experts-jog",
- "cyan-carrots-stare",
- "dirty-lies-cover",
- "fair-emus-divide",
- "fair-eyes-promise",
- "famous-queens-itch",
- "five-geese-crash",
- "four-houses-compete",
- "fresh-shrimps-happen",
- "gentle-deers-yawn",
- "gentle-meals-crash",
- "giant-plants-sip",
- "gorgeous-kiwis-stare",
- "grumpy-pens-melt",
- "grumpy-years-remember",
- "happy-penguins-hug",
- "heavy-countries-wonder",
- "heavy-walls-arrive",
- "honest-houses-deny",
- "large-countries-share",
- "light-badgers-mate",
- "long-chefs-jump",
- "loud-candles-admire",
- "lovely-walls-call",
- "many-impalas-sit",
- "many-pears-explode",
- "mighty-dancers-lay",
- "nasty-garlics-listen",
- "neat-mugs-end",
- "neat-owls-run",
- "neat-suns-search",
- "ninety-boats-brake",
- "odd-books-live",
- "olive-moles-tan",
- "perfect-horses-tell",
- "perfect-socks-hammer",
- "plenty-keys-add",
- "popular-carrots-sneeze",
- "proud-fans-type",
- "purple-buses-prove",
- "quick-boats-bow",
- "rude-ears-play",
- "serious-waves-fry",
- "shiny-dryers-swim",
- "silent-bikes-crash",
- "silly-dolphins-try",
- "six-grapes-look",
- "slimy-carrots-sell",
- "small-nails-try",
- "smart-numbers-shout",
- "spicy-eels-rush",
- "spicy-icons-live",
- "spicy-stingrays-cheer",
- "strange-peas-agree",
- "strong-needles-accept",
- "strong-papayas-chew",
- "swift-taxis-sing",
- "tame-files-glow",
- "tame-knives-shake",
- "tasty-camels-speak",
- "tasty-dragons-smash",
- "thin-ants-repeat",
- "three-adults-exist",
- "three-onions-repeat",
- "tricky-candles-suffer",
- "twelve-coats-rush",
- "twenty-cheetahs-deny",
- "unlucky-hotels-try",
- "unlucky-ravens-type",
- "unlucky-sheep-build",
- "violet-peaches-invent",
- "warm-weeks-yell",
- "wet-foxes-sleep",
- "wild-bobcats-carry",
- "wise-cameras-agree",
- "yellow-tips-cover",
- "young-roses-teach"
- ]
-}
diff --git a/.changeset/proud-fans-type.md b/.changeset/proud-fans-type.md
deleted file mode 100644
index 8b58da136..000000000
--- a/.changeset/proud-fans-type.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': minor
----
-
-Finalize View Transition event names
diff --git a/.changeset/purple-buses-prove.md b/.changeset/purple-buses-prove.md
deleted file mode 100644
index c1e4876c9..000000000
--- a/.changeset/purple-buses-prove.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Remove StreamingCompatibleResponse polyfill
diff --git a/.changeset/quick-boats-bow.md b/.changeset/quick-boats-bow.md
deleted file mode 100644
index 1ab83ed5a..000000000
--- a/.changeset/quick-boats-bow.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': major
----
-
-Removed duplicate `astro/dist/jsx` export. Please use the `astro/jsx` export instead
diff --git a/.changeset/rude-ears-play.md b/.changeset/rude-ears-play.md
deleted file mode 100644
index 660cfcb34..000000000
--- a/.changeset/rude-ears-play.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': major
----
-
-Remove MDX plugin re-ordering hack
diff --git a/.changeset/serious-waves-fry.md b/.changeset/serious-waves-fry.md
deleted file mode 100644
index a8b8d77c1..000000000
--- a/.changeset/serious-waves-fry.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': major
----
-
-The scoped hash created by the Astro compiler is now **lowercase**.
diff --git a/.changeset/shiny-dryers-swim.md b/.changeset/shiny-dryers-swim.md
deleted file mode 100644
index f943b2180..000000000
--- a/.changeset/shiny-dryers-swim.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-Paginate will now return exact types instead of a naive Record
diff --git a/.changeset/silent-bikes-crash.md b/.changeset/silent-bikes-crash.md
deleted file mode 100644
index 66f066943..000000000
--- a/.changeset/silent-bikes-crash.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-'@astrojs/rss': patch
-'astro': patch
----
-
-Deprecate the `markdown.drafts` configuration option.
-
-If you'd like to create draft pages that are visible in dev but not in production, you can [migrate to content collections](https://docs.astro.build/en/guides/content-collections/#migrating-from-file-based-routing) and [manually filter out pages](https://docs.astro.build/en/guides/content-collections/#filtering-collection-queries) with the `draft: true` frontmatter property instead.
diff --git a/.changeset/silly-dolphins-try.md b/.changeset/silly-dolphins-try.md
deleted file mode 100644
index dcd15130d..000000000
--- a/.changeset/silly-dolphins-try.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-'@astrojs/vercel': major
----
-
-Vercel adapter now defaults to `functionPerRoute`.
-
-With this change, `@astrojs/vercel/serverless` now splits each route into its own function. By doing this, the size of each function is reduced and startup time is faster.
-
-You can disable this option, which will cause the code to be bundled into a single function, by setting `functionPerRoute` to `false`.
diff --git a/.changeset/six-grapes-look.md b/.changeset/six-grapes-look.md
deleted file mode 100644
index edf10e01a..000000000
--- a/.changeset/six-grapes-look.md
+++ /dev/null
@@ -1,15 +0,0 @@
----
-'astro': major
----
-
-The value of `import.meta.env.BASE_URL`, which is derived from the `base` option, will no longer have a trailing slash added by default or when `trailingSlash: "ignore"` is set. The existing behavior of `base` in combination with `trailingSlash: "always"` or `trailingSlash: "never"` is unchanged.
-
-If your `base` already has a trailing slash, no change is needed.
-
-If your `base` does not have a trailing slash, add one to preserve the previous behaviour:
-
-```diff
-// astro.config.mjs
-- base: 'my-base',
-+ base: 'my-base/',
-```
diff --git a/.changeset/slimy-carrots-sell.md b/.changeset/slimy-carrots-sell.md
deleted file mode 100644
index c1c9e694f..000000000
--- a/.changeset/slimy-carrots-sell.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-'@astrojs/react': major
----
-
-Support for React Refresh
-
-The React integration now fully supports React Refresh and is backed by `@vitejs/plugin-react`.
-
-Also included in this change are new `include` and `exclude` config options. Use these if you want to use React alongside another JSX framework; include specifies files to be compiled for React and `exclude` does the opposite.
diff --git a/.changeset/small-nails-try.md b/.changeset/small-nails-try.md
deleted file mode 100644
index 3f6f591f1..000000000
--- a/.changeset/small-nails-try.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'astro': patch
----
-
-On back navigation only animate view transitions that were animated going forward.
diff --git a/.changeset/smart-numbers-shout.md b/.changeset/smart-numbers-shout.md
deleted file mode 100644
index 29d9c97e6..000000000
--- a/.changeset/smart-numbers-shout.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-'astro': major
----
-
-Astro is smarter about CSS! Small stylesheets are now inlined by default, and no longer incur the cost of additional requests to your server. Your visitors will have to wait less before they see your pages, especially those in remote locations or in a subway.
-
-This may not be news to you if you had opted-in via the `build.inlineStylesheets` configuration. Stabilized in Astro 2.6 and set to "auto" by default for Starlight, this configuration allows you to reduce the number of requests for stylesheets by inlining them into
+ ```
+
+- [#8170](https://github.com/withastro/astro/pull/8170) [`be6bbd2c8`](https://github.com/withastro/astro/commit/be6bbd2c86b9bf5268e765bb937dda00ff15781a) Thanks [@bluwy](https://github.com/bluwy)! - Remove deprecated config option types, deprecated script/style attributes, and deprecated `image` export from `astro:content`
+
+- [#8188](https://github.com/withastro/astro/pull/8188) [`7511a4980`](https://github.com/withastro/astro/commit/7511a4980fd36536464c317de33a5190427f430a) Thanks [@ematipico](https://github.com/ematipico)! - When using an adapter that supports neither Squoosh or Sharp, Astro will now automatically use an image service that does not support processing, but still provides the other benefits of `astro:assets` such as enforcing `alt`, no CLS etc to users
+
+- [#7979](https://github.com/withastro/astro/pull/7979) [`dbc97b121`](https://github.com/withastro/astro/commit/dbc97b121f42583728f1cdfdbf14575fda943f5b) Thanks [@bluwy](https://github.com/bluwy)! - Export experimental `dev`, `build`, `preview`, and `sync` APIs from `astro`. These APIs allow you to run Astro's commands programmatically, and replaces the previous entry point that runs the Astro CLI.
+
+ While these APIs are experimental, the inline config parameter is relatively stable without foreseeable changes. However, the returned results of these APIs are more likely to change in the future.
+
+ ```ts
+ import { dev, build, preview, sync, type AstroInlineConfig } from 'astro';
+
+ // Inline Astro config object.
+ // Provide a path to a configuration file to load or set options directly inline.
+ const inlineConfig: AstroInlineConfig = {
+ // Inline-specific options...
+ configFile: './astro.config.mjs',
+ logLevel: 'info',
+ // Standard Astro config options...
+ site: 'https://example.com',
+ };
+
+ // Start the Astro dev server
+ const devServer = await dev(inlineConfig);
+ await devServer.stop();
+
+ // Build your Astro project
+ await build(inlineConfig);
+
+ // Preview your built project
+ const previewServer = await preview(inlineConfig);
+ await previewServer.stop();
+
+ // Generate types for your Astro project
+ await sync(inlineConfig);
+ ```
+
+- [#8188](https://github.com/withastro/astro/pull/8188) [`7d2f311d4`](https://github.com/withastro/astro/commit/7d2f311d428e3d1c8c13b9bf2a708d6435713fc2) Thanks [@ematipico](https://github.com/ematipico)! - Removed support for old syntax of the API routes.
+
+- [#8085](https://github.com/withastro/astro/pull/8085) [`68efd4a8b`](https://github.com/withastro/astro/commit/68efd4a8b29f248397667801465b3152dc98e9a7) Thanks [@bluwy](https://github.com/bluwy)! - Remove exports for `astro/internal/*` and `astro/runtime/server/*` in favour of `astro/runtime/*`. Add new `astro/compiler-runtime` export for compiler-specific runtime code.
+
+ These are exports for Astro's internal API and should not affect your project, but if you do use these entrypoints, you can migrate like below:
+
+ ```diff
+ - import 'astro/internal/index.js';
+ + import 'astro/runtime/server/index.js';
+
+ - import 'astro/server/index.js';
+ + import 'astro/runtime/server/index.js';
+ ```
+
+ ```diff
+ import { transform } from '@astrojs/compiler';
+
+ const result = await transform(source, {
+ - internalURL: 'astro/runtime/server/index.js',
+ + internalURL: 'astro/compiler-runtime',
+ // ...
+ });
+ ```
+
+- [#7893](https://github.com/withastro/astro/pull/7893) [`7bd1b86f8`](https://github.com/withastro/astro/commit/7bd1b86f85c06fdde0a1ed9146d01bac69990671) Thanks [@ematipico](https://github.com/ematipico)! - Implements a new scope style strategy called `"attribute"`. When enabled, styles are applied using `data-*` attributes.
+
+ The **default** value of `scopedStyleStrategy` is `"attribute"`.
+
+ If you want to use the previous behaviour, you have to use the `"where"` option:
+
+ ```diff
+ import { defineConfig } from 'astro/config';
+
+ export default defineConfig({
+ + scopedStyleStrategy: 'where',
+ });
+ ```
+
+- [#7924](https://github.com/withastro/astro/pull/7924) [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae) Thanks [@matthewp](https://github.com/matthewp)! - Astro's JSX handling has been refactored with better support for each framework.
+
+ Previously, Astro automatically scanned your components to determine which framework-specific transformations should be used. In practice, supporting advanced features like Fast Refresh with this approach proved difficult.
+
+ Now, Astro determines which framework to use with `include` and `exclude` config options where you can specify files and folders on a per-framework basis. When using multiple JSX frameworks in the same project, users should manually control which files belong to each framework using the `include` and `exclude` options.
+
+ ```js
+ export default defineConfig({
+ // The `include` config is only needed in projects that use multiple JSX frameworks;
+ // if only using one no extra config is needed.
+ integrations: [
+ preact({
+ include: ['**/preact/*'],
+ }),
+ react({
+ include: ['**/react/*'],
+ }),
+ solid({
+ include: ['**/solid/*'],
+ }),
+ ],
+ });
+ ```
+
+- [#8030](https://github.com/withastro/astro/pull/8030) [`5208a3c8f`](https://github.com/withastro/astro/commit/5208a3c8fefcec7694857fb344af351f4631fc34) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Removed duplicate `astro/dist/jsx` export. Please use the `astro/jsx` export instead
+
+- [#8188](https://github.com/withastro/astro/pull/8188) [`84af8ed9d`](https://github.com/withastro/astro/commit/84af8ed9d1e6401c6ebc9c60fe8cddb44d5044b0) Thanks [@ematipico](https://github.com/ematipico)! - Remove MDX plugin re-ordering hack
+
+- [#8180](https://github.com/withastro/astro/pull/8180) [`f003e7364`](https://github.com/withastro/astro/commit/f003e7364317cafdb8589913b26b28e928dd07c9) Thanks [@ematipico](https://github.com/ematipico)! - The scoped hash created by the Astro compiler is now **lowercase**.
+
+- [#7878](https://github.com/withastro/astro/pull/7878) [`0f637c71e`](https://github.com/withastro/astro/commit/0f637c71e511cb4c51712128d217a26c8eee4d40) Thanks [@bluwy](https://github.com/bluwy)! - The value of `import.meta.env.BASE_URL`, which is derived from the `base` option, will no longer have a trailing slash added by default or when `trailingSlash: "ignore"` is set. The existing behavior of `base` in combination with `trailingSlash: "always"` or `trailingSlash: "never"` is unchanged.
+
+ If your `base` already has a trailing slash, no change is needed.
+
+ If your `base` does not have a trailing slash, add one to preserve the previous behaviour:
+
+ ```diff
+ // astro.config.mjs
+ - base: 'my-base',
+ + base: 'my-base/',
+ ```
+
+- [#8118](https://github.com/withastro/astro/pull/8118) [`8a5b0c1f3`](https://github.com/withastro/astro/commit/8a5b0c1f3a4be6bb62db66ec70144109ff5b4c59) Thanks [@lilnasy](https://github.com/lilnasy)! - Astro is smarter about CSS! Small stylesheets are now inlined by default, and no longer incur the cost of additional requests to your server. Your visitors will have to wait less before they see your pages, especially those in remote locations or in a subway.
+
+ This may not be news to you if you had opted-in via the `build.inlineStylesheets` configuration. Stabilized in Astro 2.6 and set to "auto" by default for Starlight, this configuration allows you to reduce the number of requests for stylesheets by inlining them into
+
+
+
+
diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/four.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/four.astro
index 915b9814f..c6547dc20 100644
--- a/packages/astro/e2e/fixtures/view-transitions/src/pages/four.astro
+++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/four.astro
@@ -10,4 +10,5 @@ import Layout from '../components/Layout.astro';
load page / no navigation
+ load page / no navigation
diff --git a/packages/astro/e2e/view-transitions.test.js b/packages/astro/e2e/view-transitions.test.js
index 11ff97e40..944d40343 100644
--- a/packages/astro/e2e/view-transitions.test.js
+++ b/packages/astro/e2e/view-transitions.test.js
@@ -443,47 +443,62 @@ test.describe('View Transitions', () => {
'There should be only 1 page load. No additional loads for going back on same page'
).toEqual(1);
});
-});
-test('Navigation also swaps the attributes of the document root', async ({ page, astro }) => {
- await page.goto(astro.resolveUrl('/some-attributes'));
- let p = page.locator('#heading');
- await expect(p, 'should have content').toHaveText('Page with some attributes');
+ test('Navigation also swaps the attributes of the document root', async ({ page, astro }) => {
+ await page.goto(astro.resolveUrl('/some-attributes'));
+ let p = page.locator('#heading');
+ await expect(p, 'should have content').toHaveText('Page with some attributes');
- let h = page.locator('html');
- await expect(h, 'should have content').toHaveAttribute('lang', 'en');
+ let h = page.locator('html');
+ await expect(h, 'should have content').toHaveAttribute('lang', 'en');
- await page.click('#click-other-attributes');
- p = page.locator('#heading');
- await expect(p, 'should have content').toHaveText('Page with other attributes');
+ await page.click('#click-other-attributes');
+ p = page.locator('#heading');
+ await expect(p, 'should have content').toHaveText('Page with other attributes');
- h = page.locator('html');
- await expect(h, 'should have content').toHaveAttribute('lang', 'es');
- await expect(h, 'should have content').toHaveAttribute('style', 'background-color: green');
- await expect(h, 'should have content').toHaveAttribute('data-other-name', 'value');
- await expect(h, 'should have content').toHaveAttribute('data-astro-fake', 'value');
- await expect(h, 'should have content').toHaveAttribute('data-astro-transition', 'forward');
- await expect(h, 'should be absent').not.toHaveAttribute('class', /.*/);
-});
-
-test('Link with data-astro-reload attribute should trigger page load, no tranistion', async ({
- page,
- astro,
-}) => {
- const loads = [];
- page.addListener('load', (p) => {
- loads.push(p.title());
+ h = page.locator('html');
+ await expect(h, 'should have content').toHaveAttribute('lang', 'es');
+ await expect(h, 'should have content').toHaveAttribute('style', 'background-color: green');
+ await expect(h, 'should have content').toHaveAttribute('data-other-name', 'value');
+ await expect(h, 'should have content').toHaveAttribute('data-astro-fake', 'value');
+ await expect(h, 'should have content').toHaveAttribute('data-astro-transition', 'forward');
+ await expect(h, 'should be absent').not.toHaveAttribute('class', /.*/);
});
- // Go to page 4
- await page.goto(astro.resolveUrl('/four'));
- let p = page.locator('#four');
- await expect(p, 'should have content').toHaveText('Page 4');
+ test('Link with data-astro-reload attribute should trigger page load, no tranistion', async ({
+ page,
+ astro,
+ }) => {
+ const loads = [];
+ page.addListener('load', (p) => {
+ loads.push(p.title());
+ });
- // go to page 2
- await page.click('#click-two');
- p = page.locator('#two');
- await expect(p, 'should have content').toHaveText('Page 2');
+ // Go to page 4
+ await page.goto(astro.resolveUrl('/four'));
+ let p = page.locator('#four');
+ await expect(p, 'should have content').toHaveText('Page 4');
- expect(loads.length, 'There should be 2 page load').toEqual(2);
+ // go to page 2
+ await page.click('#click-two');
+ p = page.locator('#two');
+ await expect(p, 'should have content').toHaveText('Page 2');
+
+ expect(loads.length, 'There should be 2 page load').toEqual(2);
+ });
+
+ test('Link with download attribute should trigger download, no transition', async ({
+ page,
+ astro,
+ }) => {
+ // Go to page 4
+ await page.goto(astro.resolveUrl('/four'));
+ let p = page.locator('#four');
+ await expect(p, 'should have content').toHaveText('Page 4');
+
+ // Start waiting for download before clicking. Note no await.
+ const downloadPromise = page.waitForEvent('download', { timeout: 4000 });
+ await page.click('#click-logo');
+ await downloadPromise;
+ });
});
diff --git a/packages/astro/package.json b/packages/astro/package.json
index 5347ca0a4..354a030b5 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -1,6 +1,6 @@
{
"name": "astro",
- "version": "3.0.0-rc.11",
+ "version": "3.0.7",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
@@ -159,6 +159,7 @@
"preferred-pm": "^3.0.3",
"prompts": "^2.4.2",
"rehype": "^12.0.1",
+ "resolve": "^1.22.4",
"semver": "^7.5.4",
"server-destroy": "^1.0.1",
"sharp": "^0.32.5",
@@ -195,6 +196,7 @@
"@types/mime": "^3.0.1",
"@types/mocha": "^10.0.1",
"@types/prompts": "^2.4.4",
+ "@types/resolve": "^1.20.2",
"@types/send": "^0.17.1",
"@types/server-destroy": "^1.0.1",
"@types/unist": "^2.0.7",
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index acf11f3b0..e8801d083 100644
--- a/packages/astro/src/@types/astro.ts
+++ b/packages/astro/src/@types/astro.ts
@@ -975,7 +975,7 @@ export interface AstroUserConfig {
image?: {
/**
* @docs
- * @name image.service (Experimental)
+ * @name image.service
* @type {{entrypoint: 'astro/assets/services/sharp' | 'astro/assets/services/squoosh' | string, config: Record}}
* @default `{entrypoint: 'astro/assets/services/sharp', config?: {}}`
* @version 2.1.0
@@ -999,14 +999,14 @@ export interface AstroUserConfig {
/**
* @docs
- * @name image.domains (Experimental)
+ * @name image.domains
* @type {string[]}
* @default `{domains: []}`
* @version 2.10.10
* @description
* Defines a list of permitted image source domains for local image optimization. No other remote images will be optimized by Astro.
*
- * This option requires an array of individual domain names as strings. Wildcards are not permitted. Instead, use [`image.remotePatterns`](#imageremotepatterns-experimental) to define a list of allowed source URL patterns.
+ * This option requires an array of individual domain names as strings. Wildcards are not permitted. Instead, use [`image.remotePatterns`](#imageremotepatterns) to define a list of allowed source URL patterns.
*
* ```js
* // astro.config.mjs
@@ -1022,7 +1022,7 @@ export interface AstroUserConfig {
/**
* @docs
- * @name image.remotePatterns (Experimental)
+ * @name image.remotePatterns
* @type {RemotePattern[]}
* @default `{remotePatterns: []}`
* @version 2.10.10
diff --git a/packages/astro/src/assets/build/generate.ts b/packages/astro/src/assets/build/generate.ts
index 282db9d6d..b2004fad0 100644
--- a/packages/astro/src/assets/build/generate.ts
+++ b/packages/astro/src/assets/build/generate.ts
@@ -155,12 +155,10 @@ export async function generateImage(
};
}
-export function getStaticImageList(): Iterable<
- [string, { path: string; options: ImageTransform }]
-> {
+export function getStaticImageList(): Map {
if (!globalThis?.astroAsset?.staticImages) {
- return [];
+ return new Map();
}
- return globalThis.astroAsset.staticImages?.entries();
+ return globalThis.astroAsset.staticImages;
}
diff --git a/packages/astro/src/cli/info/index.ts b/packages/astro/src/cli/info/index.ts
index 4944432e7..2ee9ffd0d 100644
--- a/packages/astro/src/cli/info/index.ts
+++ b/packages/astro/src/cli/info/index.ts
@@ -1,7 +1,8 @@
/* eslint-disable no-console */
import * as colors from 'kleur/colors';
+import { execSync } from 'node:child_process';
import { arch, platform } from 'node:os';
-import whichPm from 'which-pm';
+import prompts from 'prompts';
import type yargs from 'yargs-parser';
import { resolveConfig } from '../../core/config/index.js';
import { ASTRO_VERSION } from '../../core/constants.js';
@@ -12,39 +13,93 @@ interface InfoOptions {
}
export async function printInfo({ flags }: InfoOptions) {
+ const rows: Array<[string, string | string[]]> = [
+ ['Astro', `v${ASTRO_VERSION}`],
+ ['Node', process.version],
+ ['System', getSystem()],
+ ['Package Manager', getPackageManager()],
+ ];
+
const inlineConfig = flagsToAstroInlineConfig(flags);
- const packageManager = await whichPm(process.cwd());
- let adapter = "Couldn't determine.";
- let integrations = [];
-
- const MAX_PADDING = 25;
- function printRow(label: string, value: string) {
- const padding = MAX_PADDING - label.length;
- console.log(`${colors.bold(label)}` + ' '.repeat(padding) + `${colors.green(value)}`);
- }
-
try {
const { userConfig } = await resolveConfig(inlineConfig, 'info');
- if (userConfig.adapter?.name) {
- adapter = userConfig.adapter.name;
- }
- if (userConfig.integrations) {
- integrations = (userConfig?.integrations ?? [])
- .filter(Boolean)
- .flat()
- .map((i: any) => i?.name);
- }
- } catch (_e) {}
- console.log();
- const packageManagerName = packageManager?.name ?? "Couldn't determine.";
- printRow('Astro version', `v${ASTRO_VERSION}`);
- printRow('Package manager', packageManagerName);
- printRow('Platform', platform());
- printRow('Architecture', arch());
- printRow('Adapter', adapter);
- let integrationsString = "None or couldn't determine.";
- if (integrations.length > 0) {
- integrationsString = integrations.join(', ');
+ rows.push(['Output', userConfig.output ?? 'static']);
+ rows.push(['Adapter', userConfig.adapter?.name ?? 'none']);
+ const integrations = (userConfig?.integrations ?? [])
+ .filter(Boolean)
+ .flat()
+ .map((i: any) => i?.name)
+ .filter(Boolean);
+ rows.push(['Integrations', integrations.length > 0 ? integrations : 'none']);
+ } catch {}
+
+ let output = '';
+ for (const [label, value] of rows) {
+ output += printRow(label, value);
}
- printRow('Integrations', integrationsString);
+
+ await copyToClipboard(output.trim());
+}
+
+const SUPPORTED_SYSTEM = new Set(['darwin', 'win32']);
+async function copyToClipboard(text: string) {
+ const system = platform();
+ if (!SUPPORTED_SYSTEM.has(system)) return;
+
+ console.log();
+ const { shouldCopy } = await prompts({
+ type: 'confirm',
+ name: 'shouldCopy',
+ message: 'Copy to clipboard?',
+ initial: true,
+ });
+ if (!shouldCopy) return;
+ const command = system === 'darwin' ? 'pbcopy' : 'clip';
+ try {
+ execSync(`echo ${JSON.stringify(text.trim())} | ${command}`, {
+ encoding: 'utf8',
+ stdio: 'ignore',
+ });
+ } catch (e) {
+ console.error(
+ colors.red(`\nSorry, something went wrong!`) + ` Please copy the text above manually.`
+ );
+ }
+}
+
+const PLATFORM_TO_OS: Partial, string>> = {
+ darwin: 'macOS',
+ win32: 'Windows',
+ linux: 'Linux',
+};
+
+function getSystem() {
+ const system = PLATFORM_TO_OS[platform()] ?? platform();
+ return `${system} (${arch()})`;
+}
+
+function getPackageManager() {
+ if (!process.env.npm_config_user_agent) {
+ return 'unknown';
+ }
+ const specifier = process.env.npm_config_user_agent.split(' ')[0];
+ const name = specifier.substring(0, specifier.lastIndexOf('/'));
+ return name === 'npminstall' ? 'cnpm' : name;
+}
+
+const MAX_PADDING = 25;
+function printRow(label: string, value: string | string[]) {
+ const padding = MAX_PADDING - label.length;
+ const [first, ...rest] = Array.isArray(value) ? value : [value];
+ let plaintext = `${label}${' '.repeat(padding)}${first}`;
+ let richtext = `${colors.bold(label)}${' '.repeat(padding)}${colors.green(first)}`;
+ if (rest.length > 0) {
+ for (const entry of rest) {
+ plaintext += `\n${' '.repeat(MAX_PADDING)}${entry}`;
+ richtext += `\n${' '.repeat(MAX_PADDING)}${colors.green(entry)}`;
+ }
+ }
+ plaintext += '\n';
+ console.log(richtext);
+ return plaintext;
}
diff --git a/packages/astro/src/cli/install-package.ts b/packages/astro/src/cli/install-package.ts
index bc3f2df1f..f6af1d346 100644
--- a/packages/astro/src/cli/install-package.ts
+++ b/packages/astro/src/cli/install-package.ts
@@ -1,9 +1,9 @@
import boxen from 'boxen';
import { execa } from 'execa';
import { bold, cyan, dim, magenta } from 'kleur/colors';
-import { createRequire } from 'node:module';
import ora from 'ora';
import prompts from 'prompts';
+import resolvePackage from 'resolve';
import whichPm from 'which-pm';
import { type Logger } from '../core/logger/core.js';
@@ -18,11 +18,9 @@ export async function getPackage(
options: GetPackageOptions,
otherDeps: string[] = []
): Promise {
- const require = createRequire(options.cwd ?? process.cwd());
-
let packageImport;
try {
- require.resolve(packageName, { paths: [options.cwd ?? process.cwd()] });
+ await tryResolve(packageName, options.cwd ?? process.cwd());
// The `require.resolve` is required as to avoid Node caching the failed `import`
packageImport = await import(packageName);
@@ -43,6 +41,24 @@ export async function getPackage(
return packageImport as T;
}
+function tryResolve(packageName: string, cwd: string) {
+ return new Promise((resolve, reject) => {
+ resolvePackage(
+ packageName,
+ {
+ basedir: cwd,
+ },
+ (err) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(0);
+ }
+ }
+ );
+ });
+}
+
function getInstallCommand(packages: string[], packageManager: string) {
switch (packageManager) {
case 'npm':
diff --git a/packages/astro/src/core/app/index.ts b/packages/astro/src/core/app/index.ts
index 71a8da439..a3af4bcdd 100644
--- a/packages/astro/src/core/app/index.ts
+++ b/packages/astro/src/core/app/index.ts
@@ -56,8 +56,6 @@ export class App {
});
#baseWithoutTrailingSlash: string;
#pipeline: SSRRoutePipeline;
- #onRequest: MiddlewareEndpointHandler | undefined;
- #middlewareLoaded: boolean;
#adapterLogger: AstroIntegrationLogger;
constructor(manifest: SSRManifest, streaming = true) {
@@ -68,7 +66,6 @@ export class App {
this.#routeDataToRouteInfo = new Map(manifest.routes.map((route) => [route.routeData, route]));
this.#baseWithoutTrailingSlash = removeTrailingForwardSlash(this.#manifest.base);
this.#pipeline = new SSRRoutePipeline(this.#createEnvironment(streaming));
- this.#middlewareLoaded = false;
this.#adapterLogger = new AstroIntegrationLogger(
this.#logger.options,
this.#manifest.adapterName
@@ -137,20 +134,7 @@ export class App {
return routeData;
}
- async #getOnRequest() {
- if (this.#manifest.middlewareEntryPoint && !this.#middlewareLoaded) {
- try {
- const middleware = await import(this.#manifest.middlewareEntryPoint);
- this.#pipeline.setMiddlewareFunction(middleware.onRequest as MiddlewareEndpointHandler);
- } catch (e) {
- this.#logger.warn('SSR', "Couldn't load the middleware entry point");
- }
- }
- this.#middlewareLoaded = true;
- }
-
async render(request: Request, routeData?: RouteData, locals?: object): Promise {
- await this.#getOnRequest();
// Handle requests with duplicate slashes gracefully by cloning with a cleaned-up request URL
if (request.url !== collapseDuplicateSlashes(request.url)) {
request = new Request(collapseDuplicateSlashes(request.url), request);
@@ -178,6 +162,9 @@ export class App {
);
let response;
try {
+ if (mod.onRequest) {
+ this.#pipeline.setMiddlewareFunction(mod.onRequest as MiddlewareEndpointHandler);
+ }
response = await this.#pipeline.renderRoute(renderContext, pageModule);
} catch (err: any) {
if (err instanceof EndpointNotFoundError) {
@@ -295,6 +282,9 @@ export class App {
status
);
const page = (await mod.page()) as any;
+ if (mod.onRequest) {
+ this.#pipeline.setMiddlewareFunction(mod.onRequest as MiddlewareEndpointHandler);
+ }
const response = await this.#pipeline.renderRoute(newRenderContext, page);
return this.#mergeResponses(response, originalResponse);
} catch {}
@@ -319,7 +309,7 @@ export class App {
const { statusText, headers } = oldResponse;
- // If the the new response did not have a meaningful status, an override may have been provided
+ // If the new response did not have a meaningful status, an override may have been provided
// If the original status was 200 (default), override it with the new status (probably 404 or 500)
// Otherwise, the user set a specific status while rendering and we should respect that one
const status = override?.status
diff --git a/packages/astro/src/core/app/types.ts b/packages/astro/src/core/app/types.ts
index faeb9377e..8812d2c44 100644
--- a/packages/astro/src/core/app/types.ts
+++ b/packages/astro/src/core/app/types.ts
@@ -49,7 +49,6 @@ export type SSRManifest = {
componentMetadata: SSRResult['componentMetadata'];
pageModule?: SinglePageBuiltModule;
pageMap?: Map;
- middlewareEntryPoint: string | undefined;
};
export type SerializedSSRManifest = Omit<
diff --git a/packages/astro/src/core/build/buildPipeline.ts b/packages/astro/src/core/build/buildPipeline.ts
index 1956eede7..ba1bfad0e 100644
--- a/packages/astro/src/core/build/buildPipeline.ts
+++ b/packages/astro/src/core/build/buildPipeline.ts
@@ -78,13 +78,6 @@ export class BuildPipeline extends Pipeline {
return this.#manifest;
}
- async retrieveMiddlewareFunction() {
- if (this.#internals.middlewareEntryPoint) {
- const middleware = await import(this.#internals.middlewareEntryPoint.toString());
- this.setMiddlewareFunction(middleware.onRequest);
- }
- }
-
getLogger(): Logger {
return this.getEnvironment().logger;
}
diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts
index 53a350342..5fe670e99 100644
--- a/packages/astro/src/core/build/generate.ts
+++ b/packages/astro/src/core/build/generate.ts
@@ -10,6 +10,7 @@ import type {
ComponentInstance,
GetStaticPathsItem,
ImageTransform,
+ MiddlewareEndpointHandler,
RouteData,
RouteType,
SSRError,
@@ -135,7 +136,7 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn
);
}
const pipeline = new BuildPipeline(opts, internals, manifest);
- await pipeline.retrieveMiddlewareFunction();
+
const outFolder = ssr
? opts.settings.config.build.server
: getOutDirWithinCwd(opts.settings.config.outDir);
@@ -195,9 +196,20 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn
}
}
- logger.info(null, `\n${bgGreen(black(` generating optimized images `))}`);
- for (const imageData of getStaticImageList()) {
- await generateImage(pipeline, imageData[1].options, imageData[1].path);
+ const staticImageList = getStaticImageList();
+
+ if (staticImageList.size)
+ logger.info(null, `\n${bgGreen(black(` generating optimized images `))}`);
+ let count = 0;
+ for (const imageData of staticImageList.entries()) {
+ count++;
+ await generateImage(
+ pipeline,
+ imageData[1].options,
+ imageData[1].path,
+ count,
+ staticImageList.size
+ );
}
delete globalThis?.astroAsset?.addStaticImage;
@@ -210,7 +222,13 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn
logger.info(null, dim(`Completed in ${getTimeStat(timer, performance.now())}.\n`));
}
-async function generateImage(pipeline: BuildPipeline, transform: ImageTransform, path: string) {
+async function generateImage(
+ pipeline: BuildPipeline,
+ transform: ImageTransform,
+ path: string,
+ count: number,
+ totalCount: number
+) {
const logger = pipeline.getLogger();
let timeStart = performance.now();
const generationData = await generateImageInternal(pipeline, transform, path);
@@ -224,8 +242,12 @@ async function generateImage(pipeline: BuildPipeline, transform: ImageTransform,
const timeIncrease = `(+${timeChange})`;
const statsText = generationData.cached
? `(reused cache entry)`
- : `(before: ${generationData.weight.before}kb, after: ${generationData.weight.after}kb)`;
- logger.info(null, ` ${green('▶')} ${path} ${dim(statsText)} ${dim(timeIncrease)}`);
+ : `(before: ${generationData.weight.before}kB, after: ${generationData.weight.after}kB)`;
+ const counter = `(${count}/${totalCount})`;
+ logger.info(
+ null,
+ ` ${green('▶')} ${path} ${dim(statsText)} ${dim(timeIncrease)} ${dim(counter)}`
+ );
}
async function generatePage(
@@ -247,7 +269,10 @@ async function generatePage(
.reduce(mergeInlineCss, []);
const pageModulePromise = ssrEntry.page;
-
+ const onRequest = ssrEntry.onRequest;
+ if (onRequest) {
+ pipeline.setMiddlewareFunction(onRequest as MiddlewareEndpointHandler);
+ }
if (!pageModulePromise) {
throw new Error(
`Unable to find the module for ${pageData.component}. This is unexpected and likely a bug in Astro, please report.`
@@ -604,8 +629,5 @@ export function createBuildManifest(
? new URL(settings.config.base, settings.config.site).toString()
: settings.config.site,
componentMetadata: internals.componentMetadata,
- middlewareEntryPoint: internals.middlewareEntryPoint
- ? internals.middlewareEntryPoint.toString()
- : undefined,
};
}
diff --git a/packages/astro/src/core/build/index.ts b/packages/astro/src/core/build/index.ts
index 013d83a5b..5280e69e3 100644
--- a/packages/astro/src/core/build/index.ts
+++ b/packages/astro/src/core/build/index.ts
@@ -242,6 +242,10 @@ class AstroBuilder {
'The option `build.split` won\'t take effect, because `output` is not `"server"` or `"hybrid"`.'
);
}
+ this.logger.warn(
+ 'configuration',
+ 'The option `build.split` is deprecated. Use the adapter options.'
+ );
}
if (config.build.excludeMiddleware === true) {
if (config.output === 'static') {
@@ -250,14 +254,10 @@ class AstroBuilder {
'The option `build.excludeMiddleware` won\'t take effect, because `output` is not `"server"` or `"hybrid"`.'
);
}
- }
-
- if (config.build.split === true) {
- if (config.output !== 'server') {
- throw new Error(
- 'The option `build.split` can only be used when `output` is set to `"server"`.'
- );
- }
+ this.logger.warn(
+ 'configuration',
+ 'The option `build.excludeMiddleware` is deprecated. Use the adapter options.'
+ );
}
}
diff --git a/packages/astro/src/core/build/plugins/plugin-manifest.ts b/packages/astro/src/core/build/plugins/plugin-manifest.ts
index 7f6846a63..5a1a3ce76 100644
--- a/packages/astro/src/core/build/plugins/plugin-manifest.ts
+++ b/packages/astro/src/core/build/plugins/plugin-manifest.ts
@@ -237,9 +237,6 @@ function buildManifest(
// Set this to an empty string so that the runtime knows not to try and load this.
entryModules[BEFORE_HYDRATION_SCRIPT_ID] = '';
}
- const isEdgeMiddleware =
- // TODO: remove in Astro 4.0
- settings.config.build.excludeMiddleware || settings.adapter?.adapterFeatures?.edgeMiddleware;
const ssrManifest: SerializedSSRManifest = {
adapterName: opts.settings.adapter?.name ?? '',
@@ -253,9 +250,6 @@ function buildManifest(
clientDirectives: Array.from(settings.clientDirectives),
entryModules,
assets: staticFiles.map(prefixAssetPath),
- middlewareEntryPoint: !isEdgeMiddleware
- ? internals.middlewareEntryPoint?.toString()
- : undefined,
};
return ssrManifest;
diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts
index 44fc31155..33462050a 100644
--- a/packages/astro/src/core/build/plugins/plugin-ssr.ts
+++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts
@@ -148,7 +148,10 @@ function vitePluginSSRSplit(
if (options.settings.config.build.split || functionPerRouteEnabled) {
const inputs = new Set();
- for (const path of Object.keys(options.allPages)) {
+ for (const [path, pageData] of Object.entries(options.allPages)) {
+ if (routeIsRedirect(pageData.route)) {
+ continue;
+ }
inputs.add(getVirtualModulePageNameFromPath(SPLIT_MODULE_ID, path));
}
diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts
index 0bfb4e3ae..c37ad542e 100644
--- a/packages/astro/src/core/build/static-build.ts
+++ b/packages/astro/src/core/build/static-build.ts
@@ -172,7 +172,21 @@ async function ssrBuild(
format: 'esm',
// Server chunks can't go in the assets (_astro) folder
// We need to keep these separate
- chunkFileNames: `chunks/[name].[hash].mjs`,
+ chunkFileNames(chunkInfo) {
+ const { name } = chunkInfo;
+ // Sometimes chunks have the `@_@astro` suffix due to SSR logic. Remove it!
+ // TODO: refactor our build logic to avoid this
+ if (name.includes(ASTRO_PAGE_EXTENSION_POST_PATTERN)) {
+ const [sanitizedName] = name.split(ASTRO_PAGE_EXTENSION_POST_PATTERN);
+ return `chunks/${sanitizedName}_[hash].mjs`;
+ }
+ // Injected routes include "pages/[name].[ext]" already. Clean those up!
+ if (name.startsWith('pages/')) {
+ const sanitizedName = name.split('.')[0];
+ return `chunks/${sanitizedName}_[hash].mjs`;
+ }
+ return `chunks/[name]_[hash].mjs`;
+ },
assetFileNames: `${settings.config.build.assets}/[name].[hash][extname]`,
...viteConfig.build?.rollupOptions?.output,
entryFileNames(chunkInfo) {
@@ -189,7 +203,7 @@ async function ssrBuild(
} else if (chunkInfo.facadeModuleId === RESOLVED_RENDERERS_MODULE_ID) {
return 'renderers.mjs';
} else if (chunkInfo.facadeModuleId === RESOLVED_SSR_MANIFEST_VIRTUAL_MODULE_ID) {
- return 'manifest.[hash].mjs';
+ return 'manifest_[hash].mjs';
} else {
return '[name].mjs';
}
diff --git a/packages/astro/src/core/build/types.ts b/packages/astro/src/core/build/types.ts
index c45249e7e..07f2404bc 100644
--- a/packages/astro/src/core/build/types.ts
+++ b/packages/astro/src/core/build/types.ts
@@ -4,6 +4,7 @@ import type {
AstroSettings,
ComponentInstance,
ManifestData,
+ MiddlewareHandler,
RouteData,
RuntimeMode,
SSRLoadedRenderer,
@@ -51,6 +52,7 @@ export interface SinglePageBuiltModule {
/**
* The `onRequest` hook exported by the middleware
*/
+ onRequest?: MiddlewareHandler;
renderers: SSRLoadedRenderer[];
}
diff --git a/packages/astro/src/core/redirects/component.ts b/packages/astro/src/core/redirects/component.ts
index 93b1aa732..ae4dbb4fe 100644
--- a/packages/astro/src/core/redirects/component.ts
+++ b/packages/astro/src/core/redirects/component.ts
@@ -12,5 +12,6 @@ export const RedirectComponentInstance: ComponentInstance = {
export const RedirectSinglePageBuiltModule: SinglePageBuiltModule = {
page: () => Promise.resolve(RedirectComponentInstance),
+ onRequest: (_, next) => next(),
renderers: [],
};
diff --git a/packages/astro/src/core/routing/params.ts b/packages/astro/src/core/routing/params.ts
index fc05c9696..1e6b16858 100644
--- a/packages/astro/src/core/routing/params.ts
+++ b/packages/astro/src/core/routing/params.ts
@@ -1,4 +1,5 @@
import type { GetStaticPathsItem, Params, RouteData } from '../../@types/astro';
+import { trimSlashes } from '../path.js';
import { validateGetStaticPathsParameter } from './validation.js';
/**
@@ -32,7 +33,9 @@ export function stringifyParams(params: GetStaticPathsItem['params'], route: Rou
const validatedParams = Object.entries(params).reduce((acc, next) => {
validateGetStaticPathsParameter(next, route.component);
const [key, value] = next;
- acc[key] = value?.toString();
+ if (value !== undefined) {
+ acc[key] = typeof value === 'string' ? trimSlashes(value) : value.toString();
+ }
return acc;
}, {} as Params);
diff --git a/packages/astro/src/integrations/index.ts b/packages/astro/src/integrations/index.ts
index 9b7770c1c..774ea5b04 100644
--- a/packages/astro/src/integrations/index.ts
+++ b/packages/astro/src/integrations/index.ts
@@ -73,6 +73,7 @@ export async function runHookConfigSetup({
let updatedConfig: AstroConfig = { ...settings.config };
let updatedSettings: AstroSettings = { ...settings, config: updatedConfig };
let addedClientDirectives = new Map>();
+ let astroJSXRenderer: AstroRenderer | null = null;
for (const integration of settings.config.integrations) {
/**
@@ -103,7 +104,11 @@ export async function runHookConfigSetup({
throw new Error(`Renderer ${bold(renderer.name)} does not provide a serverEntrypoint.`);
}
- updatedSettings.renderers.push(renderer);
+ if (renderer.name === 'astro:jsx') {
+ astroJSXRenderer = renderer;
+ } else {
+ updatedSettings.renderers.push(renderer);
+ }
},
injectScript: (stage, content) => {
updatedSettings.scripts.push({ stage, content });
@@ -174,6 +179,11 @@ export async function runHookConfigSetup({
}
}
+ // The astro:jsx renderer should come last, to not interfere with others.
+ if (astroJSXRenderer) {
+ updatedSettings.renderers.push(astroJSXRenderer);
+ }
+
updatedSettings.config = updatedConfig;
return updatedSettings;
}
diff --git a/packages/astro/src/vite-plugin-astro-server/plugin.ts b/packages/astro/src/vite-plugin-astro-server/plugin.ts
index 26568715b..80da6d787 100644
--- a/packages/astro/src/vite-plugin-astro-server/plugin.ts
+++ b/packages/astro/src/vite-plugin-astro-server/plugin.ts
@@ -99,6 +99,5 @@ export function createDevelopmentManifest(settings: AstroSettings): SSRManifest
? new URL(settings.config.base, settings.config.site).toString()
: settings.config.site,
componentMetadata: new Map(),
- middlewareEntryPoint: undefined,
};
}
diff --git a/packages/astro/test/fixtures/ssr-split-manifest/astro.config.mjs b/packages/astro/test/fixtures/ssr-split-manifest/astro.config.mjs
index 171de39d9..e5e10bd9b 100644
--- a/packages/astro/test/fixtures/ssr-split-manifest/astro.config.mjs
+++ b/packages/astro/test/fixtures/ssr-split-manifest/astro.config.mjs
@@ -1,7 +1,7 @@
import { defineConfig } from 'astro/config';
export default defineConfig({
- build: {
- split: true
- },
- output: "server"
-})
\ No newline at end of file
+ output: "server",
+ redirects: {
+ "/redirect": "/"
+ }
+})
diff --git a/packages/astro/test/fixtures/ssr-split-manifest/src/pages/index.astro b/packages/astro/test/fixtures/ssr-split-manifest/src/pages/index.astro
index f189e711c..d8f84c663 100644
--- a/packages/astro/test/fixtures/ssr-split-manifest/src/pages/index.astro
+++ b/packages/astro/test/fixtures/ssr-split-manifest/src/pages/index.astro
@@ -11,7 +11,7 @@ import { manifest } from 'astro:ssr-manifest';
- Testing
+ Testing index