summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Houston (Bot) <108291165+astrobot-houston@users.noreply.github.com> 2025-04-03 03:03:43 -0700
committerGravatar GitHub <noreply@github.com> 2025-04-03 11:03:43 +0100
commit90b0ac1fe1f782adafec07c9c396b829c347686c (patch)
tree90994b8cdeb53cce3b93406925dbc9b80cde04f5
parentc38102469d867d9d354620fad19cc51f9087223a (diff)
downloadastro-90b0ac1fe1f782adafec07c9c396b829c347686c.tar.gz
astro-90b0ac1fe1f782adafec07c9c396b829c347686c.tar.zst
astro-90b0ac1fe1f782adafec07c9c396b829c347686c.zip
[ci] release (#13540)astro@5.6.0
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-rw-r--r--.changeset/big-hats-train.md29
-rw-r--r--.changeset/easy-vans-laugh.md9
-rw-r--r--.changeset/famous-areas-peel.md26
-rw-r--r--.changeset/little-steaks-rule.md41
-rw-r--r--.changeset/poor-squids-like.md26
-rw-r--r--.changeset/three-masks-see.md7
-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.md129
-rw-r--r--packages/astro/package.json2
-rw-r--r--pnpm-lock.yaml47
32 files changed, 176 insertions, 186 deletions
diff --git a/.changeset/big-hats-train.md b/.changeset/big-hats-train.md
deleted file mode 100644
index f199c688e..000000000
--- a/.changeset/big-hats-train.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-'astro': minor
----
-
-Adds a new optional `prerenderedErrorPageFetch` option in the Adapter API to allow adapters to provide custom implementations for fetching prerendered error pages.
-
-Now, adapters can override the default `fetch()` behavior, for example when `fetch()` is unavailable or when you cannot call the server from itself.
-
-The following example provides a custom fetch for `500.html` and `404.html`, reading them from disk instead of performing an HTTP call:
-```js "prerenderedErrorPageFetch"
-return app.render(request, {
- prerenderedErrorPageFetch: async (url: string): Promise<Response> => {
- if (url.includes("/500")) {
- const content = await fs.promises.readFile("500.html", "utf-8");
- return new Response(content, {
- status: 500,
- headers: { "Content-Type": "text/html" },
- });
- }
- const content = await fs.promises.readFile("404.html", "utf-8");
- return new Response(content, {
- status: 404,
- headers: { "Content-Type": "text/html" },
- });
-});
-```
-If no value is provided, Astro will fallback to its default behavior for fetching error pages.
-
-Read more about this feature in the [Adapter API reference](https://docs.astro.build/en/reference/adapter-reference/#prerenderederrorpagefetch).
diff --git a/.changeset/easy-vans-laugh.md b/.changeset/easy-vans-laugh.md
deleted file mode 100644
index 97d2a1ff8..000000000
--- a/.changeset/easy-vans-laugh.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-'astro': minor
----
-
-Updates Astro config validation to also run for the Integration API. An error log will specify which integration is failing the validation.
-
-Now, Astro will first validate the user configuration, then validate the updated configuration after each integration `astro:config:setup` hook has run. This means `updateConfig()` calls will no longer accept invalid configuration.
-
-This fixes a situation where integrations could potentially update a project with a malformed configuration. These issues should now be caught and logged so that you can update your integration to only set valid configurations.
diff --git a/.changeset/famous-areas-peel.md b/.changeset/famous-areas-peel.md
deleted file mode 100644
index 64083df7e..000000000
--- a/.changeset/famous-areas-peel.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
-'astro': patch
----
-
-Adds a new `session.load()` method to the experimental session API that allows you to load a session by ID.
-
-When using [the experimental sessions API](https://docs.astro.build/en/reference/experimental-flags/sessions/), you don't normally need to worry about managing the session ID and cookies: Astro automatically reads the user's cookies and loads the correct session when needed. However, sometimes you need more control over which session to load.
-
-The new `load()` method allows you to manually load a session by ID. This is useful if you are handling the session ID yourself, or if you want to keep track of a session without using cookies. For example, you might want to restore a session from a logged-in user on another device, or work with an API endpoint that doesn't use cookies.
-
-```ts
-// src/pages/api/cart.ts
-import type { APIRoute } from 'astro';
-
-export const GET: APIRoute = async ({ session, request }) => {
- // Load the session from a header instead of cookies
- const sessionId = request.headers.get('x-session-id');
- await session.load(sessionId);
- const cart = await session.get('cart');
- return Response.json({ cart });
-};
-```
-
-If a session with that ID doesn't exist, a new one will be created. This allows you to generate a session ID in the client if needed.
-
-For more information, see the [experimental sessions docs](https://docs.astro.build/en/reference/experimental-flags/sessions/).
diff --git a/.changeset/little-steaks-rule.md b/.changeset/little-steaks-rule.md
deleted file mode 100644
index 6176d6b87..000000000
--- a/.changeset/little-steaks-rule.md
+++ /dev/null
@@ -1,41 +0,0 @@
----
-'astro': patch
----
-
-**BREAKING CHANGE to the experimental SVG Component API only**
-
-Removes some previously available prop, attribute, and configuration options from the experimental SVG API. These items are no longer available and must be removed from your code:
-
-- The `title` prop has been removed until we can settle on the correct balance between developer experience and accessibility. Please replace any `title` props on your components with `aria-label`:
- ```diff
- - <Logo title="My Company Logo" />
- + <Logo aria-label="My Company Logo" />
- ```
-- Sprite mode has been temporarily removed while we consider a new implementation that addresses how this feature was being used in practice. This means that there are no longer multiple `mode` options, and all SVGs will be inline. All instances of `mode` must be removed from your project as you can no longer control a mode:
- ```diff
- - <Logo mode="inline" />
- + <Logo />
- ```
-
- ```diff
- import { defineConfig } from 'astro'
-
- export default defineConfig({
- experimental: {
- - svg: {
- - mode: 'sprite'
- - },
- + svg: true
- }
- });
- ```
-- The default `role` is no longer applied due to developer feedback. Please add the appropriate `role` on each component individually as needed:
- ```diff
- - <Logo />
- + <Logo role="img" /> // To keep the role that was previously applied by default
- ```
-- The `size` prop has been removed to better work in combination with `viewBox` and additional styles/attributes. Please replace `size` with explicit `width` and `height` attributes:
- ```diff
- - <Logo size={64} />
- + <Logo width={64} height={64} />
- ```
diff --git a/.changeset/poor-squids-like.md b/.changeset/poor-squids-like.md
deleted file mode 100644
index a95c64eb8..000000000
--- a/.changeset/poor-squids-like.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
-'astro': minor
----
-
-Adds a new `eagerness` option for `prefetch()` when using `experimental.clientPrerender`
-
-With the experimental [`clientPrerender`](https://docs.astro.build/en/reference/experimental-flags/client-prerender/) flag enabled, you can use the `eagerness` option on `prefetch()` to suggest to the browser how eagerly it should prefetch/prerender link targets.
-
-This follows the same API described in the [Speculation Rules API](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/speculationrules#eagerness) and allows you to balance the benefit of reduced wait times against bandwidth, memory, and CPU costs for your site visitors.
-
-For example, you can now use `prefetch()` programmatically with large sets of links and avoid [browser limits in place to guard against over-speculating](https://developer.chrome.com/blog/speculation-rules-improvements#chrome-limits) (prerendering/prefetching too many links). Set `eagerness: 'moderate'` to take advantage of [First In, First Out (FIFO)](https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics)) strategies and browser heuristics to let the browser decide when to prerender/prefetch them and in what order:
-
-```astro
-<a class="link-moderate" href="/nice-link-1">A Nice Link 1</a>
-<a class="link-moderate" href="/nice-link-2">A Nice Link 2</a>
-<a class="link-moderate" href="/nice-link-3">A Nice Link 3</a>
-<a class="link-moderate" href="/nice-link-4">A Nice Link 4</a>
-...
-<a class="link-moderate" href="/nice-link-20">A Nice Link 20</a>
-<script>
- import { prefetch } from 'astro:prefetch';
- const linkModerate = document.getElementsByClassName('link-moderate');
- linkModerate.forEach((link) => prefetch(link.getAttribute('href'), {eagerness: 'moderate'}));
-
-</script>
-```
diff --git a/.changeset/three-masks-see.md b/.changeset/three-masks-see.md
deleted file mode 100644
index 32a62d721..000000000
--- a/.changeset/three-masks-see.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-'astro': minor
----
-
-Improves integrations error handling
-
-If an error is thrown from an integration hook, an error log will now provide information about the concerned integration and hook
diff --git a/examples/basics/package.json b/examples/basics/package.json
index 778766eb2..9e72cedf4 100644
--- a/examples/basics/package.json
+++ b/examples/basics/package.json
@@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.5.6"
+ "astro": "^5.6.0"
}
}
diff --git a/examples/blog/package.json b/examples/blog/package.json
index 62fe19449..f7ed43379 100644
--- a/examples/blog/package.json
+++ b/examples/blog/package.json
@@ -13,6 +13,6 @@
"@astrojs/mdx": "^4.2.3",
"@astrojs/rss": "^4.0.11",
"@astrojs/sitemap": "^3.3.0",
- "astro": "^5.5.6"
+ "astro": "^5.6.0"
}
}
diff --git a/examples/component/package.json b/examples/component/package.json
index d44b7c818..4e120fb12 100644
--- a/examples/component/package.json
+++ b/examples/component/package.json
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
- "astro": "^5.5.6"
+ "astro": "^5.6.0"
},
"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 59b81032e..0e38d0237 100644
--- a/examples/container-with-vitest/package.json
+++ b/examples/container-with-vitest/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/react": "^4.2.3",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vitest": "^3.0.9"
diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json
index 9cfbece26..dff82edad 100644
--- a/examples/framework-alpine/package.json
+++ b/examples/framework-alpine/package.json
@@ -13,6 +13,6 @@
"@astrojs/alpinejs": "^0.4.5",
"@types/alpinejs": "^3.13.11",
"alpinejs": "^3.14.9",
- "astro": "^5.5.6"
+ "astro": "^5.6.0"
}
}
diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json
index 7ae0cf9d1..0f2de55be 100644
--- a/examples/framework-multiple/package.json
+++ b/examples/framework-multiple/package.json
@@ -17,7 +17,7 @@
"@astrojs/vue": "^5.0.9",
"@types/react": "^18.3.20",
"@types/react-dom": "^18.3.5",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"preact": "^10.26.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json
index 7f11b5f7b..09b6a124e 100644
--- a/examples/framework-preact/package.json
+++ b/examples/framework-preact/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/preact": "^4.0.8",
"@preact/signals": "^2.0.2",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"preact": "^10.26.4"
}
}
diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json
index eac4eb9d0..42fdcb6ff 100644
--- a/examples/framework-react/package.json
+++ b/examples/framework-react/package.json
@@ -13,7 +13,7 @@
"@astrojs/react": "^4.2.3",
"@types/react": "^18.3.20",
"@types/react-dom": "^18.3.5",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json
index e29f7a415..56f5677fc 100644
--- a/examples/framework-solid/package.json
+++ b/examples/framework-solid/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^5.0.7",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"solid-js": "^1.9.5"
}
}
diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json
index c8ea5d1cf..356448fbf 100644
--- a/examples/framework-svelte/package.json
+++ b/examples/framework-svelte/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/svelte": "^7.0.9",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"svelte": "^5.25.3"
}
}
diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json
index 8a2de94d8..0e0ac2ac7 100644
--- a/examples/framework-vue/package.json
+++ b/examples/framework-vue/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/vue": "^5.0.9",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"vue": "^3.5.13"
}
}
diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json
index 6ca42b4fa..f3d31c309 100644
--- a/examples/hackernews/package.json
+++ b/examples/hackernews/package.json
@@ -11,6 +11,6 @@
},
"dependencies": {
"@astrojs/node": "^9.1.3",
- "astro": "^5.5.6"
+ "astro": "^5.6.0"
}
}
diff --git a/examples/integration/package.json b/examples/integration/package.json
index 1cbf2fb9b..37344a14f 100644
--- a/examples/integration/package.json
+++ b/examples/integration/package.json
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
- "astro": "^5.5.6"
+ "astro": "^5.6.0"
},
"peerDependencies": {
"astro": "^4.0.0"
diff --git a/examples/minimal/package.json b/examples/minimal/package.json
index 0252013a5..e66c4c61b 100644
--- a/examples/minimal/package.json
+++ b/examples/minimal/package.json
@@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.5.6"
+ "astro": "^5.6.0"
}
}
diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json
index c12a579fc..d5b10c2f9 100644
--- a/examples/portfolio/package.json
+++ b/examples/portfolio/package.json
@@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.5.6"
+ "astro": "^5.6.0"
}
}
diff --git a/examples/ssr/package.json b/examples/ssr/package.json
index d9714fcaf..7f58949ef 100644
--- a/examples/ssr/package.json
+++ b/examples/ssr/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/node": "^9.1.3",
"@astrojs/svelte": "^7.0.9",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"svelte": "^5.25.3"
}
}
diff --git a/examples/starlog/package.json b/examples/starlog/package.json
index d264f5969..9273990aa 100644
--- a/examples/starlog/package.json
+++ b/examples/starlog/package.json
@@ -9,7 +9,7 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"sass": "^1.86.0",
"sharp": "^0.33.3"
}
diff --git a/examples/toolbar-app/package.json b/examples/toolbar-app/package.json
index adcf8bb21..cbc23659d 100644
--- a/examples/toolbar-app/package.json
+++ b/examples/toolbar-app/package.json
@@ -16,6 +16,6 @@
},
"devDependencies": {
"@types/node": "^18.17.8",
- "astro": "^5.5.6"
+ "astro": "^5.6.0"
}
}
diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json
index 486cc461d..d133801af 100644
--- a/examples/with-markdoc/package.json
+++ b/examples/with-markdoc/package.json
@@ -11,6 +11,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.13.3",
- "astro": "^5.5.6"
+ "astro": "^5.6.0"
}
}
diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json
index a4d27f8c3..f6bd5b48d 100644
--- a/examples/with-mdx/package.json
+++ b/examples/with-mdx/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/mdx": "^4.2.3",
"@astrojs/preact": "^4.0.8",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"preact": "^10.26.4"
}
}
diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json
index 444c47d2a..b1e86b849 100644
--- a/examples/with-nanostores/package.json
+++ b/examples/with-nanostores/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/preact": "^4.0.8",
"@nanostores/preact": "^0.5.2",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"nanostores": "^0.11.4",
"preact": "^10.26.4"
}
diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json
index e96f6de09..af8b9a636 100644
--- a/examples/with-tailwindcss/package.json
+++ b/examples/with-tailwindcss/package.json
@@ -13,7 +13,7 @@
"@astrojs/mdx": "^4.2.3",
"@tailwindcss/vite": "^4.0.17",
"@types/canvas-confetti": "^1.9.0",
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"canvas-confetti": "^1.9.3",
"tailwindcss": "^4.0.17"
}
diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json
index 16612a1f9..14acb95e4 100644
--- a/examples/with-vitest/package.json
+++ b/examples/with-vitest/package.json
@@ -11,7 +11,7 @@
"test": "vitest"
},
"dependencies": {
- "astro": "^5.5.6",
+ "astro": "^5.6.0",
"vitest": "^3.0.9"
}
}
diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md
index b024fc6c9..abb5d8e84 100644
--- a/packages/astro/CHANGELOG.md
+++ b/packages/astro/CHANGELOG.md
@@ -1,5 +1,134 @@
# astro
+## 5.6.0
+
+### Minor Changes
+
+- [#13403](https://github.com/withastro/astro/pull/13403) [`dcb9526`](https://github.com/withastro/astro/commit/dcb9526c6ece3b716c677205fb99b483c95bfa7d) Thanks [@yurynix](https://github.com/yurynix)! - Adds a new optional `prerenderedErrorPageFetch` option in the Adapter API to allow adapters to provide custom implementations for fetching prerendered error pages.
+
+ Now, adapters can override the default `fetch()` behavior, for example when `fetch()` is unavailable or when you cannot call the server from itself.
+
+ The following example provides a custom fetch for `500.html` and `404.html`, reading them from disk instead of performing an HTTP call:
+
+ ```js "prerenderedErrorPageFetch"
+ return app.render(request, {
+ prerenderedErrorPageFetch: async (url: string): Promise<Response> => {
+ if (url.includes("/500")) {
+ const content = await fs.promises.readFile("500.html", "utf-8");
+ return new Response(content, {
+ status: 500,
+ headers: { "Content-Type": "text/html" },
+ });
+ }
+ const content = await fs.promises.readFile("404.html", "utf-8");
+ return new Response(content, {
+ status: 404,
+ headers: { "Content-Type": "text/html" },
+ });
+ });
+ ```
+
+ If no value is provided, Astro will fallback to its default behavior for fetching error pages.
+
+ Read more about this feature in the [Adapter API reference](https://docs.astro.build/en/reference/adapter-reference/#prerenderederrorpagefetch).
+
+- [#13482](https://github.com/withastro/astro/pull/13482) [`ff257df`](https://github.com/withastro/astro/commit/ff257df4e1a7f3e29e9bf7f92d52bf72f7b595a4) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Updates Astro config validation to also run for the Integration API. An error log will specify which integration is failing the validation.
+
+ Now, Astro will first validate the user configuration, then validate the updated configuration after each integration `astro:config:setup` hook has run. This means `updateConfig()` calls will no longer accept invalid configuration.
+
+ This fixes a situation where integrations could potentially update a project with a malformed configuration. These issues should now be caught and logged so that you can update your integration to only set valid configurations.
+
+- [#13405](https://github.com/withastro/astro/pull/13405) [`21e7e80`](https://github.com/withastro/astro/commit/21e7e8077d6f0c9ad14fe1876d87bb445f5584b1) Thanks [@Marocco2](https://github.com/Marocco2)! - Adds a new `eagerness` option for `prefetch()` when using `experimental.clientPrerender`
+
+ With the experimental [`clientPrerender`](https://docs.astro.build/en/reference/experimental-flags/client-prerender/) flag enabled, you can use the `eagerness` option on `prefetch()` to suggest to the browser how eagerly it should prefetch/prerender link targets.
+
+ This follows the same API described in the [Speculation Rules API](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/speculationrules#eagerness) and allows you to balance the benefit of reduced wait times against bandwidth, memory, and CPU costs for your site visitors.
+
+ For example, you can now use `prefetch()` programmatically with large sets of links and avoid [browser limits in place to guard against over-speculating](https://developer.chrome.com/blog/speculation-rules-improvements#chrome-limits) (prerendering/prefetching too many links). Set `eagerness: 'moderate'` to take advantage of [First In, First Out (FIFO)](<https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics)>) strategies and browser heuristics to let the browser decide when to prerender/prefetch them and in what order:
+
+ ```astro
+ <a class="link-moderate" href="/nice-link-1">A Nice Link 1</a>
+ <a class="link-moderate" href="/nice-link-2">A Nice Link 2</a>
+ <a class="link-moderate" href="/nice-link-3">A Nice Link 3</a>
+ <a class="link-moderate" href="/nice-link-4">A Nice Link 4</a>
+ ...
+ <a class="link-moderate" href="/nice-link-20">A Nice Link 20</a>
+ <script>
+ import { prefetch } from 'astro:prefetch';
+ const linkModerate = document.getElementsByClassName('link-moderate');
+ linkModerate.forEach((link) => prefetch(link.getAttribute('href'), { eagerness: 'moderate' }));
+ </script>
+ ```
+
+- [#13482](https://github.com/withastro/astro/pull/13482) [`ff257df`](https://github.com/withastro/astro/commit/ff257df4e1a7f3e29e9bf7f92d52bf72f7b595a4) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Improves integrations error handling
+
+ If an error is thrown from an integration hook, an error log will now provide information about the concerned integration and hook
+
+### Patch Changes
+
+- [#13539](https://github.com/withastro/astro/pull/13539) [`c43bf8c`](https://github.com/withastro/astro/commit/c43bf8cd0513c2260d4ba32b5beffe97306e2e09) Thanks [@ascorbic](https://github.com/ascorbic)! - Adds a new `session.load()` method to the experimental session API that allows you to load a session by ID.
+
+ When using [the experimental sessions API](https://docs.astro.build/en/reference/experimental-flags/sessions/), you don't normally need to worry about managing the session ID and cookies: Astro automatically reads the user's cookies and loads the correct session when needed. However, sometimes you need more control over which session to load.
+
+ The new `load()` method allows you to manually load a session by ID. This is useful if you are handling the session ID yourself, or if you want to keep track of a session without using cookies. For example, you might want to restore a session from a logged-in user on another device, or work with an API endpoint that doesn't use cookies.
+
+ ```ts
+ // src/pages/api/cart.ts
+ import type { APIRoute } from 'astro';
+
+ export const GET: APIRoute = async ({ session, request }) => {
+ // Load the session from a header instead of cookies
+ const sessionId = request.headers.get('x-session-id');
+ await session.load(sessionId);
+ const cart = await session.get('cart');
+ return Response.json({ cart });
+ };
+ ```
+
+ If a session with that ID doesn't exist, a new one will be created. This allows you to generate a session ID in the client if needed.
+
+ For more information, see the [experimental sessions docs](https://docs.astro.build/en/reference/experimental-flags/sessions/).
+
+- [#13488](https://github.com/withastro/astro/pull/13488) [`d777420`](https://github.com/withastro/astro/commit/d7774207b11d042711ec310f2ad46d15246482f0) Thanks [@stramel](https://github.com/stramel)! - **BREAKING CHANGE to the experimental SVG Component API only**
+
+ Removes some previously available prop, attribute, and configuration options from the experimental SVG API. These items are no longer available and must be removed from your code:
+
+ - The `title` prop has been removed until we can settle on the correct balance between developer experience and accessibility. Please replace any `title` props on your components with `aria-label`:
+ ```diff
+ - <Logo title="My Company Logo" />
+ + <Logo aria-label="My Company Logo" />
+ ```
+ - Sprite mode has been temporarily removed while we consider a new implementation that addresses how this feature was being used in practice. This means that there are no longer multiple `mode` options, and all SVGs will be inline. All instances of `mode` must be removed from your project as you can no longer control a mode:
+
+ ```diff
+ - <Logo mode="inline" />
+ + <Logo />
+ ```
+
+ ```diff
+ import { defineConfig } from 'astro'
+
+ export default defineConfig({
+ experimental: {
+ - svg: {
+ - mode: 'sprite'
+ - },
+ + svg: true
+ }
+ });
+ ```
+
+ - The default `role` is no longer applied due to developer feedback. Please add the appropriate `role` on each component individually as needed:
+ ```diff
+ - <Logo />
+ + <Logo role="img" /> // To keep the role that was previously applied by default
+ ```
+ - The `size` prop has been removed to better work in combination with `viewBox` and additional styles/attributes. Please replace `size` with explicit `width` and `height` attributes:
+ ```diff
+ - <Logo size={64} />
+ + <Logo width={64} height={64} />
+ ```
+
## 5.5.6
### Patch Changes
diff --git a/packages/astro/package.json b/packages/astro/package.json
index f60ba4325..80d94b53f 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -1,6 +1,6 @@
{
"name": "astro",
- "version": "5.5.6",
+ "version": "5.6.0",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7e62b49d6..c118429e0 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -142,7 +142,7 @@ importers:
examples/basics:
dependencies:
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
examples/blog:
@@ -157,13 +157,13 @@ importers:
specifier: ^3.3.0
version: link:../../packages/integrations/sitemap
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
examples/component:
devDependencies:
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
examples/container-with-vitest:
@@ -172,7 +172,7 @@ importers:
specifier: ^4.2.3
version: link:../../packages/integrations/react
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
react:
specifier: ^18.3.1
@@ -203,7 +203,7 @@ importers:
specifier: ^3.14.9
version: 3.14.9
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
examples/framework-multiple:
@@ -230,7 +230,7 @@ importers:
specifier: ^18.3.5
version: 18.3.5(@types/react@18.3.20)
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
preact:
specifier: ^10.26.4
@@ -260,7 +260,7 @@ importers:
specifier: ^2.0.2
version: 2.0.2(preact@10.26.4)
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
preact:
specifier: ^10.26.4
@@ -278,7 +278,7 @@ importers:
specifier: ^18.3.5
version: 18.3.5(@types/react@18.3.20)
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
react:
specifier: ^18.3.1
@@ -293,7 +293,7 @@ importers:
specifier: ^5.0.7
version: link:../../packages/integrations/solid
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
solid-js:
specifier: ^1.9.5
@@ -305,7 +305,7 @@ importers:
specifier: ^7.0.9
version: link:../../packages/integrations/svelte
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
svelte:
specifier: ^5.25.3
@@ -317,7 +317,7 @@ importers:
specifier: ^5.0.9
version: link:../../packages/integrations/vue
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
vue:
specifier: ^3.5.13
@@ -329,25 +329,25 @@ importers:
specifier: ^9.1.3
version: link:../../packages/integrations/node
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
examples/integration:
devDependencies:
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
examples/minimal:
dependencies:
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
examples/portfolio:
dependencies:
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
examples/ssr:
@@ -359,7 +359,7 @@ importers:
specifier: ^7.0.9
version: link:../../packages/integrations/svelte
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
svelte:
specifier: ^5.25.3
@@ -368,7 +368,7 @@ importers:
examples/starlog:
dependencies:
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
sass:
specifier: ^1.86.0
@@ -383,7 +383,7 @@ importers:
specifier: ^18.17.8
version: 18.19.50
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
examples/with-markdoc:
@@ -392,7 +392,7 @@ importers:
specifier: ^0.13.3
version: link:../../packages/integrations/markdoc
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
examples/with-mdx:
@@ -404,7 +404,7 @@ importers:
specifier: ^4.0.8
version: link:../../packages/integrations/preact
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
preact:
specifier: ^10.26.4
@@ -419,7 +419,7 @@ importers:
specifier: ^0.5.2
version: 0.5.2(nanostores@0.11.4)(preact@10.26.4)
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
nanostores:
specifier: ^0.11.4
@@ -440,7 +440,7 @@ importers:
specifier: ^1.9.0
version: 1.9.0
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
canvas-confetti:
specifier: ^1.9.3
@@ -452,7 +452,7 @@ importers:
examples/with-vitest:
dependencies:
astro:
- specifier: ^5.5.6
+ specifier: ^5.6.0
version: link:../../packages/astro
vitest:
specifier: ^3.0.9
@@ -10016,7 +10016,6 @@ packages:
libsql@0.5.4:
resolution: {integrity: sha512-GEFeWca4SDAQFxjHWJBE6GK52LEtSskiujbG3rqmmeTO9t4sfSBKIURNLLpKDDF7fb7jmTuuRkDAn9BZGITQNw==}
- cpu: [x64, arm64, wasm32]
os: [darwin, linux, win32]
lightningcss-darwin-arm64@1.29.2: