Astro 7.1.2
Patch Release Highlights
Astro 7.1.2 is a patch release that addresses several important bugs and updates a core dependency. This release focuses on improving reliability across the framework's request handling and prefetching mechanisms.
Cookie Dependency Updated to v2
A key change in Astro 7.1.2 is the update of the cookie dependency to version 2. Cookie values that consist entirely of URL-safe characters are no longer percent-encoded in Set-Cookie headers. Additionally, encoded values now round-trip exactly as before, making cookie handling more predictable and standards-compliant.
Critical Bug Fixes
- Astro.locals persistence — A bug where mutated
Astro.localsvalues during the request lifecycle were lost and not passed through to custom error pages (404.astroand500.astro) has been fixed. This ensures that request-scoped data set via middleware or other lifecycle hooks is available when error pages need it. - Prefetch fetch fallback — In WebKit-based browsers (Safari), the
<link rel="prefetch">tag is not supported, so Astro falls back to thefetch()API for prefetch hints. On flaky connections, this fallback could throw an unhandledTypeError: Load failedrejection that surfaced to the page's global error handlers. Astro 7.1.2 now swallows this failure with a proper.catch()handler, preventing unhandled promise rejections.
Upgrade Path
Upgrading to Astro 7.1.2 is straightforward. Run your package manager's update command to pull in the latest version. As this is a patch release, there are no breaking changes and no migration steps required beyond updating the dependency.
Astro 7.1.2 is available now. Visit the official Astro website or your package manager to download the update.