diff --git a/.changeset/pre.json b/.changeset/pre.json
index 50eeffb37363..9e9ee0ffa067 100644
--- a/.changeset/pre.json
+++ b/.changeset/pre.json
@@ -32,15 +32,30 @@
"@astrojs/upgrade": "0.3.1"
},
"changesets": [
+ "blue-boats-relax",
"chatty-teachers-sit",
+ "eighty-boxes-applaud",
+ "fair-rats-fail",
+ "healthy-ads-scream",
+ "itchy-toys-march",
+ "long-months-burn",
+ "many-garlics-lick",
"mighty-trees-teach",
+ "modern-bears-deny",
"new-pillows-kick",
+ "odd-donuts-impress",
+ "perfect-fans-fly",
"poor-frogs-dream",
"quick-ads-exercise",
+ "selfish-impalas-grin",
"small-ties-sort",
"smart-comics-doubt",
+ "smooth-melons-cough",
"spicy-houses-fry",
+ "spotty-garlics-cheat",
"ten-students-repair",
- "weak-dancers-beam"
+ "tiny-lamps-lick",
+ "weak-dancers-beam",
+ "weak-masks-do"
]
}
diff --git a/examples/basics/package.json b/examples/basics/package.json
index 3390c86343ab..a2ea0042661a 100644
--- a/examples/basics/package.json
+++ b/examples/basics/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/blog/package.json b/examples/blog/package.json
index e3c9c3bb9767..d71b2577340f 100644
--- a/examples/blog/package.json
+++ b/examples/blog/package.json
@@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/mdx": "^4.0.0-alpha.0",
+ "@astrojs/mdx": "^4.0.0-alpha.1",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/component/package.json b/examples/component/package.json
index 9ef977a493e5..95330b51da42 100644
--- a/examples/component/package.json
+++ b/examples/component/package.json
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
},
"peerDependencies": {
"astro": "^4.0.0"
diff --git a/examples/container-with-vitest/package.json b/examples/container-with-vitest/package.json
index b062065f6557..d3bfa492e7e3 100644
--- a/examples/container-with-vitest/package.json
+++ b/examples/container-with-vitest/package.json
@@ -12,7 +12,7 @@
"test": "vitest run"
},
"dependencies": {
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"@astrojs/react": "^3.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json
index 3d494a88f6d1..3f708ecd2f73 100644
--- a/examples/framework-alpine/package.json
+++ b/examples/framework-alpine/package.json
@@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.14.1",
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json
index ec4d835ecfc5..d8401e1ea26a 100644
--- a/examples/framework-multiple/package.json
+++ b/examples/framework-multiple/package.json
@@ -18,7 +18,7 @@
"@astrojs/vue": "^5.0.0-alpha.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"preact": "^10.23.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json
index c2635c093e5a..3378f2176467 100644
--- a/examples/framework-preact/package.json
+++ b/examples/framework-preact/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.1",
"@preact/signals": "^1.3.0",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"preact": "^10.23.2"
}
}
diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json
index f1585c4c10ba..2169c8d1bd55 100644
--- a/examples/framework-react/package.json
+++ b/examples/framework-react/package.json
@@ -14,7 +14,7 @@
"@astrojs/react": "^3.6.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json
index 05e6ec738b5d..497e1c053259 100644
--- a/examples/framework-solid/package.json
+++ b/examples/framework-solid/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.4.1",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"solid-js": "^1.8.21"
}
}
diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json
index 1cec15cbc1d2..1b574a3936ef 100644
--- a/examples/framework-svelte/package.json
+++ b/examples/framework-svelte/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^6.0.0-alpha.0",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"svelte": "^4.2.18"
}
}
diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json
index ad8546684e58..a15c97ed9389 100644
--- a/examples/framework-vue/package.json
+++ b/examples/framework-vue/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^5.0.0-alpha.0",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"vue": "^3.4.38"
}
}
diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json
index 4b6a2af106dc..16c6db4240f1 100644
--- a/examples/hackernews/package.json
+++ b/examples/hackernews/package.json
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/node": "^9.0.0-alpha.0",
- "astro": "^5.0.0-alpha.0"
+ "@astrojs/node": "^9.0.0-alpha.1",
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/integration/package.json b/examples/integration/package.json
index 2b5f62ef3ab2..7932238e5bce 100644
--- a/examples/integration/package.json
+++ b/examples/integration/package.json
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
},
"peerDependencies": {
"astro": "^4.0.0"
diff --git a/examples/middleware/package.json b/examples/middleware/package.json
index 4c7fa55dedb8..6cb2acf33455 100644
--- a/examples/middleware/package.json
+++ b/examples/middleware/package.json
@@ -12,8 +12,8 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
- "@astrojs/node": "^9.0.0-alpha.0",
- "astro": "^5.0.0-alpha.0",
+ "@astrojs/node": "^9.0.0-alpha.1",
+ "astro": "^5.0.0-alpha.1",
"html-minifier": "^4.0.0"
},
"devDependencies": {
diff --git a/examples/minimal/package.json b/examples/minimal/package.json
index d18bbd27a3a7..e139db2f69eb 100644
--- a/examples/minimal/package.json
+++ b/examples/minimal/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json
index f5e09395a14e..a56c8c1cc81b 100644
--- a/examples/non-html-pages/package.json
+++ b/examples/non-html-pages/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json
index b0620901ec10..0d155084576c 100644
--- a/examples/portfolio/package.json
+++ b/examples/portfolio/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/server-islands/package.json b/examples/server-islands/package.json
index 96ac136abc22..72b53fda82aa 100644
--- a/examples/server-islands/package.json
+++ b/examples/server-islands/package.json
@@ -10,14 +10,14 @@
"astro": "astro"
},
"devDependencies": {
- "@astrojs/node": "^9.0.0-alpha.0",
+ "@astrojs/node": "^9.0.0-alpha.1",
"@astrojs/react": "^3.6.2",
"@astrojs/tailwind": "^6.0.0-alpha.0",
"@fortawesome/fontawesome-free": "^6.6.0",
"@tailwindcss/forms": "^0.5.7",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"postcss": "^8.4.41",
"react": "^18.3.1",
"react-dom": "^18.3.1",
diff --git a/examples/ssr/package.json b/examples/ssr/package.json
index cb9e2a4cb061..ba422fa90922 100644
--- a/examples/ssr/package.json
+++ b/examples/ssr/package.json
@@ -12,9 +12,9 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
- "@astrojs/node": "^9.0.0-alpha.0",
+ "@astrojs/node": "^9.0.0-alpha.1",
"@astrojs/svelte": "^6.0.0-alpha.0",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"svelte": "^4.2.18"
}
}
diff --git a/examples/starlog/package.json b/examples/starlog/package.json
index 9e03a65ad4fe..45d298fac457 100644
--- a/examples/starlog/package.json
+++ b/examples/starlog/package.json
@@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"sass": "^1.77.8",
"sharp": "^0.33.3"
}
diff --git a/examples/toolbar-app/package.json b/examples/toolbar-app/package.json
index fb8551ae65bc..a7976df55361 100644
--- a/examples/toolbar-app/package.json
+++ b/examples/toolbar-app/package.json
@@ -15,6 +15,6 @@
"./app": "./dist/app.js"
},
"devDependencies": {
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json
index f568ec7a1ac3..3a3b67d8e6a3 100644
--- a/examples/view-transitions/package.json
+++ b/examples/view-transitions/package.json
@@ -11,7 +11,7 @@
},
"devDependencies": {
"@astrojs/tailwind": "^6.0.0-alpha.0",
- "@astrojs/node": "^9.0.0-alpha.0",
- "astro": "^5.0.0-alpha.0"
+ "@astrojs/node": "^9.0.0-alpha.1",
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json
index 23a78a6acd69..36fdb34222b3 100644
--- a/examples/with-markdoc/package.json
+++ b/examples/with-markdoc/package.json
@@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^1.0.0-alpha.0",
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json
index f444977132f5..528121e749a3 100644
--- a/examples/with-markdown-plugins/package.json
+++ b/examples/with-markdown-plugins/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^6.0.0-alpha.0",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json
index 1e5a875cc598..978a769691e6 100644
--- a/examples/with-markdown-shiki/package.json
+++ b/examples/with-markdown-shiki/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.0.0-alpha.0"
+ "astro": "^5.0.0-alpha.1"
}
}
diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json
index d5d61d16db95..3e16ae7e0007 100644
--- a/examples/with-mdx/package.json
+++ b/examples/with-mdx/package.json
@@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/mdx": "^4.0.0-alpha.0",
+ "@astrojs/mdx": "^4.0.0-alpha.1",
"@astrojs/preact": "^3.5.1",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"preact": "^10.23.2"
}
}
diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json
index db6080d09fa3..801e23b919c7 100644
--- a/examples/with-nanostores/package.json
+++ b/examples/with-nanostores/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.1",
"@nanostores/preact": "^0.5.2",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"nanostores": "^0.11.2",
"preact": "^10.23.2"
}
diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json
index 5fc07f1de8a7..368c7ca9f5a7 100644
--- a/examples/with-tailwindcss/package.json
+++ b/examples/with-tailwindcss/package.json
@@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/mdx": "^4.0.0-alpha.0",
+ "@astrojs/mdx": "^4.0.0-alpha.1",
"@astrojs/tailwind": "^6.0.0-alpha.0",
"@types/canvas-confetti": "^1.6.4",
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"autoprefixer": "^10.4.20",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.41",
diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json
index 40ea3ea32b81..c8462a1d25f3 100644
--- a/examples/with-vitest/package.json
+++ b/examples/with-vitest/package.json
@@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
- "astro": "^5.0.0-alpha.0",
+ "astro": "^5.0.0-alpha.1",
"vitest": "^2.0.5"
}
}
diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md
index 1a9256585297..cbd3aedc0ea0 100644
--- a/packages/astro/CHANGELOG.md
+++ b/packages/astro/CHANGELOG.md
@@ -1,5 +1,136 @@
# astro
+## 5.0.0-alpha.1
+
+### Major Changes
+
+- [#11798](https://github.com/withastro/astro/pull/11798) [`e9e2139`](https://github.com/withastro/astro/commit/e9e2139bf788893566f5a3fe58daf1d24076f018) Thanks [@matthewp](https://github.com/matthewp)! - Unflag globalRoutePriority
+
+ The previously [experimental feature `globalRoutePriority`](https://docs.astro.build/en/reference/configuration-reference/#experimentalglobalroutepriority) is now the default in Astro 5.
+
+ This was a refactoring of route prioritization in Astro, making it so that injected routes, file-based routes, and redirects are all prioritized using the same logic. This feature has been enabled for all Starlight projects since it was added and should not affect most users.
+
+- [#11679](https://github.com/withastro/astro/pull/11679) [`ea71b90`](https://github.com/withastro/astro/commit/ea71b90c9c08ddd1d3397c78e2e273fb799f7dbd) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - The [`astro:env` feature introduced behind a flag](https://docs.astro.build/en/reference/configuration-reference/#experimentalglobalroutepriority) in [v4.10.0](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md#x4100) is no longer experimental and is available for general use. If you have been waiting for stabilization before using `astro:env`, you can now do so.
+
+ This feature lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client.
+
+ To configure a schema, add the `env` option to your Astro config and define your client and server variables. If you were previously using this feature, please remove the experimental flag from your Astro config and move your entire `env` configuration unchanged to a top-level option.
+
+ ```js
+ import { defineConfig, envField } from 'astro/config';
+
+ export default defineConfig({
+ env: {
+ schema: {
+ API_URL: envField.string({ context: 'client', access: 'public', optional: true }),
+ PORT: envField.number({ context: 'server', access: 'public', default: 4321 }),
+ API_SECRET: envField.string({ context: 'server', access: 'secret' }),
+ },
+ },
+ });
+ ```
+
+ You can import and use your defined variables from the appropriate `/client` or `/server` module:
+
+ ```astro
+ ---
+ import { API_URL } from 'astro:env/client';
+ import { API_SECRET_TOKEN } from 'astro:env/server';
+
+ const data = await fetch(`${API_URL}/users`, {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: `Bearer ${API_SECRET_TOKEN}`,
+ },
+ });
+ ---
+
+
+ ```
+
+
+- [#11788](https://github.com/withastro/astro/pull/11788) [`7c0ccfc`](https://github.com/withastro/astro/commit/7c0ccfc26947b178584e3476584bcaa490c6ba86) Thanks [@ematipico](https://github.com/ematipico)! - Updates the default value of `security.checkOrigin` to `true`, which enables Cross-Site Request Forgery (CSRF) protection by default for pages rendered on demand.
+
+ If you had previously configured `security.checkOrigin: true`, you no longer need this set in your Astro config. This is now the default and it is safe to remove.
+
+ To disable this behavior and opt out of automatically checking that the “origin” header matches the URL sent by each request, you must explicitly set `security.checkOrigin: false`:
+
+ ```diff
+ export default defineConfig({
+ + security: {
+ + checkOrigin: false
+ + }
+ })
+ ```
+
+- [#11741](https://github.com/withastro/astro/pull/11741) [`6617491`](https://github.com/withastro/astro/commit/6617491c3bc2bde87f7867d7dec2580781852cfc) Thanks [@bluwy](https://github.com/bluwy)! - Removes internal JSX handling and moves the responsibility to the `@astrojs/mdx` package directly. The following exports are also now removed:
+
+ - `astro/jsx/babel.js`
+ - `astro/jsx/component.js`
+ - `astro/jsx/index.js`
+ - `astro/jsx/renderer.js`
+ - `astro/jsx/server.js`
+ - `astro/jsx/transform-options.js`
+
+ If your project includes `.mdx` files, you must upgrade `@astrojs/mdx` to the latest version so that it doesn't rely on these entrypoints to handle your JSX.
+
+- [#11782](https://github.com/withastro/astro/pull/11782) [`9a2aaa0`](https://github.com/withastro/astro/commit/9a2aaa01ea427df3844bce8595207809a8d2cb94) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Makes the `compiledContent` property of Markdown content an async function, this change should fix underlying issues where sometimes when using a custom image service and images inside Markdown, Node would exit suddenly without any error message.
+
+ ```diff
+ ---
+ import * as myPost from "../post.md";
+
+ - const content = myPost.compiledContent();
+ + const content = await myPost.compiledContent();
+ ---
+
+
+ ```
+
+- [#11770](https://github.com/withastro/astro/pull/11770) [`cfa6a47`](https://github.com/withastro/astro/commit/cfa6a47ac7a541f99fdad46a68d0cca6e5816cd5) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Removed support for the Squoosh image service. As the underlying library `libsquoosh` is no longer maintained, and the image service sees very little usage we have decided to remove it from Astro.
+
+ Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained.
+
+ ```diff
+ - import { squooshImageService } from "astro/config";
+ import { defineConfig } from "astro/config";
+
+ export default defineConfig({
+ - image: {
+ - service: squooshImageService()
+ - }
+ });
+ ```
+
+ If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: https://github.com/Princesseuh/astro-image-service-squoosh
+
+### Patch Changes
+
+- [#11780](https://github.com/withastro/astro/pull/11780) [`c6622ad`](https://github.com/withastro/astro/commit/c6622adaeb405e961b12c91f0e5d02c7333d01cf) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Deprecates the Squoosh image service, to be removed in Astro 5.0. We recommend migrating to the default Sharp service.
+
+- [#11732](https://github.com/withastro/astro/pull/11732) [`4cd6c43`](https://github.com/withastro/astro/commit/4cd6c43e221e40345dfb433f9c63395f886091fd) Thanks [@matthewp](https://github.com/matthewp)! - Use GET requests with preloading for Server Islands
+
+ Server Island requests include the props used to render the island as well as any slots passed in (excluding the fallback slot). Since browsers have a max 4mb URL length we default to using a POST request to avoid overflowing this length.
+
+ However in reality most usage of Server Islands are fairly isolated and won't exceed this limit, so a GET request is possible by passing this same information via search parameters.
+
+ Using GET means we can also include a `` tag to speed up the request.
+
+ This change implements this, with safe fallback to POST.
+
+- [#11773](https://github.com/withastro/astro/pull/11773) [`86a3391`](https://github.com/withastro/astro/commit/86a33915ff41b23ff6b35bcfb1805fefc0760ca7) Thanks [@ematipico](https://github.com/ematipico)! - Changes messages logged when using unsupported, deprecated, or experimental adapter features for clarity
+
+- [#11774](https://github.com/withastro/astro/pull/11774) [`c6400ab`](https://github.com/withastro/astro/commit/c6400ab99c5e5f4477bc6ef7e801b7869b0aa9ab) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes the path returned by `injectTypes`
+
+- [#11771](https://github.com/withastro/astro/pull/11771) [`49650a4`](https://github.com/withastro/astro/commit/49650a45550af46c70c6cf3f848b7b529103a649) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes an error thrown by `astro sync` when an `astro:env` virtual module is imported inside the Content Collections config
+
+- [#11744](https://github.com/withastro/astro/pull/11744) [`b677429`](https://github.com/withastro/astro/commit/b67742961a384c10e5cd04cf5b02d0f014ea7362) Thanks [@bluwy](https://github.com/bluwy)! - Disables the WebSocket server when creating a Vite server for loading config files
+
## 5.0.0-alpha.0
### Major Changes
diff --git a/packages/astro/e2e/server-islands.test.js b/packages/astro/e2e/server-islands.test.js
index 6fa92f40a03a..b45a58cd8e04 100644
--- a/packages/astro/e2e/server-islands.test.js
+++ b/packages/astro/e2e/server-islands.test.js
@@ -51,7 +51,10 @@ test.describe('Server islands', () => {
await expect(el).toHaveCount(2);
});
- test('Large islands that exceed URL length still work through POST', async ({ page, astro }) => {
+ test('Large islands that exceed URL length still work through POST', async ({
+ page,
+ astro,
+ }) => {
await page.goto(astro.resolveUrl('/base/'));
let el = page.locator('#basics .island');
diff --git a/packages/astro/package.json b/packages/astro/package.json
index 4dabd22c8ee5..89034d6fa3fa 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -1,6 +1,6 @@
{
"name": "astro",
- "version": "5.0.0-alpha.0",
+ "version": "5.0.0-alpha.1",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
diff --git a/packages/astro/src/core/config/schema.ts b/packages/astro/src/core/config/schema.ts
index 067790a660a1..4e630b1967a7 100644
--- a/packages/astro/src/core/config/schema.ts
+++ b/packages/astro/src/core/config/schema.ts
@@ -82,7 +82,7 @@ export const ASTRO_CONFIG_DEFAULTS = {
legacy: {},
redirects: {},
security: {
- checkOrigin: true
+ checkOrigin: true,
},
env: {
schema: {},
diff --git a/packages/astro/src/core/routing/manifest/create.ts b/packages/astro/src/core/routing/manifest/create.ts
index e45c926af60e..858c2b9f2e6e 100644
--- a/packages/astro/src/core/routing/manifest/create.ts
+++ b/packages/astro/src/core/routing/manifest/create.ts
@@ -500,13 +500,7 @@ export function createRouteManifest(
const redirectRoutes = createRedirectRoutes(params, routeMap, logger);
const routes: RouteData[] = [
- ...[
- ...fileBasedRoutes,
- ...injectedRoutes,
- ...redirectRoutes
- ].sort(
- routeComparator,
- ),
+ ...[...fileBasedRoutes, ...injectedRoutes, ...redirectRoutes].sort(routeComparator),
];
// Report route collisions
diff --git a/packages/astro/src/core/server-islands/endpoint.ts b/packages/astro/src/core/server-islands/endpoint.ts
index 153b6837fa70..4c04f7a6f554 100644
--- a/packages/astro/src/core/server-islands/endpoint.ts
+++ b/packages/astro/src/core/server-islands/endpoint.ts
@@ -57,12 +57,12 @@ function badRequest(reason: string) {
}
async function getRequestData(request: Request): Promise {
- switch(request.method) {
+ switch (request.method) {
case 'GET': {
const url = new URL(request.url);
const params = url.searchParams;
- if(!params.has('s') || !params.has('e') || !params.has('p')) {
+ if (!params.has('s') || !params.has('e') || !params.has('p')) {
return badRequest('Missing required query parameters.');
}
@@ -79,9 +79,9 @@ async function getRequestData(request: Request): Promise`);
+ const potentialSearchParams = createSearchParams(
+ componentExport,
+ propsEncrypted,
+ safeJsonStringify(renderedSlots),
+ );
+ const useGETRequest = isWithinURLLimit(serverIslandUrl, potentialSearchParams);
+
+ if (useGETRequest) {
+ serverIslandUrl += '?' + potentialSearchParams.toString();
+ destination.write(
+ ``,
+ );
}
-
+
destination.write(`