astro@7.2.5
📦 astroView on GitHub →
✨ 2 features🐛 17 fixes⚡ 1 deprecations🔧 17 symbols
Summary
This patch release addresses several bugs, including issues with the Cloudflare adapter, SSR URL normalization, CLI flags, content collection handling, and i18n fallbacks. It also improves build error reporting and CSP handling.
✨ New Features
- Added support for importing .apng files as image metadata for use with standard <img> elements.
- Enabled Node's module compilation cache for improved Astro CLI performance in local development.
🐛 Bug Fixes
- Fixed an issue where experimental_getFontFileURL() rejected valid font URLs when using the Cloudflare adapter.
- Skipped no-op pathname writes when normalizing SSR request URLs.
- Fixed session ID validation to reject non-UUID cookie values before using them as storage keys.
- Resolved an issue where --mode, --site, --base, --out-dir, --verbose, --silent, and --open flags were silently dropped when using `astro dev --background` or `astro preview --background`.
- Fixed content-modules.mjs not removing entries for deleted or renamed content files, preventing Vite from attempting to resolve non-existent modules. Module imports added only through addModuleImport() without a corresponding deferredRender entry will no longer be preserved across writes.
- Corrected Astro.preferredLocale and Astro.preferredLocaleList to properly handle Accept-Language quality values (q=) and default to 1.0 when not specified, ensuring the highest-quality locale is selected.
- Fixed build errors to display correct file locations, line:col numbers, and clearer hints when a plugin error is wrapped by Vite's build error.
- Resolved a type error when passing an image from a content collection image() schema to a component or <Image /> due to the schema missing the apng format.
- Ensured Astro CSP support correctly handles "unsafe-inline" resources by not emitting hashes for the specified directive.
- Fixed a regression in content collections that could cause images to not be resolved.
- Prevented memoryCache() from storing responses that set cookies through Astro.cookies or Astro.session.
- Fixed `server:defer` from crashing the dev server with an "undefined is not a function" error when a deferred component imports from `astro:i18n`.
- Fixed a regression where `transition:persist` stopped working for <audio> and <video> elements.
- Fixed i18n fallbackType: "rewrite" returning 500 instead of 404 when the fallback locale also has no matching static path for a prerendered dynamic route.
- Fixed incremental builds serving cached HTML that references stale CSS filenames after a stylesheet-only edit.
- Fixed the dev server refusing to start in Docker containers after a restart due to PID reuse in the lock file check.
- Fixed a build failure when defining vite.environments.ssr in the Astro config by properly deep-merging user-provided environment config with Astro's internal settings.
Affected Symbols
experimental_getFontFileURL()astro dev --backgroundastro preview --backgroundcontent-modules.mjsaddModuleImport()deferredRenderAstro.preferredLocaleAstro.preferredLocaleListimage() schema<Image />Astro CSPastro:i18nserver:defertransition:persistvite.environments.ssrvite.environments.prerendervite.environments.client
⚡ Deprecations
- Deprecation messages now target Astro 8 instead of Astro 7.