diff --git a/.changeset/seven-coats-wink.md b/.changeset/seven-coats-wink.md deleted file mode 100644 index 12b9cbe70c8b..000000000000 --- a/.changeset/seven-coats-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a regression where some asset utilities were move across monorepo, and not re-exported anymore. diff --git a/.changeset/slimy-bulldogs-sell.md b/.changeset/slimy-bulldogs-sell.md deleted file mode 100644 index 9ca6ab522429..000000000000 --- a/.changeset/slimy-bulldogs-sell.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -'astro': patch ---- - -Adds support for typing experimental session data - -You can add optional types to your session data by creating a `src/env.d.ts` file in your project that extends the global `App.SessionData` interface. For example: - -```ts -declare namespace App { - interface SessionData { - user: { - id: string; - email: string; - }; - lastLogin: Date; - } -} -``` - -Any keys not defined in this interface will be treated as `any`. - -Then when you access `Astro.session` in your components, any defined keys will be typed correctly: - -```astro ---- -const user = await Astro.session.get('user'); -// ^? const: user: { id: string; email: string; } | undefined - -const something = await Astro.session.get('something'); -// ^? const: something: any - -Astro.session.set('user', 1); -// ^? Argument of type 'number' is not assignable to parameter of type '{ id: string; email: string; }'. ---- -``` - -See [the experimental session docs](https://docs.astro.build/en/reference/experimental-flags/sessions/) for more information. diff --git a/.changeset/three-eyes-listen.md b/.changeset/three-eyes-listen.md deleted file mode 100644 index eb2a5a4b139d..000000000000 --- a/.changeset/three-eyes-listen.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue with the conditional rendering of scripts. - -**This change updates a v5.0 breaking change when `experimental.directRenderScript` became 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](https://docs.astro.build/en/guides/upgrade-to/v5/#script-tags-are-rendered-directly-as-declared). diff --git a/.changeset/wet-frogs-visit.md b/.changeset/wet-frogs-visit.md deleted file mode 100644 index 64ab380a1198..000000000000 --- a/.changeset/wet-frogs-visit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/upgrade': minor ---- - -Adds the ability to identify `bun` as the preferred package manager. diff --git a/examples/basics/package.json b/examples/basics/package.json index 752fc89fed14..99ad05b6f7d9 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.4.0" + "astro": "^5.4.1" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 113285ceb751..4b7756f6947a 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -13,6 +13,6 @@ "@astrojs/mdx": "^4.1.0", "@astrojs/rss": "^4.0.11", "@astrojs/sitemap": "^3.2.1", - "astro": "^5.4.0" + "astro": "^5.4.1" } } diff --git a/examples/component/package.json b/examples/component/package.json index 8c74ec789852..ad5d6ee35924 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^5.4.0" + "astro": "^5.4.1" }, "peerDependencies": { "astro": "^4.0.0 || ^5.0.0" diff --git a/examples/container-with-vitest/package.json b/examples/container-with-vitest/package.json index f4459eace471..6e7d1ee3b08f 100644 --- a/examples/container-with-vitest/package.json +++ b/examples/container-with-vitest/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/react": "^4.2.1", - "astro": "^5.4.0", + "astro": "^5.4.1", "react": "^18.3.1", "react-dom": "^18.3.1", "vitest": "^3.0.5" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 9584ed7e3f9c..cdca3e54e02f 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -13,6 +13,6 @@ "@astrojs/alpinejs": "^0.4.3", "@types/alpinejs": "^3.13.11", "alpinejs": "^3.14.8", - "astro": "^5.4.0" + "astro": "^5.4.1" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index b6183e4a23a5..76867124d48f 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -17,7 +17,7 @@ "@astrojs/vue": "^5.0.7", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", - "astro": "^5.4.0", + "astro": "^5.4.1", "preact": "^10.25.4", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 90bb9cb3a76a..e94940d07c1c 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -12,7 +12,7 @@ "dependencies": { "@astrojs/preact": "^4.0.5", "@preact/signals": "^2.0.1", - "astro": "^5.4.0", + "astro": "^5.4.1", "preact": "^10.25.4" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 206103aa802a..8003274e75e4 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -13,7 +13,7 @@ "@astrojs/react": "^4.2.1", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", - "astro": "^5.4.0", + "astro": "^5.4.1", "react": "^18.3.1", "react-dom": "^18.3.1" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 1a4859564067..30ad6569fba0 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@astrojs/solid-js": "^5.0.5", - "astro": "^5.4.0", + "astro": "^5.4.1", "solid-js": "^1.9.4" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 8a4af93bb0dd..61cda1b68e0d 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@astrojs/svelte": "^7.0.5", - "astro": "^5.4.0", + "astro": "^5.4.1", "svelte": "^5.19.7" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 55857b64aa13..42153adafdf9 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@astrojs/vue": "^5.0.7", - "astro": "^5.4.0", + "astro": "^5.4.1", "vue": "^3.5.13" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 72c17f974966..c8bcbb2dde7a 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -11,6 +11,6 @@ }, "dependencies": { "@astrojs/node": "^9.1.2", - "astro": "^5.4.0" + "astro": "^5.4.1" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index ef0d16ea09c1..65db326cf4e1 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^5.4.0" + "astro": "^5.4.1" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/minimal/package.json b/examples/minimal/package.json index a2b0f6c4b284..6a445ba9cbc0 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.4.0" + "astro": "^5.4.1" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 98549a7a95b4..3d0683a5bad6 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.4.0" + "astro": "^5.4.1" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index ca1d3bbb71c5..9bb2f6b742fa 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/node": "^9.1.2", "@astrojs/svelte": "^7.0.5", - "astro": "^5.4.0", + "astro": "^5.4.1", "svelte": "^5.19.7" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index 7e400dcba3af..2c929846d325 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -9,7 +9,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.4.0", + "astro": "^5.4.1", "sass": "^1.83.4", "sharp": "^0.33.3" } diff --git a/examples/toolbar-app/package.json b/examples/toolbar-app/package.json index 2fd217572404..ef865da04d02 100644 --- a/examples/toolbar-app/package.json +++ b/examples/toolbar-app/package.json @@ -16,6 +16,6 @@ }, "devDependencies": { "@types/node": "^18.17.8", - "astro": "^5.4.0" + "astro": "^5.4.1" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index cae3e738c604..08173aa02e4b 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -11,6 +11,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.12.10", - "astro": "^5.4.0" + "astro": "^5.4.1" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 3a2a4d9b6136..d21c4e5ea005 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -12,7 +12,7 @@ "dependencies": { "@astrojs/mdx": "^4.1.0", "@astrojs/preact": "^4.0.5", - "astro": "^5.4.0", + "astro": "^5.4.1", "preact": "^10.25.4" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index f341ee0c3c90..cf3ba30d70dd 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -12,7 +12,7 @@ "dependencies": { "@astrojs/preact": "^4.0.5", "@nanostores/preact": "^0.5.2", - "astro": "^5.4.0", + "astro": "^5.4.1", "nanostores": "^0.11.3", "preact": "^10.25.4" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 22689a32630b..55379c99c62f 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -13,7 +13,7 @@ "@astrojs/mdx": "^4.1.0", "@tailwindcss/vite": "^4.0.3", "@types/canvas-confetti": "^1.9.0", - "astro": "^5.4.0", + "astro": "^5.4.1", "canvas-confetti": "^1.9.3", "tailwindcss": "^4.0.3" } diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 4c6d1a8df763..76b438b8d369 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -11,7 +11,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^5.4.0", + "astro": "^5.4.1", "vitest": "^3.0.5" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 6ec18fc1ed0e..d1364d130616 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,52 @@ # astro +## 5.4.1 + +### Patch Changes + +- [#13336](https://github.com/withastro/astro/pull/13336) [`8f632ef`](https://github.com/withastro/astro/commit/8f632efe9934fbe7547d890fd01b3892d14c8189) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a regression where some asset utilities were move across monorepo, and not re-exported anymore. + +- [#13320](https://github.com/withastro/astro/pull/13320) [`b5dabe9`](https://github.com/withastro/astro/commit/b5dabe9878510237ceb603ebd3e004da6e965a26) Thanks [@{](https://github.com/{)! - Adds support for typing experimental session data + + You can add optional types to your session data by creating a `src/env.d.ts` file in your project that extends the global `App.SessionData` interface. For example: + + ```ts + 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.session` in your components, any defined keys will be typed correctly: + + ```astro + --- + const user = await Astro.session.get('user'); + // ^? const: user: { id: string; email: string; } | undefined + + const something = await Astro.session.get('something'); + // ^? const: something: any + + Astro.session.set('user', 1); + // ^? Argument of type 'number' is not assignable to parameter of type '{ id: string; email: string; }'. + --- + ``` + + See [the experimental session docs](https://docs.astro.build/en/reference/experimental-flags/sessions/) for more information. + +- [#13330](https://github.com/withastro/astro/pull/13330) [`5e7646e`](https://github.com/withastro/astro/commit/5e7646efc12d47bbb65d8c80a160f4f27329903c) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue with the conditional rendering of scripts. + + **This change updates a v5.0 breaking change when `experimental.directRenderScript` became 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](https://docs.astro.build/en/guides/upgrade-to/v5/#script-tags-are-rendered-directly-as-declared). + ## 5.4.0 ### Minor Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 47e5008efe7d..7491b0021024 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "5.4.0", + "version": "5.4.1", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/upgrade/CHANGELOG.md b/packages/upgrade/CHANGELOG.md index e99560ff3edc..9a2b9b90e6d9 100644 --- a/packages/upgrade/CHANGELOG.md +++ b/packages/upgrade/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/upgrade +## 0.5.0 + +### Minor Changes + +- [#13330](https://github.com/withastro/astro/pull/13330) [`5e7646e`](https://github.com/withastro/astro/commit/5e7646efc12d47bbb65d8c80a160f4f27329903c) Thanks [@ematipico](https://github.com/ematipico)! - Adds the ability to identify `bun` as the preferred package manager. + ## 0.4.3 ### Patch Changes diff --git a/packages/upgrade/package.json b/packages/upgrade/package.json index 37c0b6aedebf..f6a4644728ba 100644 --- a/packages/upgrade/package.json +++ b/packages/upgrade/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/upgrade", - "version": "0.4.3", + "version": "0.5.0", "type": "module", "author": "withastro", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 237cbbb18039..7625afc27503 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -142,7 +142,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro examples/blog: @@ -157,13 +157,13 @@ importers: specifier: ^3.2.1 version: link:../../packages/integrations/sitemap astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro examples/container-with-vitest: @@ -172,7 +172,7 @@ importers: specifier: ^4.2.1 version: link:../../packages/integrations/react astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro react: specifier: ^18.3.1 @@ -203,7 +203,7 @@ importers: specifier: ^3.14.8 version: 3.14.8 astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro examples/framework-multiple: @@ -230,7 +230,7 @@ importers: specifier: ^18.3.5 version: 18.3.5(@types/react@18.3.18) astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro preact: specifier: ^10.25.4 @@ -260,7 +260,7 @@ importers: specifier: ^2.0.1 version: 2.0.1(preact@10.25.4) astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro preact: specifier: ^10.25.4 @@ -278,7 +278,7 @@ importers: specifier: ^18.3.5 version: 18.3.5(@types/react@18.3.18) astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro react: specifier: ^18.3.1 @@ -293,7 +293,7 @@ importers: specifier: ^5.0.5 version: link:../../packages/integrations/solid astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro solid-js: specifier: ^1.9.4 @@ -305,7 +305,7 @@ importers: specifier: ^7.0.5 version: link:../../packages/integrations/svelte astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro svelte: specifier: ^5.19.7 @@ -317,7 +317,7 @@ importers: specifier: ^5.0.7 version: link:../../packages/integrations/vue astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro vue: specifier: ^3.5.13 @@ -329,25 +329,25 @@ importers: specifier: ^9.1.2 version: link:../../packages/integrations/node astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro examples/minimal: dependencies: astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro examples/ssr: @@ -359,7 +359,7 @@ importers: specifier: ^7.0.5 version: link:../../packages/integrations/svelte astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro svelte: specifier: ^5.19.7 @@ -368,7 +368,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro sass: specifier: ^1.83.4 @@ -383,7 +383,7 @@ importers: specifier: ^18.17.8 version: 18.19.50 astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro examples/with-markdoc: @@ -392,7 +392,7 @@ importers: specifier: ^0.12.10 version: link:../../packages/integrations/markdoc astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro examples/with-mdx: @@ -404,7 +404,7 @@ importers: specifier: ^4.0.5 version: link:../../packages/integrations/preact astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro preact: specifier: ^10.25.4 @@ -419,7 +419,7 @@ importers: specifier: ^0.5.2 version: 0.5.2(nanostores@0.11.3)(preact@10.25.4) astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro nanostores: specifier: ^0.11.3 @@ -440,7 +440,7 @@ importers: specifier: ^1.9.0 version: 1.9.0 astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro canvas-confetti: specifier: ^1.9.3 @@ -452,7 +452,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^5.4.0 + specifier: ^5.4.1 version: link:../../packages/astro vitest: specifier: ^3.0.5 @@ -10179,7 +10179,6 @@ packages: libsql@0.4.5: resolution: {integrity: sha512-sorTJV6PNt94Wap27Sai5gtVLIea4Otb2LUiAUyr3p6BPOScGMKGt5F1b5X/XgkNtcsDKeX5qfeBDj+PdShclQ==} - cpu: [x64, arm64, wasm32] os: [darwin, linux, win32] lightningcss-darwin-arm64@1.29.1: