From 59b7ee20573bcf1c306146565a73e39a02e3670d Mon Sep 17 00:00:00 2001 From: TrueCharts Bot Date: Fri, 4 Apr 2025 14:26:21 +0200 Subject: [PATCH] fix(website): update astro monorepo (minor) (#33929) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@astrojs/sitemap](https://docs.astro.build/en/guides/integrations-guide/sitemap/) ([source](https://redirect.github.com/withastro/astro/tree/HEAD/packages/integrations/sitemap)) | dependencies | minor | [`3.3.0` -> `3.3.0`](https://renovatebot.com/diffs/npm/@astrojs%2fsitemap/3.2.1/3.3.0) | | [astro](https://astro.build) ([source](https://redirect.github.com/withastro/astro/tree/HEAD/packages/astro)) | dependencies | minor | [`5.5.6` -> `5.6.1`](https://renovatebot.com/diffs/npm/astro/5.2.6/5.6.1) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. Add the preset `:preserveSemverRanges` to your config if you don't want to pin your dependencies. --- ### Release Notes
withastro/astro (@​astrojs/sitemap) ### [`v3.3.0`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/integrations/sitemap/CHANGELOG.md#330) ##### Minor Changes - [#​13448](https://redirect.github.com/withastro/astro/pull/13448) [`91c9503`](https://redirect.github.com/withastro/astro/commit/91c95034e0d0bd450170623fd8aab4b56b5b1366) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - Add support for XSL in sitemap-index.xml
withastro/astro (astro) ### [`v5.6.1`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#561) [Compare Source](https://redirect.github.com/withastro/astro/compare/astro@5.6.0...astro@5.6.1) ##### Patch Changes - [#​13519](https://redirect.github.com/withastro/astro/pull/13519) [`3323f5c`](https://redirect.github.com/withastro/astro/commit/3323f5c554a3af966463cc95a42d7ca789ba678b) Thanks [@​florian-lefebvre](https://redirect.github.com/florian-lefebvre)! - Refactors some internals to improve Rolldown compatibility - [#​13545](https://redirect.github.com/withastro/astro/pull/13545) [`a7aff41`](https://redirect.github.com/withastro/astro/commit/a7aff41681f9235719c03f97650db288f9f5f71a) Thanks [@​stramel](https://redirect.github.com/stramel)! - Prevent empty attributes from appearing in the SVG output - [#​13552](https://redirect.github.com/withastro/astro/pull/13552) [`9cd0fd4`](https://redirect.github.com/withastro/astro/commit/9cd0fd432634ed664a820ac78c6a3033684c7a83) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - Fixes an issue where Astro validated the i18n configuration incorrectly, causing false positives in downstream libraries. ### [`v5.6.0`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#560) [Compare Source](https://redirect.github.com/withastro/astro/compare/astro@5.5.6...astro@5.6.0) ##### Minor Changes - [#​13403](https://redirect.github.com/withastro/astro/pull/13403) [`dcb9526`](https://redirect.github.com/withastro/astro/commit/dcb9526c6ece3b716c677205fb99b483c95bfa7d) Thanks [@​yurynix](https://redirect.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 => { 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://redirect.github.com/withastro/astro/pull/13482) [`ff257df`](https://redirect.github.com/withastro/astro/commit/ff257df4e1a7f3e29e9bf7f92d52bf72f7b595a4) Thanks [@​florian-lefebvre](https://redirect.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://redirect.github.com/withastro/astro/pull/13405) [`21e7e80`](https://redirect.github.com/withastro/astro/commit/21e7e8077d6f0c9ad14fe1876d87bb445f5584b1) Thanks [@​Marocco2](https://redirect.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 Nice Link 1 A Nice Link 2 A Nice Link 3 A Nice Link 4 ... A Nice Link 20 ``` - [#​13482](https://redirect.github.com/withastro/astro/pull/13482) [`ff257df`](https://redirect.github.com/withastro/astro/commit/ff257df4e1a7f3e29e9bf7f92d52bf72f7b595a4) Thanks [@​florian-lefebvre](https://redirect.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://redirect.github.com/withastro/astro/pull/13539) [`c43bf8c`](https://redirect.github.com/withastro/astro/commit/c43bf8cd0513c2260d4ba32b5beffe97306e2e09) Thanks [@​ascorbic](https://redirect.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://redirect.github.com/withastro/astro/pull/13488) [`d777420`](https://redirect.github.com/withastro/astro/commit/d7774207b11d042711ec310f2ad46d15246482f0) Thanks [@​stramel](https://redirect.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 - + ``` - 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 - + ``` ```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 - + // 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 - + ``` ### [`v5.5.6`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#556) [Compare Source](https://redirect.github.com/withastro/astro/compare/astro@5.5.5...astro@5.5.6) ##### Patch Changes - [#​13429](https://redirect.github.com/withastro/astro/pull/13429) [`06de673`](https://redirect.github.com/withastro/astro/commit/06de673375f2339eb1bf8eda03d79177598979a9) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - The `ActionAPIContext.rewrite` method is deprecated and will be removed in a future major version of Astro - [#​13524](https://redirect.github.com/withastro/astro/pull/13524) [`82cd583`](https://redirect.github.com/withastro/astro/commit/82cd5832860d70ea7524473ae927db0cc2682b12) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - Fixes a bug where the functions `Astro.preferredLocale` and `Astro.preferredLocaleList` would return the incorrect locales when the Astro configuration specifies a list of `codes`. Before, the functions would return the `path`, instead now the functions return a list built from `codes`. - [#​13526](https://redirect.github.com/withastro/astro/pull/13526) [`ff9d69e`](https://redirect.github.com/withastro/astro/commit/ff9d69e3443c80059c54f6296d19f66bb068ead3) Thanks [@​jsparkdev](https://redirect.github.com/jsparkdev)! - update `vite` to the latest version ### [`v5.5.5`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#555) [Compare Source](https://redirect.github.com/withastro/astro/compare/astro@5.5.4...astro@5.5.5) ##### Patch Changes - [#​13510](https://redirect.github.com/withastro/astro/pull/13510) [`5b14d33`](https://redirect.github.com/withastro/astro/commit/5b14d33f81cdac0f7ac77186113dcce4369d848d) Thanks [@​florian-lefebvre](https://redirect.github.com/florian-lefebvre)! - Fixes a case where `astro:env` secrets used in actions would not be available - [#​13485](https://redirect.github.com/withastro/astro/pull/13485) [`018fbe9`](https://redirect.github.com/withastro/astro/commit/018fbe90f4030bbc2b2db7589d750e5392f38e59) Thanks [@​ascorbic](https://redirect.github.com/ascorbic)! - Fixes a bug that caused cookies to ignore custom decode function if has() had been called before - [#​13505](https://redirect.github.com/withastro/astro/pull/13505) [`a98ae5b`](https://redirect.github.com/withastro/astro/commit/a98ae5b8f5c33900379012e9e253a755c0a8927e) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - Updates the dependency `vite` to the latest. - [#​13483](https://redirect.github.com/withastro/astro/pull/13483) [`fc2dcb8`](https://redirect.github.com/withastro/astro/commit/fc2dcb83543d88af9e0920b90a035652d6db5166) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - Fixes a bug where an Astro adapter couldn't call the middleware when there isn't a route that matches the incoming request. ### [`v5.5.4`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#554) [Compare Source](https://redirect.github.com/withastro/astro/compare/astro@5.5.3...astro@5.5.4) ##### Patch Changes - [#​13457](https://redirect.github.com/withastro/astro/pull/13457) [`968e713`](https://redirect.github.com/withastro/astro/commit/968e713c268e1b2176c9265b6c438c56105c2730) Thanks [@​ascorbic](https://redirect.github.com/ascorbic)! - Sets correct response status text for custom error pages - [#​13447](https://redirect.github.com/withastro/astro/pull/13447) [`d80ba2b`](https://redirect.github.com/withastro/astro/commit/d80ba2b27d33d2972ffa3242330fb00d0fc58ba9) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - Fixes an issue where `site` was added to the generated redirects. - [#​13481](https://redirect.github.com/withastro/astro/pull/13481) [`e9e9245`](https://redirect.github.com/withastro/astro/commit/e9e9245c7c0ad6e3bda2b7600ff2bd845921a19d) Thanks [@​martrapp](https://redirect.github.com/martrapp)! - Makes server island work with the client router again. - [#​13484](https://redirect.github.com/withastro/astro/pull/13484) [`8b5e4dc`](https://redirect.github.com/withastro/astro/commit/8b5e4dc733bccce7d77defdbb973204aa9b8126b) Thanks [@​ascorbic](https://redirect.github.com/ascorbic)! - Display useful errors when config loading fails because of Node addons being disabled on Stackblitz ### [`v5.5.3`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#553) [Compare Source](https://redirect.github.com/withastro/astro/compare/astro@5.5.2...astro@5.5.3) ##### Patch Changes - [#​13437](https://redirect.github.com/withastro/astro/pull/13437) [`013fa87`](https://redirect.github.com/withastro/astro/commit/013fa87982ea92675e899d2f71a200e5298db608) Thanks [@​Vardhaman619](https://redirect.github.com/Vardhaman619)! - Handle server.allowedHosts when the value is true without attempting to push it into an array. - [#​13324](https://redirect.github.com/withastro/astro/pull/13324) [`ea74336`](https://redirect.github.com/withastro/astro/commit/ea7433666e0cc7e1301e638e80f90323f20db3e1) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - Upgrade to shiki v3 - [#​13372](https://redirect.github.com/withastro/astro/pull/13372) [`7783dbf`](https://redirect.github.com/withastro/astro/commit/7783dbf8117650c60d7633b43f0d42da487aa2b1) Thanks [@​ascorbic](https://redirect.github.com/ascorbic)! - Fixes a bug that caused some very large data stores to save incomplete data. - [#​13358](https://redirect.github.com/withastro/astro/pull/13358) [`8c21663`](https://redirect.github.com/withastro/astro/commit/8c21663c4a6363765f2caa5705a93a41492a95c9) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - Adds a new function called `insertPageRoute` to the Astro Container API. The new function is useful when testing routes that, for some business logic, use `Astro.rewrite`. For example, if you have a route `/blog/post` and for some business decision there's a rewrite to `/generic-error`, the container API implementation will look like this: ```js import Post from '../src/pages/Post.astro'; import GenericError from '../src/pages/GenericError.astro'; import { experimental_AstroContainer as AstroContainer } from 'astro/container'; const container = await AstroContainer.create(); container.insertPageRoute('/generic-error', GenericError); const result = await container.renderToString(Post); console.log(result); // this should print the response from GenericError.astro ``` This new method only works for page routes, which means that endpoints aren't supported. - [#​13426](https://redirect.github.com/withastro/astro/pull/13426) [`565583b`](https://redirect.github.com/withastro/astro/commit/565583bd6c99163ce5d9475b26075149cc8c155b) Thanks [@​ascorbic](https://redirect.github.com/ascorbic)! - Fixes a bug that caused the `astro add` command to ignore the `--yes` flag for third-party integrations - [#​13428](https://redirect.github.com/withastro/astro/pull/13428) [`9cac9f3`](https://redirect.github.com/withastro/astro/commit/9cac9f314277def0ee584e45d4937bac0235738a) Thanks [@​matthewp](https://redirect.github.com/matthewp)! - Prevent bad value in x-forwarded-host from crashing request - [#​13432](https://redirect.github.com/withastro/astro/pull/13432) [`defad33`](https://redirect.github.com/withastro/astro/commit/defad33140dccde324b9357bc6331f7e5cdec266) Thanks [@​P4tt4te](https://redirect.github.com/P4tt4te)! - Fix an issue in the Container API, where the `renderToString` function doesn't render adequately nested slots when they are components. - Updated dependencies \[[`ea74336`](https://redirect.github.com/withastro/astro/commit/ea7433666e0cc7e1301e638e80f90323f20db3e1)]: - [@​astrojs/markdown-remark](https://redirect.github.com/astrojs/markdown-remark)[@​6](https://redirect.github.com/6).3.1 ### [`v5.5.2`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#552) [Compare Source](https://redirect.github.com/withastro/astro/compare/astro@5.5.1...astro@5.5.2) ##### Patch Changes - [#​13415](https://redirect.github.com/withastro/astro/pull/13415) [`be866a1`](https://redirect.github.com/withastro/astro/commit/be866a1d1db12793e0953b228d0b2dc1c00929e2) Thanks [@​ascorbic](https://redirect.github.com/ascorbic)! - Reuses experimental session storage object between requests. This prevents memory leaks and improves performance for drivers that open persistent connections to a database. - [#​13420](https://redirect.github.com/withastro/astro/pull/13420) [`2f039b9`](https://redirect.github.com/withastro/astro/commit/2f039b927a3a1334948adc7788b1f24c074dfac7) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - It fixes an issue that caused some regressions in how styles are bundled. ### [`v5.5.1`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#551) [Compare Source](https://redirect.github.com/withastro/astro/compare/astro@5.5.0...astro@5.5.1) ##### Patch Changes - [#​13413](https://redirect.github.com/withastro/astro/pull/13413) [`65903c9`](https://redirect.github.com/withastro/astro/commit/65903c995408397c63c911e184218c0206e5853f) Thanks [@​ascorbic](https://redirect.github.com/ascorbic)! - Makes experimental flag optional ### [`v5.5.0`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#550) [Compare Source](https://redirect.github.com/withastro/astro/compare/astro@5.4.3...astro@5.5.0) ##### Minor Changes - [#​13402](https://redirect.github.com/withastro/astro/pull/13402) [`3e7b498`](https://redirect.github.com/withastro/astro/commit/3e7b498dce52648484bb4deb04bf9e960c3d08e3) Thanks [@​ematipico](https://redirect.github.com/ematipico)! - Adds a new experimental flag called `experimental.preserveScriptOrder` that renders `