#144714296373 Thanks @Slackluky! - Adds the ability to split sitemap generation into chunks based on customizable logic. This allows for better management of large sitemaps and improved performance. The new chunks option in the sitemap configuration allows users to define functions that categorize sitemap items into different chunks. Each chunk is then written to a separate sitemap file.
integrations: [
sitemap({
serialize(item) { th
return item
},
chunks: { // this property will be treated last on the configuration
'blog': (item) => { // will produce a sitemap file with `blog` name (sitemap-blog-0.xml)
if (/blog/.test(item.url)) { // filter path that will be included in this specific sitemap file
item.changefreq = 'weekly';
item.lastmod = new Date();
item.priority = 0.9; // define specific properties for this filtered path
return item;
}
},
'glossary': (item) => {
if (/glossary/.test(item.url)) {
item.changefreq = 'weekly';
item.lastmod = new Date();
item.priority = 0.7;
return item;
}
}
// the rest of the path will be stored in `sitemap-pages.0.xml`
},
}),
],
Removes the getFontBuffer() helper function exported from astro:assets when using the experimental Fonts API
This experimental feature introduced in v15.6.13 ended up causing significant memory usage during build. This feature has been removed and will be reintroduced after further exploration and testing.
If you were relying on this function, you can replicate the previous behavior manually:
On prerendered routes, read the file using node:fs
On server rendered routes, fetch files using URLs from fontData and context.url
#14932b19d816 Thanks @patrickarlt! - Adds support for returning a Promise from the parser() option of the file() loader
This enables you to run asynchronous code such as fetching remote data or using async parsers when loading files with the Content Layer API.
For example:
import{defineCollection}from'astro:content';import{file}from'astro/loaders';constblog=defineCollection({loader:file('src/data/blog.json',{parser:async(text)=>{constdata=JSON.parse(text);// Perform async operations like fetching additional data
constenrichedData=awaitfetch(`https://api.example.com/enrich`,{method:'POST',body:JSON.stringify(data),}).then((res)=>res.json());returnenrichedData;},}),});exportconstcollections={blog};
#15171f220726 Thanks @mark-ignacio! - Adds a new, optional kernel configuration option to select a resize algorithm in the Sharp image service
By default, Sharp resizes images with the lanczos3 kernel. This new config option allows you to set the default resizing algorithm to any resizing option supported by Sharp (e.g. linear, mks2021).
Kernel selection can produce quite noticeable differences depending on various characteristics of the source image - especially drawn art - so changing the kernel gives you more control over the appearance of images on your site:
This selection will apply to all images on your site, and is not yet configurable on a per-image basis. For more information, see Sharps documentation on resizing images.
#1506308e0fd7 Thanks @jmortlock! - Adds a new partitioned option when setting a cookie to allow creating partitioned cookies.
Partitioned cookies can only be read within the context of the top-level site on which they were set. This allows cross-site tracking to be blocked, while still enabling legitimate uses of third-party cookies.
You can create a partitioned cookie by passing partitioned: true when setting a cookie. Note that partitioned cookies must also be set with secure: true:
#15022f1fce0e Thanks @ascorbic! - Adds a new retainBody option to the glob() loader to allow reducing the size of the data store.
Currently, the glob() loader stores the raw body of each content file in the entry, in addition to the rendered HTML.
The retainBody option defaults to true, but you can set it to false to prevent the raw body of content files from being stored in the data store. This significantly reduces the deployed size of the data store and helps avoid hitting size limits for sites with very large collections.
The rendered body will still be available in the entry.rendered.html property for markdown files, and the entry.filePath property will still point to the original file.
When retainBody is false, entry.body will be undefined instead of containing the raw file contents.
#15153928529f Thanks @jcayzac! - Adds a new background property to the <Image /> component.
This optional property lets you pass a background color to flatten the image with. By default, Sharp uses a black background when flattening an image that is being converted to a format that does not support transparency (e.g. jpeg). Providing a value for background on an <Image /> component, or passing it to the getImage() helper, will flatten images using that color instead.
This is especially useful when the requested output format doesn't support an alpha channel (e.g. jpeg) and can't support transparent backgrounds.
---
import { Image } from 'astro:assets';
---
<Image
src="/transparent.png"
alt="A JPEG with a white background!"
format="jpeg"
background="#ffffff"
/>
#1501554f6006 Thanks @tony! - Adds optional placement config option for the dev toolbar.
You can now configure the default toolbar position ('bottom-left', 'bottom-center', or 'bottom-right') via devToolbar.placement in your Astro config. This option is helpful for sites with UI elements (chat widgets, cookie banners) that are consistently obscured by the toolbar in the dev environment.
You can set a project default that is consistent across environments (e.g. dev machines, browser instances, team members):
User preferences from the toolbar UI (stored in localStorage) still take priority, so this setting can be overridden in individual situations as necessary.
#15281a1b80c6 Thanks @matthewp! - Ensures server island requests carry an encrypted component export identifier so they do not accidentally resolve to the wrong component.
#152860aafc83 Thanks @florian-lefebvre! - Fixes a case where font providers provided as class instances may not work when using the experimental Fonts API. It affected the local provider
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.
When building a custom FontProvider for the experimental Fonts API, the init() method receives a context. This context now exposes a root URL, useful for resolving local files:
#15182cb60ee1 Thanks @florian-lefebvre! - Adds a new getFontBuffer() method to retrieve font file buffers when using the experimental Fonts API
The getFontData() helper function from astro:assets was 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 from astro:assets to retrieve font file buffers from URL returned by getFontData(). For example, when using satori to generate OpenGraph images:
Previously, an Astro FontProvider could 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:
Removes getFontData() exported from astro:assets with fontData when using the experimental Fonts API
Accessing 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 given cssVariable. That was however limiting for programmatic usages that need to access all font data.
The getFontData() helper function is removed and replaced by a new fontData object:
-import { getFontData } from "astro:assets";
-const data = getFontData("--font-roboto")
+import { fontData } from "astro:assets";
+const data = fontData["--font-roboto"]
We may reintroduce getFontData() later on for a more friendly DX, based on your feedback.
#152548d84b30 Thanks @lamalex! - Fixes CSS assetsPrefix with remote URLs incorrectly prepending a forward slash
When using build.assetsPrefix with 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.
#15178731f52d Thanks @kedarvartak! - Fixes an issue where stopping the dev server with q+enter incorrectly created a dist folder and copied font files when using the experimental Fonts API
#152303da6272 Thanks @rahuld109! - Fixes greedy regex in error message markdown rendering that caused link syntax examples to capture extra characters
#152532a6315a Thanks @matthewp! - Fixes hydration for React components nested inside HTML elements in MDX files
#152279a609f4 Thanks @matthewp! - Fixes styles not being included for conditionally rendered Svelte 5 components in production builds
#14607ee52160 Thanks @simensfo! - Reintroduces css deduplication for hydrated client components. Ensures assets already added to a client chunk are not flagged as orphaned
#150179e7a3c8 Thanks @ixchio! - Fixes CSS double-bundling when the same CSS file is imported in both a page's frontmatter and a component's script tag
2fa19c4 - Improved error handling in the rendering phase
Added defensive validation in App.render() and #renderError() to provide a descriptive error message when a route module doesn't have a valid page function.
#15150a77c4f4 Thanks @matthewp! - Fixes hydration for framework components inside MDX when using Astro.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.
Changes how font providers are implemented with updates to the FontProvider type
This is an implementation detail that changes how font providers are created. This process allows Astro to take more control rather than relying directly on unifont types. 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 on unifont types will require an update to your project code.
Previously, an Astro FontProvider was made of a config and a runtime part. It relied directly on unifont types, 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 unifont font provider, you will now need to write an Astro FontProvider using it under the hood. For example:
#1512481db3c0 Thanks @leonace924! - Fixes an issue where requests with query parameters to the base path would return a 404 if trailingSlash was not 'ignore' in development
#1515239ee41f Thanks @rururux! - Fixes a case where context.cookies.set() would be overriden when setting cookies via response headers in development
Changes the font format downloaded by default when using the experimental Fonts API. Additionally, adds a new formats configuration option to specify which font formats to download.
Previously, Astro was opinionated about which font sources would be kept for usage, mainly keeping woff2 and woff files.
You can now specify what font formats should be downloaded (if available). Only woff2 files are downloaded by default.
What should I do?
If you were previously relying on Astro downloading the woff format, you will now need to specify this explicitly with the new formats configuration option. Additionally, you may also specify any additional file formats to download if available:
#149826849e38 Thanks @Princesseuh! - Fixes images outside the project directory not working when using astro:assets in development mode
#149879dd9fca Thanks @Princesseuh! - Fixes SVGs not working in dev mode when using the passthrough image service
#15014a178422 Thanks @delucis! - Adds support for extending the type of the props accepted by Astro’s <Image> component, <Picture> component, and getImage() API.
#14985c016f10 Thanks @florian-lefebvre! - Fixes a case where JSDoc annotations wouldn't show for fonts related APIs in the Astro config
#14973ed7cc2f Thanks @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 in generateLookupMap.
#1495870eb542 Thanks @ascorbic! - Gives a helpful error message if a user sets output: "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 than output: "server". This change adds a helpful error message to guide humans and robots.
#14901ef53716 Thanks @Darknab! - Updates the glob() loader to log a warning when duplicated IDs are detected
#149402cf79c2 Thanks @ematipico! - Fixes a bug where Astro didn't properly combine CSP resources from the csp configuration with those added using the runtime API (Astro.csp.insertDirective()) to form grammatically correct CSP headers
Now 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.
Include available printers in plugin type declarations (#18706 by @porada)
// Input
import*asprettierPluginEstreefrom"prettier/plugins/estree";// Prettier 3.8.0
// Property 'printers' does not exist on type 'typeof import("prettier/plugins/estree")'. ts(2339)
prettierPluginEstree.printers.estree;//=> any
// Prettier 3.8.1
prettierPluginEstree.printers.estree;//=> Printer
prettierPluginEstree.printers["estree-json"];//=> Printer
Allow numbers with complex units (more than one numerator unit or more than
zero denominator units) to be emitted to CSS. These are now emitted as calc() expressions, which now support complex units in plain CSS.
Add support for the CSS-style if() function. In addition to supporting the
plain CSS syntax, this also supports a sass() query that takes a Sass
expression that evaluates to true or false at preprocessing time depending
on whether the Sass value is truthy. If there are no plain-CSS queries, the
function will return the first value whose query returns true during
preprocessing. For example, if(sass(false): 1; sass(true): 2; else: 3)
returns 2.
The old Sass if() syntax is now deprecated. Users are encouraged to migrate
to the new CSS syntax. if($condition, $if-true, $if-false) can be changed to if(sass($condition): $if-true; else: $if-false).
Plain-CSS if() functions are now considered "special numbers", meaning that
they can be used in place of arguments to CSS color functions.
Plain-CSS if() functions and attr() functions are now considered "special
variable strings" (like var()), meaning they can now be used in place of
multiple arguments or syntax fragments in various CSS functions.
This PR contains the following updates:
| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@astrojs/rss](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro-rss)) | [`4.0.14` → `4.0.15`](https://renovatebot.com/diffs/npm/@astrojs%2frss/4.0.14/4.0.15) |  |  |
| [@astrojs/sitemap](https://docs.astro.build/en/guides/integrations-guide/sitemap/) ([source](https://github.com/withastro/astro/tree/HEAD/packages/integrations/sitemap)) | [`3.6.0` → `3.7.0`](https://renovatebot.com/diffs/npm/@astrojs%2fsitemap/3.6.0/3.7.0) |  |  |
| [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`5.16.3` → `5.17.1`](https://renovatebot.com/diffs/npm/astro/5.16.3/5.17.1) |  |  |
| [autoprefixer](https://github.com/postcss/autoprefixer) | [`10.4.22` → `10.4.23`](https://renovatebot.com/diffs/npm/autoprefixer/10.4.22/10.4.23) |  |  |
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | [`3.7.3` → `3.8.1`](https://renovatebot.com/diffs/npm/prettier/3.7.3/3.8.1) |  |  |
| [sass](https://github.com/sass/dart-sass) | [`1.94.2` → `1.97.3`](https://renovatebot.com/diffs/npm/sass/1.94.2/1.97.3) |  |  |
| [satori](https://github.com/vercel/satori) | [`0.18.3` → `0.19.1`](https://renovatebot.com/diffs/npm/satori/0.18.3/0.19.1) |  |  |
---
### Release Notes
<details>
<summary>withastro/astro (@​astrojs/rss)</summary>
### [`v4.0.15`](https://github.com/withastro/astro/blob/HEAD/packages/astro-rss/CHANGELOG.md#4015)
[Compare Source](https://github.com/withastro/astro/compare/@astrojs/rss@4.0.14...@astrojs/rss@4.0.15)
##### Patch Changes
- [#​15199](https://github.com/withastro/astro/pull/15199) [`d8e64ef`](https://github.com/withastro/astro/commit/d8e64ef77ef364b1541a5d192bcff299135d3bc8) Thanks [@​ArmandPhilippot](https://github.com/ArmandPhilippot)! - Fixes the links to Astro Docs so that they match the current docs structure.
</details>
<details>
<summary>withastro/astro (@​astrojs/sitemap)</summary>
### [`v3.7.0`](https://github.com/withastro/astro/blob/HEAD/packages/integrations/sitemap/CHANGELOG.md#370)
[Compare Source](https://github.com/withastro/astro/compare/@astrojs/sitemap@3.6.1...@astrojs/sitemap@3.7.0)
##### Minor Changes
- [#​14471](https://github.com/withastro/astro/pull/14471) [`4296373`](https://github.com/withastro/astro/commit/42963732165959795067e11486f10fa2ac5a48cd) Thanks [@​Slackluky](https://github.com/Slackluky)! - Adds the ability to split sitemap generation into chunks based on customizable logic. This allows for better management of large sitemaps and improved performance. The new `chunks` option in the sitemap configuration allows users to define functions that categorize sitemap items into different chunks. Each chunk is then written to a separate sitemap file.
```
integrations: [
sitemap({
serialize(item) { th
return item
},
chunks: { // this property will be treated last on the configuration
'blog': (item) => { // will produce a sitemap file with `blog` name (sitemap-blog-0.xml)
if (/blog/.test(item.url)) { // filter path that will be included in this specific sitemap file
item.changefreq = 'weekly';
item.lastmod = new Date();
item.priority = 0.9; // define specific properties for this filtered path
return item;
}
},
'glossary': (item) => {
if (/glossary/.test(item.url)) {
item.changefreq = 'weekly';
item.lastmod = new Date();
item.priority = 0.7;
return item;
}
}
// the rest of the path will be stored in `sitemap-pages.0.xml`
},
}),
],
```
### [`v3.6.1`](https://github.com/withastro/astro/blob/HEAD/packages/integrations/sitemap/CHANGELOG.md#361)
[Compare Source](https://github.com/withastro/astro/compare/@astrojs/sitemap@3.6.0...@astrojs/sitemap@3.6.1)
##### Patch Changes
- [#​15033](https://github.com/withastro/astro/pull/15033) [`dd06779`](https://github.com/withastro/astro/commit/dd067798c02bff4968b23ce92670685a4e99ccdc) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Updates how routes are retrieved to avoid relying on a deprecated API
</details>
<details>
<summary>withastro/astro (astro)</summary>
### [`v5.17.1`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5171)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.17.0...astro@5.17.1)
##### Patch Changes
- [#​15334](https://github.com/withastro/astro/pull/15334) [`d715f1f`](https://github.com/withastro/astro/commit/d715f1f88777a4ce0fb61c8043cccfbac2486ab4) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - **BREAKING CHANGE to the experimental Fonts API only**
Removes the `getFontBuffer()` helper function exported from `astro:assets` when using the experimental Fonts API
This experimental feature introduced in v15.6.13 ended up causing significant memory usage during build. This feature has been removed and will be reintroduced after further exploration and testing.
If you were relying on this function, you can replicate the previous behavior manually:
- On prerendered routes, read the file using `node:fs`
- On server rendered routes, fetch files using URLs from `fontData` and `context.url`
### [`v5.17.0`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5170)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.16...astro@5.17.0)
##### Minor Changes
- [#​14932](https://github.com/withastro/astro/pull/14932) [`b19d816`](https://github.com/withastro/astro/commit/b19d816c914022c4e618d6012e09aed82be34213) Thanks [@​patrickarlt](https://github.com/patrickarlt)! - Adds support for returning a Promise from the `parser()` option of the `file()` loader
This enables you to run asynchronous code such as fetching remote data or using async parsers when loading files with the Content Layer API.
For example:
```js
import { defineCollection } from 'astro:content';
import { file } from 'astro/loaders';
const blog = defineCollection({
loader: file('src/data/blog.json', {
parser: async (text) => {
const data = JSON.parse(text);
// Perform async operations like fetching additional data
const enrichedData = await fetch(`https://api.example.com/enrich`, {
method: 'POST',
body: JSON.stringify(data),
}).then((res) => res.json());
return enrichedData;
},
}),
});
export const collections = { blog };
```
See [the `parser()` reference documentation](https://docs.astro.build/en/reference/content-loader-reference/#parser) for more information.
- [#​15171](https://github.com/withastro/astro/pull/15171) [`f220726`](https://github.com/withastro/astro/commit/f22072607c79f5ba3459ba7522cfdf2581f1869b) Thanks [@​mark-ignacio](https://github.com/mark-ignacio)! - Adds a new, optional `kernel` configuration option to select a resize algorithm in the Sharp image service
By default, Sharp resizes images with the `lanczos3` kernel. This new config option allows you to set the default resizing algorithm to any resizing option supported by [Sharp](https://sharp.pixelplumbing.com/api-resize/#resize) (e.g. `linear`, `mks2021`).
Kernel selection can produce quite noticeable differences depending on various characteristics of the source image - especially drawn art - so changing the kernel gives you more control over the appearance of images on your site:
```js
export default defineConfig({
image: {
service: {
entrypoint: 'astro/assets/services/sharp',
config: {
kernel: "mks2021"
}
}
})
```
This selection will apply to all images on your site, and is not yet configurable on a per-image basis. For more information, see [Sharps documentation on resizing images](https://sharp.pixelplumbing.com/api-resize/#resize).
- [#​15063](https://github.com/withastro/astro/pull/15063) [`08e0fd7`](https://github.com/withastro/astro/commit/08e0fd723742dda4126665f5e32f4065899af83e) Thanks [@​jmortlock](https://github.com/jmortlock)! - Adds a new `partitioned` option when setting a cookie to allow creating partitioned cookies.
[Partitioned cookies](https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Privacy_sandbox/Partitioned_cookies) can only be read within the context of the top-level site on which they were set. This allows cross-site tracking to be blocked, while still enabling legitimate uses of third-party cookies.
You can create a partitioned cookie by passing `partitioned: true` when setting a cookie. Note that partitioned cookies must also be set with `secure: true`:
```js
Astro.cookies.set('my-cookie', 'value', {
partitioned: true,
secure: true,
});
```
For more information, see the [`AstroCookieSetOptions` API reference](https://docs.astro.build/en/reference/api-reference/#astrocookiesetoptions).
- [#​15022](https://github.com/withastro/astro/pull/15022) [`f1fce0e`](https://github.com/withastro/astro/commit/f1fce0e7cc3c1122bf5c4f1c5985ca716c8417db) Thanks [@​ascorbic](https://github.com/ascorbic)! - Adds a new `retainBody` option to the `glob()` loader to allow reducing the size of the data store.
Currently, the `glob()` loader stores the raw body of each content file in the entry, in addition to the rendered HTML.
The `retainBody` option defaults to `true`, but you can set it to `false` to prevent the raw body of content files from being stored in the data store. This significantly reduces the deployed size of the data store and helps avoid hitting size limits for sites with very large collections.
The rendered body will still be available in the `entry.rendered.html` property for markdown files, and the `entry.filePath` property will still point to the original file.
```js
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
const blog = defineCollection({
loader: glob({
pattern: '**/*.md',
base: './src/content/blog',
retainBody: false,
}),
});
```
When `retainBody` is `false`, `entry.body` will be `undefined` instead of containing the raw file contents.
- [#​15153](https://github.com/withastro/astro/pull/15153) [`928529f`](https://github.com/withastro/astro/commit/928529f824d37e9bfb297ff931ebfcb3f0b56428) Thanks [@​jcayzac](https://github.com/jcayzac)! - Adds a new `background` property to the `<Image />` component.
This optional property lets you pass a background color to flatten the image with. By default, Sharp uses a black background when flattening an image that is being converted to a format that does not support transparency (e.g. `jpeg`). Providing a value for `background` on an `<Image />` component, or passing it to the `getImage()` helper, will flatten images using that color instead.
This is especially useful when the requested output format doesn't support an alpha channel (e.g. `jpeg`) and can't support transparent backgrounds.
```astro
---
import { Image } from 'astro:assets';
---
<Image
src="/transparent.png"
alt="A JPEG with a white background!"
format="jpeg"
background="#ffffff"
/>
```
See more about this new property in [the image reference docs](https://docs.astro.build/en/reference/modules/astro-assets/#background)
- [#​15015](https://github.com/withastro/astro/pull/15015) [`54f6006`](https://github.com/withastro/astro/commit/54f6006c3ddae8935a5550e2c3b38d25bf662ea6) Thanks [@​tony](https://github.com/tony)! - Adds optional `placement` config option for the dev toolbar.
You can now configure the default toolbar position (`'bottom-left'`, `'bottom-center'`, or `'bottom-right'`) via `devToolbar.placement` in your Astro config. This option is helpful for sites with UI elements (chat widgets, cookie banners) that are consistently obscured by the toolbar in the dev environment.
You can set a project default that is consistent across environments (e.g. dev machines, browser instances, team members):
```js
// astro.config.mjs
export default defineConfig({
devToolbar: {
placement: 'bottom-left',
},
});
```
User preferences from the toolbar UI (stored in `localStorage`) still take priority, so this setting can be overridden in individual situations as necessary.
### [`v5.16.16`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#51616)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.15...astro@5.16.16)
##### Patch Changes
- [#​15281](https://github.com/withastro/astro/pull/15281) [`a1b80c6`](https://github.com/withastro/astro/commit/a1b80c65e5dddefba7ada20c7ccfdab26fb4e16b) Thanks [@​matthewp](https://github.com/matthewp)! - Ensures server island requests carry an encrypted component export identifier so they do not accidentally resolve to the wrong component.
- [#​15304](https://github.com/withastro/astro/pull/15304) [`02ee3c7`](https://github.com/withastro/astro/commit/02ee3c745297203c38ee013b500126b15f7e5fc9) Thanks [@​cameronapak](https://github.com/cameronapak)! - Fix: Remove await from getActionResult example
- [#​15324](https://github.com/withastro/astro/pull/15324) [`ab41c3e`](https://github.com/withastro/astro/commit/ab41c3e789b821e9179d11d67f453ba955448be6) Thanks [@​Princesseuh](https://github.com/Princesseuh)! - Fixes an issue where certain unauthorized links could be rendered as clickable in the error overlay
### [`v5.16.15`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#51615)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.14...astro@5.16.15)
##### Patch Changes
- [#​15286](https://github.com/withastro/astro/pull/15286) [`0aafc83`](https://github.com/withastro/astro/commit/0aafc8342a47f5c96cd13bfc02539d89c3c358a7) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a case where font providers provided as class instances may not work when using the experimental Fonts API. It affected the local provider
### [`v5.16.14`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#51614)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.13...astro@5.16.14)
##### Patch Changes
- [#​15213](https://github.com/withastro/astro/pull/15213) [`c775fce`](https://github.com/withastro/astro/commit/c775fce98f50001bc59025dceaf8ea5287675f17) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - **BREAKING CHANGE to the experimental Fonts API only**
Updates 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:
```diff
-import { defineConfig } from "astro/config";
+import { defineConfig, fontProviders } from "astro/config";
export default defineConfig({
experimental: {
fonts: [{
name: "Custom",
cssVariable: "--font-custom",
- provider: "local",
+ provider: fontProviders.local(),
+ options: {
variants: [
{
weight: 400,
style: "normal",
src: ["./src/assets/fonts/custom-400.woff2"]
},
{
weight: 700,
style: "normal",
src: ["./src/assets/fonts/custom-700.woff2"]
}
// ...
]
+ }
}]
}
});
```
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](https://docs.astro.build/en/reference/experimental-flags/fonts/) for more information.
- [#​15213](https://github.com/withastro/astro/pull/15213) [`c775fce`](https://github.com/withastro/astro/commit/c775fce98f50001bc59025dceaf8ea5287675f17) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Exposes `root` on `FontProvider` `init()` context
When building a custom `FontProvider` for the experimental Fonts API, the `init()` method receives a `context`. This context now exposes a `root` URL, useful for resolving local files:
```diff
import type { FontProvider } from "astro";
export function registryFontProvider(): FontProvider {
return {
// ...
- init: async ({ storage }) => {
+ init: async ({ storage, root }) => {
// ...
},
};
}
```
- [#​15185](https://github.com/withastro/astro/pull/15185) [`edabeaa`](https://github.com/withastro/astro/commit/edabeaa3cd3355fa33e4eb547656033fe7b66845) Thanks [@​EricGrill](https://github.com/EricGrill)! - Add `.vercel` to `.gitignore` when adding the Vercel adapter via `astro add vercel`
### [`v5.16.13`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#51613)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.12...astro@5.16.13)
##### Patch Changes
- [#​15182](https://github.com/withastro/astro/pull/15182) [`cb60ee1`](https://github.com/withastro/astro/commit/cb60ee16051da258ab140f3bb64ff3fd8e4c9e17) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Adds a new `getFontBuffer()` method to retrieve font file buffers when using the experimental Fonts API
The `getFontData()` helper function from `astro:assets` was 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 from `astro:assets` to retrieve font file buffers from URL returned by `getFontData()`. For example, when using [satori](https://github.com/vercel/satori) to generate OpenGraph images:
```diff
// 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](https://docs.astro.build/en/reference/experimental-flags/fonts/#accessing-font-data-programmatically) for more information.
### [`v5.16.12`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#51612)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.11...astro@5.16.12)
##### Patch Changes
- [#​15175](https://github.com/withastro/astro/pull/15175) [`47ae148`](https://github.com/withastro/astro/commit/47ae1480eecd5da7080f1e659b6aef211aaf3300) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Allows experimental Font providers to specify family options
Previously, an Astro `FontProvider` could only accept options at the provider level when called. That could result in weird data structures for family-specific options.
Astro `FontProvider`s can now declare family-specific options, by specifying a generic:
```diff
// 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:
```diff
// 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](https://github.com/withastro/astro/pull/15175) [`47ae148`](https://github.com/withastro/astro/commit/47ae1480eecd5da7080f1e659b6aef211aaf3300) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - **BREAKING CHANGE to the experimental Fonts API only**
Updates 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 `options` property instead. For example using the Google provider:
```diff
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](https://github.com/withastro/astro/pull/15200) [`c0595b3`](https://github.com/withastro/astro/commit/c0595b3e71a3811921ddc24e6ed7538c0df53a96) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - **BREAKING CHANGE to the experimental Fonts API only**
Removes `getFontData()` exported from `astro:assets` with `fontData` when using the experimental Fonts API
Accessing 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 given `cssVariable`. That was however limiting for programmatic usages that need to access all font data.
The `getFontData()` helper function is removed and replaced by a new `fontData` object:
```diff
-import { getFontData } from "astro:assets";
-const data = getFontData("--font-roboto")
+import { fontData } from "astro:assets";
+const data = fontData["--font-roboto"]
```
We may reintroduce `getFontData()` later on for a more friendly DX, based on your feedback.
- [#​15254](https://github.com/withastro/astro/pull/15254) [`8d84b30`](https://github.com/withastro/astro/commit/8d84b3040181018f358b4e5684f9df55949aa4ca) Thanks [@​lamalex](https://github.com/lamalex)! - Fixes CSS `assetsPrefix` with remote URLs incorrectly prepending a forward slash
When using `build.assetsPrefix` with 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](https://github.com/withastro/astro/pull/15178) [`731f52d`](https://github.com/withastro/astro/commit/731f52dd68c538a3372d4ac078e72d1090cc4cce) Thanks [@​kedarvartak](https://github.com/kedarvartak)! - Fixes an issue where stopping the dev server with `q+enter` incorrectly created a `dist` folder and copied font files when using the experimental Fonts API
- [#​15230](https://github.com/withastro/astro/pull/15230) [`3da6272`](https://github.com/withastro/astro/commit/3da62721f02e7cbf1344ae9766ca73cae71b23c8) Thanks [@​rahuld109](https://github.com/rahuld109)! - Fixes greedy regex in error message markdown rendering that caused link syntax examples to capture extra characters
- [#​15253](https://github.com/withastro/astro/pull/15253) [`2a6315a`](https://github.com/withastro/astro/commit/2a6315a3a38273ed47e4aa16a4dd9449fc7927c9) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes hydration for React components nested inside HTML elements in MDX files
- [#​15227](https://github.com/withastro/astro/pull/15227) [`9a609f4`](https://github.com/withastro/astro/commit/9a609f4a6264fc2238e02cffb00a9285f4a10973) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes styles not being included for conditionally rendered Svelte 5 components in production builds
- [#​14607](https://github.com/withastro/astro/pull/14607) [`ee52160`](https://github.com/withastro/astro/commit/ee52160f3374f65d1a8cb460c1340172902313bc) Thanks [@​simensfo](https://github.com/simensfo)! - Reintroduces css deduplication for hydrated client components. Ensures assets already added to a client chunk are not flagged as orphaned
### [`v5.16.11`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#51611)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.10...astro@5.16.11)
##### Patch Changes
- [#​15017](https://github.com/withastro/astro/pull/15017) [`9e7a3c8`](https://github.com/withastro/astro/commit/9e7a3c86198956e558384235b71a6c12e87fc5fb) Thanks [@​ixchio](https://github.com/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](https://github.com/withastro/astro/pull/15225) [`6fe62e1`](https://github.com/withastro/astro/commit/6fe62e169cf9e1054cba95ce4084d8a58bdd0a66) Thanks [@​ematipico](https://github.com/ematipico)! - Updates to the latest version of `devalue`
### [`v5.16.10`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#51610)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.9...astro@5.16.10)
##### Patch Changes
- [`2fa19c4`](https://github.com/withastro/astro/commit/2fa19c41be895e5255a8b12a43f9f9691cb57e5d) - Improved error handling in the rendering phase
Added 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](https://github.com/withastro/astro/pull/15199) [`d8e64ef`](https://github.com/withastro/astro/commit/d8e64ef77ef364b1541a5d192bcff299135d3bc8) Thanks [@​ArmandPhilippot](https://github.com/ArmandPhilippot)! - Fixes the links to Astro Docs so that they match the current docs structure.
- [#​15169](https://github.com/withastro/astro/pull/15169) [`b803d8b`](https://github.com/withastro/astro/commit/b803d8b4b4e5e71ef4b28b23186e2786dc80a308) Thanks [@​rururux](https://github.com/rururux)! - fix: fix image 500 error when moving dist directory in standalone Node
- [#​14622](https://github.com/withastro/astro/pull/14622) [`9b35c62`](https://github.com/withastro/astro/commit/9b35c62cb38d3507f426b872d972b1b4d7b20bc8) Thanks [@​aprici7y](https://github.com/aprici7y)! - Fixes CSS url() references to public assets returning 404 in dev mode when base path is configured
- [#​15219](https://github.com/withastro/astro/pull/15219) [`43df4ce`](https://github.com/withastro/astro/commit/43df4ce1c6c221a751b640c45687adfa83226e7c) Thanks [@​matthewp](https://github.com/matthewp)! - Upgrades the `diff` package to v8
### [`v5.16.9`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5169)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.8...astro@5.16.9)
##### Patch Changes
- [#​15174](https://github.com/withastro/astro/pull/15174) [`37ab65a`](https://github.com/withastro/astro/commit/37ab65acb1af6e41d25ec29f3c04c690c7601c87) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Adds Google Icons to built-in font providers
To start using it, access it on `fontProviders`:
```ts
import { defineConfig, fontProviders } from 'astro/config';
export default defineConfig({
experimental: {
fonts: [
{
name: 'Material Symbols Outlined',
provider: fontProviders.googleicons(),
cssVariable: '--font-material',
},
],
},
});
```
- [#​15150](https://github.com/withastro/astro/pull/15150) [`a77c4f4`](https://github.com/withastro/astro/commit/a77c4f42b56b46b08064a99e9cb9a2b4bace4445) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes hydration for framework components inside MDX when using `Astro.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](https://github.com/withastro/astro/pull/15130) [`9b726c4`](https://github.com/withastro/astro/commit/9b726c4e36bb1560badf5bf9b78783a240939124) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - **BREAKING CHANGE to the experimental Fonts API only**
Changes how font providers are implemented with updates to the `FontProvider` type
This is an implementation detail that changes how font providers are created. This process allows Astro to take more control rather than relying directly on `unifont` types. **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 on `unifont` types will require an update to your project code.
Previously, an Astro `FontProvider` was made of a config and a runtime part. It relied directly on `unifont` types, 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 `unifont` font provider, you will now need to write an Astro `FontProvider` using it under the hood. For example:
```diff
// 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"
}]
}
});
```
- [#​15147](https://github.com/withastro/astro/pull/15147) [`9cd5b87`](https://github.com/withastro/astro/commit/9cd5b875f2d45a08bfa8312ed7282a6f0f070265) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes scripts in components not rendering when a sibling `<Fragment slot="...">` exists but is unused
### [`v5.16.8`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5168)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.7...astro@5.16.8)
##### Patch Changes
- [#​15124](https://github.com/withastro/astro/pull/15124) [`81db3c0`](https://github.com/withastro/astro/commit/81db3c06e8f75bf1ec6f3d4d31a42d16dcf0e969) Thanks [@​leonace924](https://github.com/leonace924)! - Fixes an issue where requests with query parameters to the `base` path would return a 404 if trailingSlash was not `'ignore'` in development
- [#​15152](https://github.com/withastro/astro/pull/15152) [`39ee41f`](https://github.com/withastro/astro/commit/39ee41fa56b362942162dc17b0b4252d2f881e7e) Thanks [@​rururux](https://github.com/rururux)! - Fixes a case where `context.cookies.set()` would be overriden when setting cookies via response headers in development
- [#​15140](https://github.com/withastro/astro/pull/15140) [`6f6f8f8`](https://github.com/withastro/astro/commit/6f6f8f8c0c3ccf346d741a8625bbfbe1329e472e) Thanks [@​cameronraysmith](https://github.com/cameronraysmith)! - Fixes esbuild warning due to dead code in assets virtual module
- [#​15127](https://github.com/withastro/astro/pull/15127) [`2cff904`](https://github.com/withastro/astro/commit/2cff9045256a2b551465750de7cba29087046658) Thanks [@​Princesseuh](https://github.com/Princesseuh)! - Updates "Unsupported page types found" error to only appear in more realistic cases
- [#​15149](https://github.com/withastro/astro/pull/15149) [`34f84c2`](https://github.com/withastro/astro/commit/34f84c2437fd078e299a29eeb1f931c9f83c8d2e) Thanks [@​rahuld109](https://github.com/rahuld109)! - Skips "Use the Image component" audit warning for images inside framework components (React, Vue, Svelte, etc.)
### [`v5.16.7`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5167)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.6...astro@5.16.7)
##### Patch Changes
- [#​15122](https://github.com/withastro/astro/pull/15122) [`b137946`](https://github.com/withastro/astro/commit/b1379466e8c6ded9fbcc3687c7faca4c2d3472b2) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Improves JSDoc annotations for `AstroGlobal`, `AstroSharedContext` and `APIContext` types
- [#​15123](https://github.com/withastro/astro/pull/15123) [`3f58fa2`](https://github.com/withastro/astro/commit/3f58fa20540ee3753158d8d0372affa47775c561) Thanks [@​43081j](https://github.com/43081j)! - Improves rendering performance by grouping render chunks when emitting from async iterables to avoid encoding costs
- [#​14954](https://github.com/withastro/astro/pull/14954) [`7bec4bd`](https://github.com/withastro/astro/commit/7bec4bdadda1d66da1c7dc0a01ad4412a47337d9) Thanks [@​volpeon](https://github.com/volpeon)! - Fixes remote images `Etag` header handling by disabling internal cache
- [#​15052](https://github.com/withastro/astro/pull/15052) [`b2bcd5a`](https://github.com/withastro/astro/commit/b2bcd5af28dfb75541f3249b0277b458355395cf) Thanks [@​Princesseuh](https://github.com/Princesseuh)! - Fixes images not working in development when using setups with port forwarding
- [#​15028](https://github.com/withastro/astro/pull/15028) [`87b19b8`](https://github.com/withastro/astro/commit/87b19b8df49d08ee7a7a1855f3645fe7bebf1997) Thanks [@​Princesseuh](https://github.com/Princesseuh)! - Fixes certain aliases not working when using images in JSON files with the content layer
- [#​15118](https://github.com/withastro/astro/pull/15118) [`cfa382b`](https://github.com/withastro/astro/commit/cfa382b7aa23a9f5a506181c75a0706595208396) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - **BREAKING CHANGE to the experimental Fonts API only**
Removes the `defineAstroFontProvider()` type helper.
If you are building a custom font provider, remove any occurrence of `defineAstroFontProvider()` and use the `FontProvider` type instead:
```diff
-import { defineAstroFontProvider } from 'astro/config';
-export function myProvider() {
- return defineAstroFontProvider({
- entrypoint: new URL('./implementation.js', import.meta.url)
- });
-};
+import type { FontProvider } from 'astro';
+export function myProvider(): FontProvider {
+ return {
+ entrypoint: new URL('./implementation.js', import.meta.url)
+ },
+}
```
- [#​15055](https://github.com/withastro/astro/pull/15055) [`4e28db8`](https://github.com/withastro/astro/commit/4e28db8d125b693039b393111fa48d7bcc913968) Thanks [@​delucis](https://github.com/delucis)! - Reduces Astro’s install size by around 8 MB
- [#​15088](https://github.com/withastro/astro/pull/15088) [`a19140f`](https://github.com/withastro/astro/commit/a19140fd11efbc635a391d176da54b0dc5e4a99c) Thanks [@​martrapp](https://github.com/martrapp)! - Enables the ClientRouter to preserve the original hash part of the target URL during server side redirects.
- [#​15117](https://github.com/withastro/astro/pull/15117) [`b1e8e32`](https://github.com/withastro/astro/commit/b1e8e32670ba601d3b3150514173dd7d1bb25650) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - **BREAKING CHANGE to the experimental Fonts API only**
Changes the font format downloaded by default when using the experimental Fonts API. Additionally, adds a new `formats` configuration option to specify which font formats to download.
Previously, Astro was opinionated about which font sources would be kept for usage, mainly keeping `woff2` and `woff` files.
You can now specify what font formats should be downloaded (if available). Only `woff2` files are downloaded by default.
##### What should I do?
If you were previously relying on Astro downloading the `woff` format, you will now need to specify this explicitly with the new `formats` configuration option. Additionally, you may also specify any additional file formats to download if available:
```diff
// 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']
}]
}
})
```
- [#​15034](https://github.com/withastro/astro/pull/15034) [`8115752`](https://github.com/withastro/astro/commit/811575237d159ceac5d9f0a2ea3bf023df718759) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a vite warning log during builds when using npm
### [`v5.16.6`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5166)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.5...astro@5.16.6)
##### Patch Changes
- [#​14982](https://github.com/withastro/astro/pull/14982) [`6849e38`](https://github.com/withastro/astro/commit/6849e3844d940f76b544822e7bd247641d61567d) Thanks [@​Princesseuh](https://github.com/Princesseuh)! - Fixes images outside the project directory not working when using astro:assets in development mode
- [#​14987](https://github.com/withastro/astro/pull/14987) [`9dd9fca`](https://github.com/withastro/astro/commit/9dd9fca81e5ed3d0d55e0b1624c6515706963b1f) Thanks [@​Princesseuh](https://github.com/Princesseuh)! - Fixes SVGs not working in dev mode when using the passthrough image service
- [#​15014](https://github.com/withastro/astro/pull/15014) [`a178422`](https://github.com/withastro/astro/commit/a178422484ed62a76b227515a798e192fdcba3b9) Thanks [@​delucis](https://github.com/delucis)! - Adds support for extending the type of the props accepted by Astro’s `<Image>` component, `<Picture>` component, and `getImage()` API.
### [`v5.16.5`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5165)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.4...astro@5.16.5)
##### Patch Changes
- [#​14985](https://github.com/withastro/astro/pull/14985) [`c016f10`](https://github.com/withastro/astro/commit/c016f1063beddc995c4b7a60430ff8860c05b462) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a case where JSDoc annotations wouldn't show for fonts related APIs in the Astro config
- [#​14973](https://github.com/withastro/astro/pull/14973) [`ed7cc2f`](https://github.com/withastro/astro/commit/ed7cc2fd399084bdd8ba47094fe378fc8ce43048) Thanks [@​amankumarpandeyin](https://github.com/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 in `generateLookupMap`.
- [#​14958](https://github.com/withastro/astro/pull/14958) [`70eb542`](https://github.com/withastro/astro/commit/70eb542f3b509cd25461d19d275b8c050ace184f) Thanks [@​ascorbic](https://github.com/ascorbic)! - Gives a helpful error message if a user sets `output: "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 than `output: "server"`. This change adds a helpful error message to guide humans and robots.
- [#​14901](https://github.com/withastro/astro/pull/14901) [`ef53716`](https://github.com/withastro/astro/commit/ef53716f93237d29cf732baae2d90ecd2c9f3bbe) Thanks [@​Darknab](https://github.com/Darknab)! - Updates the `glob()` loader to log a warning when duplicated IDs are detected
- Updated dependencies \[[`d8305f8`](https://github.com/withastro/astro/commit/d8305f8abdf92db6fa505ee9c1774553ba90b7bd)]:
- [@​astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@​6.3.10
### [`v5.16.4`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5164)
[Compare Source](https://github.com/withastro/astro/compare/astro@5.16.3...astro@5.16.4)
##### Patch Changes
- [#​14940](https://github.com/withastro/astro/pull/14940) [`2cf79c2`](https://github.com/withastro/astro/commit/2cf79c23c23e3364b0e6a86394b6584112786c5b) Thanks [@​ematipico](https://github.com/ematipico)! - Fixes a bug where Astro didn't properly combine CSP resources from the `csp` configuration with those added using the runtime API (`Astro.csp.insertDirective()`) to form grammatically correct CSP headers
Now 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.
</details>
<details>
<summary>postcss/autoprefixer (autoprefixer)</summary>
### [`v10.4.23`](https://github.com/postcss/autoprefixer/blob/HEAD/CHANGELOG.md#10423)
[Compare Source](https://github.com/postcss/autoprefixer/compare/10.4.22...10.4.23)
- Reduced dependencies (by [@​hyperz111](https://github.com/hyperz111)).
</details>
<details>
<summary>prettier/prettier (prettier)</summary>
### [`v3.8.1`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#381)
[Compare Source](https://github.com/prettier/prettier/compare/3.8.0...3.8.1)
[diff](https://github.com/prettier/prettier/compare/3.8.0...3.8.1)
##### Include available `printers` in plugin type declarations ([#​18706](https://github.com/prettier/prettier/pull/18706) by [@​porada](https://github.com/porada))
<!-- prettier-ignore -->
```ts
// Input
import * as prettierPluginEstree from "prettier/plugins/estree";
// Prettier 3.8.0
// Property 'printers' does not exist on type 'typeof import("prettier/plugins/estree")'. ts(2339)
prettierPluginEstree.printers.estree; //=> any
// Prettier 3.8.1
prettierPluginEstree.printers.estree; //=> Printer
prettierPluginEstree.printers["estree-json"]; //=> Printer
```
### [`v3.8.0`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#380)
[Compare Source](https://github.com/prettier/prettier/compare/3.7.4...3.8.0)
[diff](https://github.com/prettier/prettier/compare/3.7.4...3.8.0)
🔗 [Release Notes](https://prettier.io/blog/2026/01/14/3.8.0)
### [`v3.7.4`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#374)
[Compare Source](https://github.com/prettier/prettier/compare/3.7.3...3.7.4)
[diff](https://github.com/prettier/prettier/compare/3.7.3...3.7.4)
##### LWC: Avoid quote around interpolations ([#​18383](https://github.com/prettier/prettier/pull/18383) by [@​kovsu](https://github.com/kovsu))
<!-- prettier-ignore -->
```html
<!-- Input -->
<div foo={bar}> </div>
<!-- Prettier 3.7.3 (--embedded-language-formatting off) -->
<div foo="{bar}"></div>
<!-- Prettier 3.7.4 (--embedded-language-formatting off) -->
<div foo={bar}></div>
```
##### TypeScript: Fix comment inside union type gets duplicated ([#​18393](https://github.com/prettier/prettier/pull/18393) by [@​fisker](https://github.com/fisker))
<!-- prettier-ignore -->
```tsx
// Input
type Foo = (/** comment */ a | b) | c;
// Prettier 3.7.3
type Foo = /** comment */ (/** comment */ a | b) | c;
// Prettier 3.7.4
type Foo = /** comment */ (a | b) | c;
```
##### TypeScript: Fix unstable comment print in union type comments ([#​18395](https://github.com/prettier/prettier/pull/18395) by [@​fisker](https://github.com/fisker))
<!-- prettier-ignore -->
```tsx
// Input
type X = (A | B) & (
// comment
A | B
);
// Prettier 3.7.3 (first format)
type X = (A | B) &
(// comment
A | B);
// Prettier 3.7.3 (second format)
type X = (
| A
| B // comment
) &
(A | B);
// Prettier 3.7.4
type X = (A | B) &
// comment
(A | B);
```
</details>
<details>
<summary>sass/dart-sass (sass)</summary>
### [`v1.97.3`](https://github.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1973)
[Compare Source](https://github.com/sass/dart-sass/compare/1.97.2...1.97.3)
- Fix a bug where nesting an at-rule within multiple style rules in plain CSS
could cause outer style rules to be omitted.
### [`v1.97.2`](https://github.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1972)
[Compare Source](https://github.com/sass/dart-sass/compare/1.97.1...1.97.2)
- Additional fixes for implicit configuration when nested imports are involved.
### [`v1.97.1`](https://github.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1971)
[Compare Source](https://github.com/sass/dart-sass/compare/1.97.0...1.97.1)
- Fix a bug with the new CSS-style `if()` syntax where values would be evaluated
even if their conditions didn't match.
### [`v1.97.0`](https://github.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1970)
[Compare Source](https://github.com/sass/dart-sass/compare/1.96.0...1.97.0)
- Add support for the `display-p3-linear` color space.
### [`v1.96.0`](https://github.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1960)
[Compare Source](https://github.com/sass/dart-sass/compare/1.95.1...1.96.0)
- Allow numbers with complex units (more than one numerator unit or more than
zero denominator units) to be emitted to CSS. These are now emitted as
`calc()` expressions, which now support complex units in plain CSS.
### [`v1.95.1`](https://github.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1951)
[Compare Source](https://github.com/sass/dart-sass/compare/1.95.0...1.95.1)
- No user-visible changes.
### [`v1.95.0`](https://github.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1950)
[Compare Source](https://github.com/sass/dart-sass/compare/1.94.3...1.95.0)
- Add support for the [CSS-style `if()` function]. In addition to supporting the
plain CSS syntax, this also supports a `sass()` query that takes a Sass
expression that evaluates to `true` or `false` at preprocessing time depending
on whether the Sass value is truthy. If there are no plain-CSS queries, the
function will return the first value whose query returns true during
preprocessing. For example, `if(sass(false): 1; sass(true): 2; else: 3)`
returns `2`.
[CSS-style `if()` function]: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/if
- The old Sass `if()` syntax is now deprecated. Users are encouraged to migrate
to the new CSS syntax. `if($condition, $if-true, $if-false)` can be changed to
`if(sass($condition): $if-true; else: $if-false)`.
See [the Sass website](https://sass-lang.com/d/if-function) for details.
- Plain-CSS `if()` functions are now considered "special numbers", meaning that
they can be used in place of arguments to CSS color functions.
- Plain-CSS `if()` functions and `attr()` functions are now considered "special
variable strings" (like `var()`), meaning they can now be used in place of
multiple arguments or syntax fragments in various CSS functions.
### [`v1.94.3`](https://github.com/sass/dart-sass/blob/HEAD/CHANGELOG.md#1943)
[Compare Source](https://github.com/sass/dart-sass/compare/1.94.2...1.94.3)
- Fix the span reported for standalone `%` expressions followed by whitespace.
</details>
<details>
<summary>vercel/satori (satori)</summary>
### [`v0.19.1`](https://github.com/vercel/satori/releases/tag/0.19.1)
[Compare Source](https://github.com/vercel/satori/compare/0.19.0...0.19.1)
##### Bug Fixes
- support text-decoration-skip-ink ([#​717](https://github.com/vercel/satori/issues/717)) ([6203e87](https://github.com/vercel/satori/commit/6203e8702acf5ec66c551d01eb46e544c30c1306)), closes [#​704](https://github.com/vercel/satori/issues/704)
### [`v0.19.0`](https://github.com/vercel/satori/releases/tag/0.19.0)
[Compare Source](https://github.com/vercel/satori/compare/0.18.4...0.19.0)
##### Bug Fixes
- textShadow with transparent text color ([#​718](https://github.com/vercel/satori/issues/718)) ([02ff1c0](https://github.com/vercel/satori/commit/02ff1c0d01bff594e8ca5ab4d2851646761ae558))
##### Features
- Color support in backgroundImage for semi-transparent gradients ([#​719](https://github.com/vercel/satori/issues/719)) ([2630740](https://github.com/vercel/satori/commit/2630740d804dbb233624364dbe05488a6a68c658))
### [`v0.18.4`](https://github.com/vercel/satori/releases/tag/0.18.4)
[Compare Source](https://github.com/vercel/satori/compare/0.18.3...0.18.4)
##### Bug Fixes
- shuding's Twitter link in README ([#​720](https://github.com/vercel/satori/issues/720)) ([e1022e5](https://github.com/vercel/satori/commit/e1022e584767aea22dbab0581f6fa9b9295f64d8))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4wLjUiLCJ1cGRhdGVkSW5WZXIiOiI0My4wLjUiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIiLCJsYWJlbHMiOlsiYXV0b21hdGVkIiwiZGVwZW5kZW5jaWVzIl19-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
4.0.14→4.0.153.6.0→3.7.05.16.3→5.17.110.4.22→10.4.233.7.3→3.8.11.94.2→1.97.30.18.3→0.19.1Release Notes
withastro/astro (@astrojs/rss)
v4.0.15Compare Source
Patch Changes
d8e64efThanks @ArmandPhilippot! - Fixes the links to Astro Docs so that they match the current docs structure.withastro/astro (@astrojs/sitemap)
v3.7.0Compare Source
Minor Changes
#14471
4296373Thanks @Slackluky! - Adds the ability to split sitemap generation into chunks based on customizable logic. This allows for better management of large sitemaps and improved performance. The newchunksoption in the sitemap configuration allows users to define functions that categorize sitemap items into different chunks. Each chunk is then written to a separate sitemap file.v3.6.1Compare Source
Patch Changes
dd06779Thanks @florian-lefebvre! - Updates how routes are retrieved to avoid relying on a deprecated APIwithastro/astro (astro)
v5.17.1Compare Source
Patch Changes
#15334
d715f1fThanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyRemoves the
getFontBuffer()helper function exported fromastro:assetswhen using the experimental Fonts APIThis experimental feature introduced in v15.6.13 ended up causing significant memory usage during build. This feature has been removed and will be reintroduced after further exploration and testing.
If you were relying on this function, you can replicate the previous behavior manually:
node:fsfontDataandcontext.urlv5.17.0Compare Source
Minor Changes
#14932
b19d816Thanks @patrickarlt! - Adds support for returning a Promise from theparser()option of thefile()loaderThis enables you to run asynchronous code such as fetching remote data or using async parsers when loading files with the Content Layer API.
For example:
See the
parser()reference documentation for more information.#15171
f220726Thanks @mark-ignacio! - Adds a new, optionalkernelconfiguration option to select a resize algorithm in the Sharp image serviceBy default, Sharp resizes images with the
lanczos3kernel. This new config option allows you to set the default resizing algorithm to any resizing option supported by Sharp (e.g.linear,mks2021).Kernel selection can produce quite noticeable differences depending on various characteristics of the source image - especially drawn art - so changing the kernel gives you more control over the appearance of images on your site:
This selection will apply to all images on your site, and is not yet configurable on a per-image basis. For more information, see Sharps documentation on resizing images.
#15063
08e0fd7Thanks @jmortlock! - Adds a newpartitionedoption when setting a cookie to allow creating partitioned cookies.Partitioned cookies can only be read within the context of the top-level site on which they were set. This allows cross-site tracking to be blocked, while still enabling legitimate uses of third-party cookies.
You can create a partitioned cookie by passing
partitioned: truewhen setting a cookie. Note that partitioned cookies must also be set withsecure: true:For more information, see the
AstroCookieSetOptionsAPI reference.#15022
f1fce0eThanks @ascorbic! - Adds a newretainBodyoption to theglob()loader to allow reducing the size of the data store.Currently, the
glob()loader stores the raw body of each content file in the entry, in addition to the rendered HTML.The
retainBodyoption defaults totrue, but you can set it tofalseto prevent the raw body of content files from being stored in the data store. This significantly reduces the deployed size of the data store and helps avoid hitting size limits for sites with very large collections.The rendered body will still be available in the
entry.rendered.htmlproperty for markdown files, and theentry.filePathproperty will still point to the original file.When
retainBodyisfalse,entry.bodywill beundefinedinstead of containing the raw file contents.#15153
928529fThanks @jcayzac! - Adds a newbackgroundproperty to the<Image />component.This optional property lets you pass a background color to flatten the image with. By default, Sharp uses a black background when flattening an image that is being converted to a format that does not support transparency (e.g.
jpeg). Providing a value forbackgroundon an<Image />component, or passing it to thegetImage()helper, will flatten images using that color instead.This is especially useful when the requested output format doesn't support an alpha channel (e.g.
jpeg) and can't support transparent backgrounds.See more about this new property in the image reference docs
#15015
54f6006Thanks @tony! - Adds optionalplacementconfig option for the dev toolbar.You can now configure the default toolbar position (
'bottom-left','bottom-center', or'bottom-right') viadevToolbar.placementin your Astro config. This option is helpful for sites with UI elements (chat widgets, cookie banners) that are consistently obscured by the toolbar in the dev environment.You can set a project default that is consistent across environments (e.g. dev machines, browser instances, team members):
User preferences from the toolbar UI (stored in
localStorage) still take priority, so this setting can be overridden in individual situations as necessary.v5.16.16Compare Source
Patch Changes
#15281
a1b80c6Thanks @matthewp! - Ensures server island requests carry an encrypted component export identifier so they do not accidentally resolve to the wrong component.#15304
02ee3c7Thanks @cameronapak! - Fix: Remove await from getActionResult example#15324
ab41c3eThanks @Princesseuh! - Fixes an issue where certain unauthorized links could be rendered as clickable in the error overlayv5.16.15Compare Source
Patch Changes
0aafc83Thanks @florian-lefebvre! - Fixes a case where font providers provided as class instances may not work when using the experimental Fonts API. It affected the local providerv5.16.14Compare Source
Patch 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:#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: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:Once the font provider is registered in the Astro config, types are automatically inferred:
#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:#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: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: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.
postcss/autoprefixer (autoprefixer)
v10.4.23Compare Source
prettier/prettier (prettier)
v3.8.1Compare Source
diff
Include available
printersin plugin type declarations (#18706 by @porada)v3.8.0Compare Source
diff
🔗 Release Notes
v3.7.4Compare Source
diff
LWC: Avoid quote around interpolations (#18383 by @kovsu)
TypeScript: Fix comment inside union type gets duplicated (#18393 by @fisker)
TypeScript: Fix unstable comment print in union type comments (#18395 by @fisker)
sass/dart-sass (sass)
v1.97.3Compare Source
could cause outer style rules to be omitted.
v1.97.2Compare Source
v1.97.1Compare Source
if()syntax where values would be evaluatedeven if their conditions didn't match.
v1.97.0Compare Source
display-p3-linearcolor space.v1.96.0Compare Source
zero denominator units) to be emitted to CSS. These are now emitted as
calc()expressions, which now support complex units in plain CSS.v1.95.1Compare Source
v1.95.0Compare Source
Add support for the CSS-style
if()function. In addition to supporting theplain CSS syntax, this also supports a
sass()query that takes a Sassexpression that evaluates to
trueorfalseat preprocessing time dependingon whether the Sass value is truthy. If there are no plain-CSS queries, the
function will return the first value whose query returns true during
preprocessing. For example,
if(sass(false): 1; sass(true): 2; else: 3)returns
2.The old Sass
if()syntax is now deprecated. Users are encouraged to migrateto the new CSS syntax.
if($condition, $if-true, $if-false)can be changed toif(sass($condition): $if-true; else: $if-false).See the Sass website for details.
Plain-CSS
if()functions are now considered "special numbers", meaning thatthey can be used in place of arguments to CSS color functions.
Plain-CSS
if()functions andattr()functions are now considered "specialvariable strings" (like
var()), meaning they can now be used in place ofmultiple arguments or syntax fragments in various CSS functions.
v1.94.3Compare Source
%expressions followed by whitespace.vercel/satori (satori)
v0.19.1Compare Source
Bug Fixes
v0.19.0Compare Source
Bug Fixes
Features
v0.18.4Compare Source
Bug Fixes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, 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 has been generated by Renovate Bot.