Major Changes
-
#15192
ada2808Thanks @gameroman! - Removes support for CommonJS config files - (v6 upgrade guidance) -
#15266
f7c9365Thanks @florian-lefebvre! - AllowsAstro.cspandcontext.cspto be undefined instead of throwing errors whencsp: trueis not configuredWhen using the experimental Content Security Policy feature in Astro 5.x,
context.cspwas always defined but would throw ifexperimental.cspwas not enabled in the Astro config.For the stable version of this API in Astro 6,
context.cspcan now be undefined if CSP is not enabled and its methods will never throw.What should I do?
If you were using experimental CSP runtime utilities, you must now access methods conditionally:
-Astro.csp.insertDirective("default-src 'self'"); +Astro.csp?.insertDirective("default-src 'self'");
Patch Changes
-
#15208
8dbdd8eThanks @matthewp! - Makessession.driveroptional in config schema, allowing adapters to provide default driversAdapters like Cloudflare, Netlify, and Node provide default session drivers, so users can now configure session options (like
ttl) without explicitly specifying a driver. -
#15260
abca1ebThanks @ematipico! - Fixes an issue where adding new pages weren't correctly shown when using the development server. -
#15214
6bab8c9Thanks @ematipico! - Fixes an issue where the internal perfomance timers weren't correctly updated to reflect new build pipeline. -
#15259
8670a69Thanks @ematipico! - Fixes an issue where styles weren't correctly reloaded when using the@astrojs/cloudflareadapter. -
#15205
12adc55Thanks @martrapp! - Fixes an issue where theastro:page-loadevent did not fire on initial page loads. -
#15269
6f82aaeThanks @ematipico! - Fixes a regression wherebuild.serverEntrystopped working as expected.