summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/pre.json2
-rw-r--r--examples/basics/package.json2
-rw-r--r--examples/blog/package.json2
-rw-r--r--examples/component/package.json2
-rw-r--r--examples/container-with-vitest/package.json2
-rw-r--r--examples/framework-alpine/package.json2
-rw-r--r--examples/framework-multiple/package.json2
-rw-r--r--examples/framework-preact/package.json2
-rw-r--r--examples/framework-react/package.json2
-rw-r--r--examples/framework-solid/package.json2
-rw-r--r--examples/framework-svelte/package.json2
-rw-r--r--examples/framework-vue/package.json2
-rw-r--r--examples/hackernews/package.json2
-rw-r--r--examples/integration/package.json2
-rw-r--r--examples/minimal/package.json2
-rw-r--r--examples/portfolio/package.json2
-rw-r--r--examples/ssr/package.json2
-rw-r--r--examples/starlog/package.json2
-rw-r--r--examples/toolbar-app/package.json2
-rw-r--r--examples/with-markdoc/package.json2
-rw-r--r--examples/with-mdx/package.json2
-rw-r--r--examples/with-nanostores/package.json2
-rw-r--r--examples/with-tailwindcss/package.json2
-rw-r--r--examples/with-vitest/package.json2
-rw-r--r--packages/astro/CHANGELOG.md6
-rw-r--r--packages/astro/package.json2
-rw-r--r--packages/astro/src/core/server-islands/endpoint.ts4
-rw-r--r--packages/astro/test/server-islands.test.js8
-rw-r--r--pnpm-lock.yaml46
29 files changed, 60 insertions, 54 deletions
diff --git a/.changeset/pre.json b/.changeset/pre.json
index fa0e79b5c..f49826835 100644
--- a/.changeset/pre.json
+++ b/.changeset/pre.json
@@ -102,6 +102,7 @@
"proud-terms-swim",
"quick-ads-exercise",
"quick-onions-leave",
+ "rotten-dodos-judge",
"rotten-phones-scream",
"selfish-cats-crash",
"selfish-impalas-grin",
@@ -115,7 +116,6 @@
"spotty-garlics-cheat",
"strange-sheep-film",
"strong-months-grab",
- "strong-stingrays-provide",
"sweet-timers-smash",
"tall-waves-impress",
"tame-pumpkins-swim",
diff --git a/examples/basics/package.json b/examples/basics/package.json
index dbedbb0e9..10076e7c5 100644
--- a/examples/basics/package.json
+++ b/examples/basics/package.json
@@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.0.0-beta.9"
+ "astro": "^5.0.0-beta.10"
}
}
diff --git a/examples/blog/package.json b/examples/blog/package.json
index 0ae87a111..55c4c8e97 100644
--- a/examples/blog/package.json
+++ b/examples/blog/package.json
@@ -13,6 +13,6 @@
"@astrojs/mdx": "^4.0.0-beta.3",
"@astrojs/rss": "^4.0.9",
"@astrojs/sitemap": "^3.2.1",
- "astro": "^5.0.0-beta.9"
+ "astro": "^5.0.0-beta.10"
}
}
diff --git a/examples/component/package.json b/examples/component/package.json
index df329888a..e7d389c99 100644
--- a/examples/component/package.json
+++ b/examples/component/package.json
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
- "astro": "^5.0.0-beta.9"
+ "astro": "^5.0.0-beta.10"
},
"peerDependencies": {
"astro": "^4.0.0 || ^5.0.0"
diff --git a/examples/container-with-vitest/package.json b/examples/container-with-vitest/package.json
index 40a5ad19e..0bf514bab 100644
--- a/examples/container-with-vitest/package.json
+++ b/examples/container-with-vitest/package.json
@@ -11,7 +11,7 @@
"test": "vitest run"
},
"dependencies": {
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"@astrojs/react": "^3.6.3-beta.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json
index 82296fd49..3e293ee02 100644
--- a/examples/framework-alpine/package.json
+++ b/examples/framework-alpine/package.json
@@ -13,6 +13,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.14.3",
- "astro": "^5.0.0-beta.9"
+ "astro": "^5.0.0-beta.10"
}
}
diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json
index 8756e8786..2dd01dfdf 100644
--- a/examples/framework-multiple/package.json
+++ b/examples/framework-multiple/package.json
@@ -17,7 +17,7 @@
"@astrojs/vue": "^5.0.0-beta.2",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"preact": "^10.24.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json
index 6d0e70104..71005811f 100644
--- a/examples/framework-preact/package.json
+++ b/examples/framework-preact/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.4-beta.0",
"@preact/signals": "^1.3.0",
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"preact": "^10.24.3"
}
}
diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json
index da22ea880..2c1d587d4 100644
--- a/examples/framework-react/package.json
+++ b/examples/framework-react/package.json
@@ -13,7 +13,7 @@
"@astrojs/react": "^3.6.3-beta.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json
index c32d50165..a77744ba7 100644
--- a/examples/framework-solid/package.json
+++ b/examples/framework-solid/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.4.4-beta.0",
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"solid-js": "^1.9.3"
}
}
diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json
index 22c8b22ba..b6ad5c83f 100644
--- a/examples/framework-svelte/package.json
+++ b/examples/framework-svelte/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/svelte": "^6.0.2-beta.0",
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"svelte": "^5.1.16"
}
}
diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json
index d55261189..cd31147fa 100644
--- a/examples/framework-vue/package.json
+++ b/examples/framework-vue/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/vue": "^5.0.0-beta.2",
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"vue": "^3.5.12"
}
}
diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json
index 04330f969..1b0a167ae 100644
--- a/examples/hackernews/package.json
+++ b/examples/hackernews/package.json
@@ -11,6 +11,6 @@
},
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
- "astro": "^5.0.0-beta.9"
+ "astro": "^5.0.0-beta.10"
}
}
diff --git a/examples/integration/package.json b/examples/integration/package.json
index e2c6d1b82..f6a938729 100644
--- a/examples/integration/package.json
+++ b/examples/integration/package.json
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
- "astro": "^5.0.0-beta.9"
+ "astro": "^5.0.0-beta.10"
},
"peerDependencies": {
"astro": "^4.0.0"
diff --git a/examples/minimal/package.json b/examples/minimal/package.json
index 2fa61a582..ede3198ce 100644
--- a/examples/minimal/package.json
+++ b/examples/minimal/package.json
@@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.0.0-beta.9"
+ "astro": "^5.0.0-beta.10"
}
}
diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json
index 54426be0e..c57436a3a 100644
--- a/examples/portfolio/package.json
+++ b/examples/portfolio/package.json
@@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.0.0-beta.9"
+ "astro": "^5.0.0-beta.10"
}
}
diff --git a/examples/ssr/package.json b/examples/ssr/package.json
index 8d70ee57c..be337e5e4 100644
--- a/examples/ssr/package.json
+++ b/examples/ssr/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
"@astrojs/svelte": "^6.0.2-beta.0",
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"svelte": "^5.1.16"
}
}
diff --git a/examples/starlog/package.json b/examples/starlog/package.json
index 4c4528784..3c0188e1a 100644
--- a/examples/starlog/package.json
+++ b/examples/starlog/package.json
@@ -9,7 +9,7 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"sass": "^1.80.6",
"sharp": "^0.33.3"
}
diff --git a/examples/toolbar-app/package.json b/examples/toolbar-app/package.json
index f2b13f287..636be71fa 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-beta.9"
+ "astro": "^5.0.0-beta.10"
}
}
diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json
index 2cc4378a6..3203a6390 100644
--- a/examples/with-markdoc/package.json
+++ b/examples/with-markdoc/package.json
@@ -11,6 +11,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.12.0-beta.0",
- "astro": "^5.0.0-beta.9"
+ "astro": "^5.0.0-beta.10"
}
}
diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json
index ab172bc1e..b2b3071c4 100644
--- a/examples/with-mdx/package.json
+++ b/examples/with-mdx/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/mdx": "^4.0.0-beta.3",
"@astrojs/preact": "^3.5.4-beta.0",
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"preact": "^10.24.3"
}
}
diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json
index 7ad15fd50..80cd73b77 100644
--- a/examples/with-nanostores/package.json
+++ b/examples/with-nanostores/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.4-beta.0",
"@nanostores/preact": "^0.5.2",
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"nanostores": "^0.11.3",
"preact": "^10.24.3"
}
diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json
index dbc281609..4e5049cea 100644
--- a/examples/with-tailwindcss/package.json
+++ b/examples/with-tailwindcss/package.json
@@ -13,7 +13,7 @@
"@astrojs/mdx": "^4.0.0-beta.3",
"@astrojs/tailwind": "^5.1.2",
"@types/canvas-confetti": "^1.6.4",
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"autoprefixer": "^10.4.20",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.47",
diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json
index c5d1d9529..912bbbf30 100644
--- a/examples/with-vitest/package.json
+++ b/examples/with-vitest/package.json
@@ -11,7 +11,7 @@
"test": "vitest"
},
"dependencies": {
- "astro": "^5.0.0-beta.9",
+ "astro": "^5.0.0-beta.10",
"vitest": "^2.1.4"
}
}
diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md
index c94391811..078197245 100644
--- a/packages/astro/CHANGELOG.md
+++ b/packages/astro/CHANGELOG.md
@@ -1,5 +1,11 @@
# astro
+## 5.0.0-beta.10
+
+### Patch Changes
+
+- [#12486](https://github.com/withastro/astro/pull/12486) [`dc3d842`](https://github.com/withastro/astro/commit/dc3d842e4c6f3b7e59da8a13447a1450013e10dc) Thanks [@matthewp](https://github.com/matthewp)! - Call server island early so it can set headers
+
## 5.0.0-beta.9
### Minor Changes
diff --git a/packages/astro/package.json b/packages/astro/package.json
index 67c68dab2..9a4b4e10e 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -1,6 +1,6 @@
{
"name": "astro",
- "version": "5.0.0-beta.9",
+ "version": "5.0.0-beta.10",
"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/server-islands/endpoint.ts b/packages/astro/src/core/server-islands/endpoint.ts
index cac030409..ca24b54af 100644
--- a/packages/astro/src/core/server-islands/endpoint.ts
+++ b/packages/astro/src/core/server-islands/endpoint.ts
@@ -138,9 +138,9 @@ export function createEndpoint(manifest: SSRManifest) {
// `self` which is needed to force the runtime to wait
// on the component before sending out the response headers.
// This allows the island to set headers (cookies).
- if(isAstroComponentFactory(Component)) {
+ if (isAstroComponentFactory(Component)) {
const ServerIsland = Component;
- Component = function(this: typeof ServerIsland, ...args: Parameters<typeof ServerIsland>) {
+ Component = function (this: typeof ServerIsland, ...args: Parameters<typeof ServerIsland>) {
return ServerIsland.apply(this, args);
};
Object.assign(Component, ServerIsland);
diff --git a/packages/astro/test/server-islands.test.js b/packages/astro/test/server-islands.test.js
index fbc4964b1..913650a95 100644
--- a/packages/astro/test/server-islands.test.js
+++ b/packages/astro/test/server-islands.test.js
@@ -41,10 +41,10 @@ describe('Server islands', () => {
const res = await fixture.fetch('/_server-islands/Island', {
method: 'POST',
body: JSON.stringify({
- componentExport: 'default',
- encryptedProps: 'FC8337AF072BE5B1641501E1r8mLIhmIME1AV7UO9XmW9OLD',
- slots: {},
- })
+ componentExport: 'default',
+ encryptedProps: 'FC8337AF072BE5B1641501E1r8mLIhmIME1AV7UO9XmW9OLD',
+ slots: {},
+ }),
});
const works = res.headers.get('X-Works');
assert.equal(works, 'true', 'able to set header from server island');
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8aa11a36d..7ccb9f0bf 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -146,7 +146,7 @@ importers:
examples/basics:
dependencies:
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
examples/blog:
@@ -161,13 +161,13 @@ importers:
specifier: ^3.2.1
version: link:../../packages/integrations/sitemap
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
examples/component:
devDependencies:
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
examples/container-with-vitest:
@@ -176,7 +176,7 @@ importers:
specifier: ^3.6.3-beta.0
version: link:../../packages/integrations/react
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
react:
specifier: ^18.3.1
@@ -207,7 +207,7 @@ importers:
specifier: ^3.14.3
version: 3.14.3
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
examples/framework-multiple:
@@ -234,7 +234,7 @@ importers:
specifier: ^18.3.1
version: 18.3.1
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
preact:
specifier: ^10.24.3
@@ -264,7 +264,7 @@ importers:
specifier: ^1.3.0
version: 1.3.0(preact@10.24.3)
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
preact:
specifier: ^10.24.3
@@ -282,7 +282,7 @@ importers:
specifier: ^18.3.1
version: 18.3.1
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
react:
specifier: ^18.3.1
@@ -297,7 +297,7 @@ importers:
specifier: ^4.4.4-beta.0
version: link:../../packages/integrations/solid
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
solid-js:
specifier: ^1.9.3
@@ -309,7 +309,7 @@ importers:
specifier: ^6.0.2-beta.0
version: link:../../packages/integrations/svelte
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
svelte:
specifier: ^5.1.16
@@ -321,7 +321,7 @@ importers:
specifier: ^5.0.0-beta.2
version: link:../../packages/integrations/vue
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
vue:
specifier: ^3.5.12
@@ -333,25 +333,25 @@ importers:
specifier: ^9.0.0-alpha.1
version: 9.0.0-alpha.1(astro@packages+astro)
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
examples/integration:
devDependencies:
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
examples/minimal:
dependencies:
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
examples/portfolio:
dependencies:
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
examples/ssr:
@@ -363,7 +363,7 @@ importers:
specifier: ^6.0.2-beta.0
version: link:../../packages/integrations/svelte
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
svelte:
specifier: ^5.1.16
@@ -372,7 +372,7 @@ importers:
examples/starlog:
dependencies:
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
sass:
specifier: ^1.80.6
@@ -384,7 +384,7 @@ importers:
examples/toolbar-app:
devDependencies:
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
examples/with-markdoc:
@@ -393,7 +393,7 @@ importers:
specifier: ^0.12.0-beta.0
version: link:../../packages/integrations/markdoc
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
examples/with-mdx:
@@ -405,7 +405,7 @@ importers:
specifier: ^3.5.4-beta.0
version: link:../../packages/integrations/preact
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
preact:
specifier: ^10.24.3
@@ -420,7 +420,7 @@ importers:
specifier: ^0.5.2
version: 0.5.2(nanostores@0.11.3)(preact@10.24.3)
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
nanostores:
specifier: ^0.11.3
@@ -441,7 +441,7 @@ importers:
specifier: ^1.6.4
version: 1.6.4
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
autoprefixer:
specifier: ^10.4.20
@@ -459,7 +459,7 @@ importers:
examples/with-vitest:
dependencies:
astro:
- specifier: ^5.0.0-beta.9
+ specifier: ^5.0.0-beta.10
version: link:../../packages/astro
vitest:
specifier: ^2.1.4