#954608402ad5846c73b6887e74ed4575fd71a3e3c73d Thanks @bluwy! - Adds an option for the Sharp image service to allow large images to be processed. Set limitInputPixels: false to bypass the default image size limit:
astro.config.mjs
import { defineConfig } from'astro/config';
exportdefaultdefineConfig({
image: {
service: {
entrypoint: 'astro/assets/services/sharp',
config: {
limitInputPixels: false,
},
},
},
});
#9596fbc26976533bbcf2de9d6dba1aa3ea3dc6ce0853 Thanks @Princesseuh! - Adds the ability to set a rootMargin setting when using the client:visible directive. This allows a component to be hydrated when it is near the viewport, rather than hydrated when it has entered the viewport.
<!-- Load component when it's within 200px away from entering the viewport -->
Adds new encode and decode functions to allow customizing how cookies are encoded and decoded. For example, you can bypass the default encoding via encodeURIComponent when adding a URL as part of a cookie:
---
import { encodeCookieValue } from'./cookies';
Astro.cookies.set('url', Astro.url.toString(), {
// Override the default encoding so that URI components are not encoded
#9464faf6c7e11 Thanks @Fryuni! - Fixes an edge case with view transitions where some spec-compliant Content-Type headers would cause a valid HTML response to be ignored.
#94001e984389b Thanks @bluwy! - Fixes importing dev toolbar apps from integrations on Windows
#9458fa3078ce9 Thanks @ematipico! - Correctly handle the error in case the middleware throws a runtime error
#90895ae657882 Thanks @lilnasy! - Fixes an issue where redirects did not replace slugs when the target of the redirect rule was not a verbatim route in the project.
#93390bb3d5322 Thanks @morinokami! - Fixed the log message to correctly display ‘enabled’ and ‘disabled’ when toggling ‘Disable notifications’ in the Toolbar.
#93273878a91be Thanks @doseofted! - Fixes an edge case for <form method="dialog"> when using View Transitions. Forms with method="dialog" no longer require an additional data-astro-reload attribute.
#9138abf601233 Thanks @bluwy! - Updates the unified, remark, and rehype dependencies to latest. Make sure to update your custom remark and rehype plugins as well to be compatible with the latest versions.
Potentially breaking change: The default value of markdown.remarkRehype.footnoteBackLabel is changed from "Back to content" to "Back to reference 1". See the mdast-util-to-hastcommit for more information.
#9181cdabf6ef0 Thanks @bluwy! - Removes support for returning simple objects from endpoints (deprecated since Astro 3.0). You should return a Response instead.
ResponseWithEncoding is also removed. You can refactor the code to return a response with an array buffer instead, which is encoding agnostic.
The types for middlewares have also been revised. To type a middleware function, you should now use MiddlewareHandler instead of MiddlewareResponseHandler. If you used defineMiddleware() to type the function, no changes are needed.
The previously named experimental Dev Overlay is now known as the Astro Dev Toolbar. Overlay plugins have been renamed as Toolbar Apps. All APIs have been updated to reflect this name change.
To not break existing APIs, aliases for the Toolbar-based names have been created. The previous API names will continue to function but will be deprecated in the future. All documentation has been updated to reflect Toolbar-based names.
#91221c48ed286 Thanks @bluwy! - Adds Vite 5 support. There are no breaking changes from Astro. Check the Vite migration guide for details of the breaking changes from Vite instead.
#9225c421a3d17 Thanks @natemoo-re! - Removes the opt-in handleForms property for <ViewTransitions />. Form submissions are now handled by default and this property is no longer necessary. This default behavior can be disabled by setting data-astro-reload on relevant <form /> elements.
#919637697a2c5 Thanks @bluwy! - Removes support for Shiki custom language’s path property. The language JSON file should be imported and passed to the option instead.
astro.config.js
import customLang from './custom.tmLanguage.json'
export default defineConfig({
markdown: {
shikiConfig: {
langs: [
{ path: './custom.tmLanguage.json' },
customLang,
],
},
},
})
#919949aa215a0 Thanks @lilnasy! - This change only affects maintainers of third-party adapters. In the Integration API, the app.render() method of the App class has been simplified.
Instead of two optional arguments, it now takes a single optional argument that is an object with two optional properties: routeData and locals.
app.render(request)
app.render(request, routeData)
app.render(request, { routeData })
app.render(request, routeData, locals)
app.render(request, { routeData, locals })
app.render(request, undefined, locals)
app.render(request, { locals })
The current signature is deprecated but will continue to function until next major version.
With the above configuration, the URL prefix of the default locale will be /english/. When computing Astro.preferredLocale, Astro will use the codes.
#91153b77889b4 Thanks @natemoo-re! - Adds the astro preferences command to manage user preferences. User preferences are specific to individual Astro users, unlike the astro.config.mjs file which changes behavior for everyone working on a project.
User preferences are scoped to the current project by default, stored in a local .astro/settings.json file. Using the --global flag, user preferences can also be applied to every Astro project on the current machine. Global user preferences are stored in an operating system-specific location.
Terminal window
# Disable the dev overlay for the current user in the current project
npmrunastropreferencesdisabledevOverlay
# Disable the dev overlay for the current user in all Astro projects on this machine
npmrunastropreferences--globaldisabledevOverlay
# Check if the dev overlay is enabled for the current user
npmrunastropreferenceslistdevOverlay
#9139459b26436 Thanks @bluwy! - Reworks Vite’s logger to use Astro’s logger to correctly log HMR messages
#92796a9669b81 Thanks @martrapp! - Improves consistency between navigations with and without <ViewTransitions>. See #9279 for more details.
#9161bd0c2e9ae Thanks @bluwy! - Renames the entryPoint property of the injectRoute integrations API to entrypoint for consistency. A warning will be shown prompting you to update your code when using the old name.
#9118000e8f465 Thanks @Princesseuh! - Redesign Dev Overlay main screen to show more information, such as the coolest integrations, your current Astro version and more.
#9118000e8f465 Thanks @Princesseuh! - Fixes an issue where links with the same pathname as the current page, but different search params, were not prefetched.
#92750968cb1a3 Thanks @lilnasy! - Fixes an issue where html annotations relevant only to the dev server were included in the production build.
#92527b74ec4ba Thanks @ematipico! - Consistently emit fallback routes in the correct folders, and emit routes that consider trailingSlash
#924843ddb5217 Thanks @martrapp! - Adds properties of the submit button (name, value) to the form data of a view transition
#91708a228fce0 Thanks @natemoo-re! - Adds new accessibility audits to the Dev Toolbar’s built-in Audits app.
The audits Astro performs are non-exhaustive and only capable of detecting a handful of common accessibility issues. Please take care to perform a thorough, manual audit of your site to ensure compliance with the Web Content Accessibility Guidelines (WCAG) international standardbefore publishing your site.
🧡 Huge thanks to the Svelte team for providing the basis of these accessibility audits!
#91490fe3a7ed5 Thanks @bluwy! - Removes vendored Vite’s importMeta.d.ts file in favour of Vite 5’s new vite/types/import-meta.d.ts export
#9150710be505c Thanks @bluwy! - Refactors virtual modules exports. This should not break your project unless you import Astro’s internal modules, including:
#92796a9669b81 Thanks @martrapp! - Improves consistency between navigations with and without <ViewTransitions>. See #9279 for more details.
🐞 Patch Changes
#91708a228fce0 Thanks @natemoo-re! - Adds new accessibility audits to the Dev Toolbar’s built-in Audits app.
The audits Astro performs are non-exhaustive and only capable of detecting a handful of common accessibility issues. Please take care to perform a thorough, manual audit of your site to ensure compliance with the Web Content Accessibility Guidelines (WCAG) international standardbefore publishing your site.
🧡 Huge thanks to the Svelte team for providing the basis of these accessibility audits!
The previously named experimental Dev Overlay is now known as the Astro Dev Toolbar. Plugins have been renamed as Toolbar Apps. This updates our references to reflect.
To not break existing APIs, aliases for the Toolbar-based names have been created. The previous API names will continue to function but will be deprecated in the future. All documentation has been updated to reflect Toolbar-based names.
#92268f8a40e93 Thanks @outofambit! - Fix i18n fallback routing with routing strategy of always-prefix
#91793f28336d9 Thanks @lilnasy! - Fixes an issue where the presence of a slot in a page led to an error.
#9219067a65f5b Thanks @natemoo-re! - Fix edge case where <style> updates inside of .astro files would ocassionally fail to update without reloading the page.
#923627d3e86e4 Thanks @ematipico! - The configuration i18n.routingStrategy has been replaced with an object called routing.
#9225c421a3d17 Thanks @natemoo-re! - Removes the opt-in handleForms property for <ViewTransitions />. Form submissions are now handled by default and can be disabled by setting data-astro-reload on relevant <form /> elements.
#919949aa215a0 Thanks @lilnasy! - This change only affects maintainers of third-party adapters. In the Integration API, the app.render() method of the App class has been simplified.
Instead of two optional arguments, it now takes a single optional argument that is an object with two optional properties: routeData and locals.
app.render(request)
app.render(request, routeData)
app.render(request, { routeData })
app.render(request, routeData, locals)
app.render(request, { routeData, locals })
app.render(request, undefined, locals)
app.render(request, { locals })
The current signature is deprecated but will continue to function until next major version.
#91153b77889b4 Thanks @natemoo-re! - Adds the astro preferences command to manage user preferences. User preferences are specific to individual Astro users, unlike the astro.config.mjs file which changes behavior for everyone working on a project.
User preferences are scoped to the current project by default, stored in a local .astro/settings.json file. Using the --global flag, user preferences can also be applied to every Astro project on the current machine. Global user preferences are stored in an operating system-specific location.
Terminal window
# Disable the dev overlay for the current user in the current project
npmrunastropreferencesdisabledevOverlay
# Disable the dev overlay for the current user in all Astro projects on this machine
npmrunastropreferences--globaldisabledevOverlay
# Check if the dev overlay is enabled for the current user
#9189d90714fc3 Thanks @SpencerWhitehead7! - Fixes an issue where links with the same pathname as the current page, but different search params, were not prefetched.