🐞 Patch Changes
-
#13336
8f632efThanks @ematipico! - Fixes a regression where some asset utilities were move across monorepo, and not re-exported anymore. -
#13320
b5dabe9Thanks @{! - Adds support for typing experimental session dataYou can add optional types to your session data by creating a
src/env.d.tsfile in your project that extends the globalApp.SessionDatainterface. For example:declare namespace App {interface SessionData {id: string;email: string;};lastLogin: Date;}}Any keys not defined in this interface will be treated as
any.Then when you access
Astro.sessionin your components, any defined keys will be typed correctly:---const user = await Astro.session.get('user');// ^? const: user: { id: string; email: string; } | undefinedconst something = await Astro.session.get('something');// ^? const: something: anyAstro.session.set('user', 1);// ^? Argument of type 'number' is not assignable to parameter of type '{ id: string; email: string; }'.---See the experimental session docs for more information.
-
#13330
5e7646eThanks @ematipico! - Fixes an issue with the conditional rendering of scripts.This change updates a v5.0 breaking change when
experimental.directRenderScriptbecame the default script handling behavior.If you have already successfully upgraded to Astro v5, you may need to review your script tags again and make sure they still behave as desired after this release. See the v5 Upgrade Guide for more details.