astro@5.16.9
-
#15174
37ab65aThanks @florian-lefebvre! - Adds Google Icons to built-in font providersTo start using it, access it on
fontProviders:import { defineConfig, fontProviders } from 'astro/config'; export default defineConfig({ experimental: { fonts: [ { name: 'Material Symbols Outlined', provider: fontProviders.googleicons(), cssVariable: '--font-material', }, ], }, });
-
#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).
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" }] } }); -
#15147
9cd5b87Thanks @matthewp! - Fixes scripts in components not rendering when a sibling<Fragment slot="...">exists but is unused
astro-vscode@2.16.8
- #15156
9cc2c71Thanks @Princesseuh! - Fixes TypeScript plugin not working
astro@5.16.8
-
#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.)
astro-vscode@2.16.7
- #15131
d40ff7dThanks @Princesseuh! - Fixes extension asking for the wrong version of VS Code
@astrojs/svelte@7.2.5
- #15070
fa9c464Thanks @antonyfaris! - Improve Sveltechildrenprop type checking
@astrojs/sitemap@3.6.1
- #15033
dd06779Thanks @florian-lefebvre! - Updates how routes are retrieved to avoid relying on a deprecated API
astro@5.16.7
-
#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:-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
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.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'] }] } }) -
#15034
8115752Thanks @florian-lefebvre! - Fixes a vite warning log during builds when using npm
@astrojs/vue@5.1.4
- #15016
12eb4cdThanks @rahuld109! - Adds support for arbitrary HTML attributes on Vue components
astro-vscode@2.16.6
-
#15083
241bb31Thanks @fkatsuhiro! - Fix "Find All References" and other TypeScript features by ensuring the plugin bundle is correctly included -
#15109
e062101Thanks @Princesseuh! - Fixes syntax highlighting sometimes not working when the frontmatter or script tags ended with certain TypeScript constructs