astro@5.17.0
📦 astroView on GitHub →
✨ 6 features🔧 7 symbols
Summary
This release introduces significant enhancements to the Content Layer API by allowing async parsing and body retention control, alongside new configuration options for the image service and dev toolbar placement.
Migration Steps
- If using the `glob()` loader and aiming to reduce data store size, set `retainBody: false` in the loader configuration.
- If using the Sharp image service and requiring a specific resizing algorithm, configure the `kernel` option under `image.service.config` in `astro.config.mjs`.
- If setting a partitioned cookie, ensure you also set `secure: true` in the cookie options.
✨ New Features
- Content Layer API: The `parser()` option of the `file()` loader now supports returning a Promise, enabling asynchronous parsing logic.
- Image Service: Added an optional `kernel` configuration option to the Sharp image service to select the resizing algorithm (e.g., 'lanczos3', 'linear', 'mks2021').
- Cookies: Added a new optional `partitioned: true` option when setting a cookie to create partitioned cookies, useful for privacy.
- Content Layer API: Added an optional `retainBody: false` option to the `glob()` loader to prevent storing the raw file body in the data store, reducing deployment size.
- Image Component: Added a new optional `background` property to the `<Image />` component and `getImage()` helper to specify a background color for flattening images, especially when converting to formats without transparency (like JPEG).
- Dev Toolbar: Added an optional `devToolbar.placement` configuration option to set the default position of the development toolbar ('bottom-left', 'bottom-center', or 'bottom-right').