fix(deps): update astro monorepo #777
Open
+649
−921
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.9.5→0.9.69.2.2→9.5.27.0.13→7.2.55.7.14→5.16.14Release Notes
withastro/astro (@astrojs/check)
v0.9.6Patch Changes
#14740
abfed97Thanks @ArmandPhilippot! - Fixes link targets in documentation following repository relocation.Updated dependencies [
abfed97]:withastro/astro (@astrojs/node)
v9.5.2Compare Source
Patch Changes
#15196
a8317c1Thanks @ematipico! - Fixes an issue where some prendered pages weren't correctly rendered when using the Node.js adapter in middleware mode.#15169
b803d8bThanks @rururux! - fix: fix image 500 error when moving dist directory in standalone Nodev9.5.1Compare Source
Patch Changes
9e9c528,0f75f6b]:v9.5.0Compare Source
Minor Changes
#14441
62ec8eaThanks @upsuper! - Updates redirect handling to be consistent acrossstaticandserveroutput, aligning with the behavior of other adapters.Previously, the Node.js adapter used default HTML files with meta refresh tags when in
staticoutput. This often resulted in an extra flash of the page on redirect, while also not applying the proper status code for redirections. It's also likely less friendly to search engines.This update ensures that configured redirects are always handled as HTTP redirects regardless of output mode, and the default HTML files for the redirects are no longer generated in
staticoutput. It makes the Node.js adapter more consistent with the other official adapters.No change to your project is required to take advantage of this new adapter functionality. It is not expected to cause any breaking changes. However, if you relied on the previous redirecting behavior, you may need to handle your redirects differently now. Otherwise you should notice smoother redirects, with more accurate HTTP status codes, and may potentially see some SEO gains.
v9.4.6Compare Source
Patch Changes
66a26d7Thanks @matthewp! - Fixes compatibility issue with older versions of Astro by makinggetAllowedDomains()call optional and updating peer dependency to requireastro@^5.14.3v9.4.5Compare Source
Patch Changes
b8ca69b]:v9.4.4Compare Source
Patch Changes
1e2499e]:v9.4.3Compare Source
Patch Changes
77b18fbThanks @delucis! - Increases the minimum supported version of Astro to 5.7.0v9.4.2Compare Source
Patch Changes
4d16de7]:v9.4.1Compare Source
Patch Changes
5fc3c59Thanks @ematipico! - Fixes a routing bug in standalone mode withtrailingSlashset to"always".v9.4.0Compare Source
Minor Changes
#14188
e3422aaThanks @ascorbic! - Adds support for specifying a host to load prerendered error pagesBy default, if a user defines a custom error page that is prerendered, Astro will load it from the same host as the one that the request is made to. This change allows users to specify a different host for loading prerendered error pages. This can be useful in scenarios such as where the server is running behind a reverse proxy or when prerendered pages are hosted on a different domain.
To use this feature, set the
experimentalErrorPageHostadapter option in your Astro configuration to the desired host URL. For example, if your server is running on localhost and served via a proxy, you can ensure the prerendered error pages are fetched via the localhost URL:For more information on enabling and using this experimental feature, see the
@astrojs/nodeadapter docs.v9.3.3Compare Source
Patch Changes
0567fb7]:v9.3.2Compare Source
Patch Changes
f4e8889]:v9.3.1Compare Source
Patch Changes
e4d74baThanks @ColoredCarrot! - fix(node): emit set-cookie header from middlewares for not-found routes (#14136)v9.3.0Compare Source
Minor Changes
#14012
a125a14Thanks @florian-lefebvre! - Adds a new experimental configuration optionexperimentalDisableStreamingto allow you to opt out of Astro's default HTML streaming for pages rendered on demand.HTML streaming helps with performance and generally provides a better visitor experience. In most cases, disabling streaming is not recommended.
However, when you need to disable HTML streaming (e.g. your host only supports non-streamed HTML caching at the CDN level), you can now opt out of the default behavior:
import { defineConfig } from 'astro/config'; import node from '@​astrojs/node'; export default defineConfig({ adapter: node({ mode: 'standalone', + experimentalDisableStreaming: true, }), });#13972
db8f8beThanks @ematipico! - Adds support for the experimental static headers Astro feature.When the feature is enabled via the option
experimentalStaticHeaders, and experimental Content Security Policy is enabled, the adapter will generateResponseheaders for static pages, which allows support for CSP directives that are not supported inside a<meta>tag (e.g.frame-ancestors).withastro/astro (@astrojs/svelte)
v7.2.5Compare Source
Patch Changes
fa9c464Thanks @antonyfaris! - Improve Sveltechildrenprop type checkingv7.2.4Compare Source
Patch Changes
16f3994Thanks @antonyfaris! - Fixes an issue where Svelte components used in Astro files would incorrectly report type errors when usingclient:*directives.v7.2.3Compare Source
Patch Changes
4264a36Thanks @antonyfaris! - Fixes an issue where Svelte 5 components used in Astro files would not have proper type checking and IntelliSense.v7.2.2Compare Source
Patch Changes
#14715
3d55c5dThanks @ascorbic! - Adds support for client hydration ingetContainerRenderer()The
getContainerRenderer()function is exported by Astro framework integrations to simplify the process of rendering framework components when using the experimental Container API inside a Vite or Vitest environment. This update adds the client hydration entrypoint to the returned object, enabling client-side interactivity for components rendered using this function. Previously this required users to manually callcontainer.addClientRenderer()with the appropriate client renderer entrypoint.See the
container-with-vitestdemo for a usage example, and the Container API documentation for more information on using framework components with the experimental Container API.v7.2.1Compare Source
Patch Changes
e3175d9Thanks @GameRoMan! - Updatesviteversion to fix CVEv7.2.0Compare Source
Minor Changes
#14430
78011baThanks @ascorbic! - Adds support for async server renderingSvelte 5.36 added experimental support for async rendering. This allows you to use
awaitin your components in several new places. This worked out of the box with client-rendered components, but server-rendered components needed some extra help. This update adds support for async server rendering in Svelte components used in Astro.To use async rendering, you must enable it in your Svelte config:
Then you can use
awaitin your components:See the Svelte docs for more information on using
awaitin Svelte components, including inside$derivedblocks and directly in markup.Patch Changes
9cc8f21Thanks @ascorbic! - Fixes a bug that prevented Svelte 5.39.1+ components rendering when multiple frameworks were presentv7.1.1Compare Source
Patch Changes
c24a8f4Thanks @jsparkdev! - Updatesviteversion to fix CVEv7.1.0Compare Source
Minor Changes
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
withastro/astro (astro)
v5.16.14Patch Changes
#15213
c775fceThanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyUpdates how the local provider must be used when using the experimental Fonts API
Previously, there were 2 kinds of font providers: remote and local.
Font providers are now unified. If you are using the local provider, the process for configuring local fonts must be updated:
Once configured, there is no change to using local fonts in your project. However, you should inspect your deployed site to confirm that your new font configuration is being applied.
See the experimental Fonts API docs for more information.
#15213
c775fceThanks @florian-lefebvre! - ExposesrootonFontProviderinit()contextWhen building a custom
FontProviderfor the experimental Fonts API, theinit()method receives acontext. This context now exposes arootURL, useful for resolving local files:import type { FontProvider } from "astro"; export function registryFontProvider(): FontProvider { return { // ... - init: async ({ storage }) => { + init: async ({ storage, root }) => { // ... }, }; }#15185
edabeaaThanks @EricGrill! - Add.vercelto.gitignorewhen adding the Vercel adapter viaastro add vercelv5.16.13Compare Source
Patch Changes
#15182
cb60ee1Thanks @florian-lefebvre! - Adds a newgetFontBuffer()method to retrieve font file buffers when using the experimental Fonts APIThe
getFontData()helper function fromastro:assetswas introduced in 5.14.0 to provide access to font family data for use outside of Astro. One of the goals of this API was to be able to retrieve buffers using URLs.However, it turned out to be impactical and even impossible during prerendering.
Astro now exports a new
getFontBuffer()helper function fromastro:assetsto retrieve font file buffers from URL returned bygetFontData(). For example, when using satori to generate OpenGraph images:// src/pages/og.png.ts import type{ APIRoute } from "astro" -import { getFontData } from "astro:assets" +import { getFontData, getFontBuffer } from "astro:assets" import satori from "satori" export const GET: APIRoute = (context) => { const data = getFontData("--font-roboto") const svg = await satori( <div style={{ color: "black" }}>hello, world</div>, { width: 600, height: 400, fonts: [ { name: "Roboto", - data: await fetch(new URL(data[0].src[0].url, context.url.origin)).then(res => res.arrayBuffer()), + data: await getFontBuffer(data[0].src[0].url), weight: 400, style: "normal", }, ], }, ) // ... }See the experimental Fonts API documentation for more information.
v5.16.12Compare Source
Patch Changes
#15175
47ae148Thanks @florian-lefebvre! - Allows experimental Font providers to specify family optionsPreviously, an Astro
FontProvidercould only accept options at the provider level when called. That could result in weird data structures for family-specific options.Astro
FontProviders can now declare family-specific options, by specifying a generic:// font-provider.ts import type { FontProvider } from "astro"; import { retrieveFonts, type Fonts } from "./utils.js", interface Config { token: string; } +interface FamilyOptions { + minimal?: boolean; +} -export function registryFontProvider(config: Config): FontProvider { +export function registryFontProvider(config: Config): FontProvider<FamilyOptions> { let data: Fonts = {} return { name: "registry", config, init: async () => { data = await retrieveFonts(token); }, listFonts: () => { return Object.keys(data); }, - resolveFont: ({ familyName, ...rest }) => { + // options is typed as FamilyOptions + resolveFont: ({ familyName, options, ...rest }) => { const fonts = data[familyName]; if (fonts) { return { fonts }; } return undefined; }, }; }Once the font provider is registered in the Astro config, types are automatically inferred:
// astro.config.ts import { defineConfig } from "astro/config"; import { registryFontProvider } from "./font-provider"; export default defineConfig({ experimental: { fonts: [{ provider: registryFontProvider({ token: "..." }), name: "Custom", cssVariable: "--font-custom", + options: { + minimal: true + } }] } });#15175
47ae148Thanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyUpdates how options are passed to the Google and Google Icons font providers when using the experimental Fonts API
Previously, the Google and Google Icons font providers accepted options that were specific to given font families.
These options must now be set using the
optionsproperty instead. For example using the Google provider:import { defineConfig, fontProviders } from "astro/config"; export default defineConfig({ experimental: { fonts: [{ name: 'Inter', cssVariable: '--astro-font-inter', weights: ['300 900'], - provider: fontProviders.google({ - experimental: { - variableAxis: { - Inter: { opsz: ['14..32'] } - } - } - }), + provider: fontProviders.google(), + options: { + experimental: { + variableAxis: { opsz: ['14..32'] } + } + } }] } })#15200
c0595b3Thanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyRemoves
getFontData()exported fromastro:assetswithfontDatawhen using the experimental Fonts APIAccessing font data can be useful for advanced use cases, such as generating meta tags or Open Graph images. Before, we exposed a
getFontData()helper function to retrieve the font data for a givencssVariable. That was however limiting for programmatic usages that need to access all font data.The
getFontData()helper function is removed and replaced by a newfontDataobject:We may reintroduce
getFontData()later on for a more friendly DX, based on your feedback.#15254
8d84b30Thanks @lamalex! - Fixes CSSassetsPrefixwith remote URLs incorrectly prepending a forward slashWhen using
build.assetsPrefixwith a remote URL (e.g.,https://cdn.example.com) for CSS assets, the generated<link>elements were incorrectly getting a/prepended to the full URL, resulting in invalid URLs like/https://cdn.example.com/assets/style.css.This fix checks if the stylesheet link is a remote URL before prepending the forward slash.
#15178
731f52dThanks @kedarvartak! - Fixes an issue where stopping the dev server withq+enterincorrectly created adistfolder and copied font files when using the experimental Fonts API#15230
3da6272Thanks @rahuld109! - Fixes greedy regex in error message markdown rendering that caused link syntax examples to capture extra characters#15253
2a6315aThanks @matthewp! - Fixes hydration for React components nested inside HTML elements in MDX files#15227
9a609f4Thanks @matthewp! - Fixes styles not being included for conditionally rendered Svelte 5 components in production builds#14607
ee52160Thanks @simensfo! - Reintroduces css deduplication for hydrated client components. Ensures assets already added to a client chunk are not flagged as orphanedv5.16.11Compare Source
Patch Changes
#15017
9e7a3c8Thanks @ixchio! - Fixes CSS double-bundling when the same CSS file is imported in both a page's frontmatter and a component's script tag#15225
6fe62e1Thanks @ematipico! - Updates to the latest version ofdevaluev5.16.10Compare Source
Patch Changes
2fa19c4- Improved error handling in the rendering phaseAdded defensive validation in
App.render()and#renderError()to provide a descriptive error message when a route module doesn't have a valid page function.#15199
d8e64efThanks @ArmandPhilippot! - Fixes the links to Astro Docs so that they match the current docs structure.#15169
b803d8bThanks @rururux! - fix: fix image 500 error when moving dist directory in standalone Node#14622
9b35c62Thanks @aprici7y! - Fixes CSS url() references to public assets returning 404 in dev mode when base path is configured#15219
43df4ceThanks @matthewp! - Upgrades thediffpackage to v8v5.16.9Compare Source
Patch Changes
#15174
37ab65aThanks @florian-lefebvre! - Adds Google Icons to built-in font providersTo start using it, access it on
fontProviders:#15150
a77c4f4Thanks @matthewp! - Fixes hydration for framework components inside MDX when usingAstro.slots.render()Previously, when multiple framework components with
client:*directives were passed as named slots to an Astro component in MDX, only the first slot would hydrate correctly. Subsequent slots would render their HTML but fail to include the necessary hydration scripts.#15130
9b726c4Thanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyChanges how font providers are implemented with updates to the
FontProvidertypeThis is an implementation detail that changes how font providers are created. This process allows Astro to take more control rather than relying directly on
unifonttypes. All of Astro's built-in font providers have been updated to reflect this new type, and can be configured as before. However, using third-party unifont providers that rely onunifonttypes will require an update to your project code.Previously, an Astro
FontProviderwas made of a config and a runtime part. It relied directly onunifonttypes, which allowed a simple configuration for third-party unifont providers, but also coupled Astro's implementation to unifont, which was limiting.Astro's font provider implementation is now only made of a config part with dedicated hooks. This allows for the separation of config and runtime, but requires you to create a font provider object in order to use custom font providers (e.g. third-party unifont providers, or private font registeries).
What should I do?
If you were using a 3rd-party
unifontfont provider, you will now need to write an AstroFontProviderusing it under the hood. For example:// astro.config.ts import { defineConfig } from "astro/config"; import { acmeProvider, type AcmeOptions } from '@​acme/unifont-provider' +import type { FontProvider } from "astro"; +import type { InitializedProvider } from 'unifont'; +function acme(config?: AcmeOptions): FontProvider { + const provider = acmeProvider(config); + let initializedProvider: InitializedProvider | undefined; + return { + name: provider._name, + config, + async init(context) { + initializedProvider = await provider(context); + }, + async resolveFont({ familyName, ...rest }) { + return await initializedProvider?.resolveFont(familyName, rest); + }, + async listFonts() { + return await initializedProvider?.listFonts?.(); + }, + }; +} export default defineConfig({ experimental: { fonts: [{ - provider: acmeProvider({ /* ... */ }), + provider: acme({ /* ... */ }), name: "Material Symbols Outlined", cssVariable: "--font-material" }] } });9cd5b87Thanks @matthewp! - Fixes scripts in components not rendering when a sibling<Fragment slot="...">exists but is unusedv5.16.8Compare Source
Patch Changes
#15124
81db3c0Thanks @leonace924! - Fixes an issue where requests with query parameters to thebasepath would return a 404 if trailingSlash was not'ignore'in development#15152
39ee41fThanks @rururux! - Fixes a case wherecontext.cookies.set()would be overriden when setting cookies via response headers in development#15140
6f6f8f8Thanks @cameronraysmith! - Fixes esbuild warning due to dead code in assets virtual module#15127
2cff904Thanks @Princesseuh! - Updates "Unsupported page types found" error to only appear in more realistic cases#15149
34f84c2Thanks @rahuld109! - Skips "Use the Image component" audit warning for images inside framework components (React, Vue, Svelte, etc.)v5.16.7Compare Source
Patch Changes
#15122
b137946Thanks @florian-lefebvre! - Improves JSDoc annotations forAstroGlobal,AstroSharedContextandAPIContexttypes#15123
3f58fa2Thanks @43081j! - Improves rendering performance by grouping render chunks when emitting from async iterables to avoid encoding costs#14954
7bec4bdThanks @volpeon! - Fixes remote imagesEtagheader handling by disabling internal cache#15052
b2bcd5aThanks @Princesseuh! - Fixes images not working in development when using setups with port forwarding#15028
87b19b8Thanks @Princesseuh! - Fixes certain aliases not working when using images in JSON files with the content layer#15118
cfa382bThanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyRemoves the
defineAstroFontProvider()type helper.If you are building a custom font provider, remove any occurrence of
defineAstroFontProvider()and use theFontProvidertype instead:#15055
4e28db8Thanks @delucis! - Reduces Astro’s install size by around 8 MB#15088
a19140fThanks @martrapp! - Enables the ClientRouter to preserve the original hash part of the target URL during server side redirects.#15117
b1e8e32Thanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyChanges the font format downloaded by default when using the experimental Fonts API. Additionally, adds a new
formatsconfiguration option to specify which font formats to download.Previously, Astro was opinionated about which font sources would be kept for usage, mainly keeping
woff2andwofffiles.You can now specify what font formats should be downloaded (if available). Only
woff2files are downloaded by default.What should I do?
If you were previously relying on Astro downloading the
woffformat, you will now need to specify this explicitly with the newformatsconfiguration option. Additionally, you may also specify any additional file formats to download if available:// astro.config.mjs import { defineConfig, fontProviders } from 'astro/config' export default defineConfig({ experimental: { fonts: [{ name: 'Roboto', cssVariable: '--font-roboto', provider: fontProviders.google(), + formats: ['woff2', 'woff', 'otf'] }] } })8115752Thanks @florian-lefebvre! - Fixes a vite warning log during builds when using npmv5.16.6Compare Source
Patch Changes
#14982
6849e38Thanks @Princesseuh! - Fixes images outside the project directory not working when using astro:assets in development mode#14987
9dd9fcaThanks @Princesseuh! - Fixes SVGs not working in dev mode when using the passthrough image service#15014
a178422Thanks @delucis! - Adds support for extending the type of the props accepted by Astro’s<Image>component,<Picture>component, andgetImage()API.v5.16.5Compare Source
Patch Changes
#14985
c016f10Thanks @florian-lefebvre! - Fixes a case where JSDoc annotations wouldn't show for fonts related APIs in the Astro config#14973
ed7cc2fThanks @amankumarpandeyin! - Fixes performance regression and OOM errors when building medium-sized blogs with many content entries. Replaced O(n²) object spread pattern with direct mutation ingenerateLookupMap.#14958
70eb542Thanks @ascorbic! - Gives a helpful error message if a user setsoutput: "hybrid"in their Astro config.The option was removed in Astro 5, but lots of content online still references it, and LLMs often suggest it. It's not always clear that the replacement is
output: "static", rather thanoutput: "server". This change adds a helpful error message to guide humans and robots.#14901
ef53716Thanks @Darknab! - Updates theglob()loader to log a warning when duplicated IDs are detectedUpdated dependencies [
d8305f8]:v5.16.4Compare Source
Patch Changes
#14940
2cf79c2Thanks @ematipico! - Fixes a bug where Astro didn't properly combine CSP resources from thecspconfiguration with those added using the runtime API (Astro.csp.insertDirective()) to form grammatically correct CSP headersNow Astro correctly deduplicate CSP resources. For example, if you have a global resource in the configuration file, and then you add a
a new one using the runtime APIs.
v5.16.3Compare Source
Patch Changes
#14889
4bceeb0Thanks @florian-lefebvre! - Fixes actions types when using specific TypeScript configurations#14929
e0f277dThanks @matthewp! - Fixes authentication bypass via double URL encoding in middlewarePrevents attackers from bypassing path-based authentication checks using multi-level URL encoding (e.g.,
/%2561dmininstead of/%61dmin). Pathnames are now validated after decoding to ensure no additional encoding remains.v5.16.2Compare Source
Patch Changes
#14876
b43dc7fThanks @florian-lefebvre! - Fixes a vite warning log during builds when using npm#14884
10273e0Thanks @florian-lefebvre! - Fixes a case where setting the status of a page to404in ssr would show an empty page (or404.astropage if provided) instead of using the current pagev5.16.1Compare Source
Patch Changes
#14769
b43ee71Thanks @adriandlam! - Fixes an unhandled rejection issue when using Astro with Vercel Workflow DevKit#14761
345eb22Thanks @ooga! - Updatesbuttonattributes types to allowcommandandcommandfor#14866
65e214bThanks [@​Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.