astro@5.16.7
Breaking Changes📦 astroView on GitHub →
⚠ 2 breaking✨ 5 features🐛 4 fixes🔧 6 symbols
Summary
This release introduces breaking changes to the experimental Fonts API regarding type helpers and default font formats, while improving rendering performance, reducing install size, and fixing several image-related bugs.
⚠️ Breaking Changes
- The `defineAstroFontProvider()` type helper has been removed from the experimental Fonts API. Developers must now use the `FontProvider` type instead.
- The experimental Fonts API now only downloads `woff2` files by default. Previously, it also included `woff`. To keep `woff` or other formats, they must be explicitly defined in the new `formats` configuration option.
Migration Steps
- If using the experimental Fonts API, replace `defineAstroFontProvider()` with the `FontProvider` type from 'astro'.
- If you rely on `woff` or other font formats in the experimental Fonts API, update your `astro.config.mjs` to include the `formats` array (e.g., `formats: ['woff2', 'woff']`).
✨ New Features
- Added a `formats` configuration option to the experimental Fonts API to specify which font formats (e.g., 'woff2', 'woff', 'otf') to download.
- The ClientRouter now preserves the original URL hash during server-side redirects.
- Improved rendering performance by grouping render chunks when emitting from async iterables to reduce encoding overhead.
- Reduced Astro's install size by approximately 8 MB.
- Improved JSDoc annotations for `AstroGlobal`, `AstroSharedContext`, and `APIContext` types.
🐛 Bug Fixes
- Fixed remote images `Etag` header handling by disabling internal cache.
- Fixed images not working in development environments using port forwarding.
- Fixed path aliases not working for images in JSON files within the content layer.
- Fixed a Vite warning log occurring during builds when using npm.
🔧 Affected Symbols
defineAstroFontProviderFontProviderAstroGlobalAstroSharedContextAPIContextClientRouter