diff --git a/.changeset/clever-pillows-boil.md b/.changeset/clever-pillows-boil.md deleted file mode 100644 index 8a35327675530..0000000000000 --- a/.changeset/clever-pillows-boil.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Excludes hoisted scripts and styles from Astro components imported with `?url` or `?raw` diff --git a/.changeset/good-bats-add.md b/.changeset/good-bats-add.md deleted file mode 100644 index 300ec3aab8419..0000000000000 --- a/.changeset/good-bats-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Uses the correct pageSize default in `page.size` JSDoc comment diff --git a/.changeset/gorgeous-timers-tease.md b/.changeset/gorgeous-timers-tease.md deleted file mode 100644 index 33e8ec06a2f8e..0000000000000 --- a/.changeset/gorgeous-timers-tease.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'create-astro': patch ---- - -Logs underlying error when a template cannot be downloaded diff --git a/.changeset/light-chairs-happen.md b/.changeset/light-chairs-happen.md deleted file mode 100644 index 486ecd327e6b0..0000000000000 --- a/.changeset/light-chairs-happen.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -'@astrojs/react': patch -'astro': patch ---- - -**BREAKING CHANGE to the experimental Actions API only.** Install the latest `@astrojs/react` integration as well if you're using React 19 features. - -Make `.safe()` the default return value for actions. This means `{ data, error }` will be returned when calling an action directly. If you prefer to get the data while allowing errors to throw, chain the `.orThrow()` modifier. - -```ts -import { actions } from 'astro:actions'; - -// Before -const { data, error } = await actions.like.safe(); -// After -const { data, error } = await actions.like(); - -// Before -const newLikes = await actions.like(); -// After -const newLikes = await actions.like.orThrow(); -``` - -## Migration - -To migrate your existing action calls: - -- Remove `.safe` from existing _safe_ action calls -- Add `.orThrow` to existing _unsafe_ action calls diff --git a/.changeset/mighty-mirrors-try.md b/.changeset/mighty-mirrors-try.md deleted file mode 100644 index 8198d9fe50463..0000000000000 --- a/.changeset/mighty-mirrors-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Remove "SSR Only" mention in `Astro.redirect` inline documentation and update reference link. diff --git a/.changeset/new-melons-cross.md b/.changeset/new-melons-cross.md deleted file mode 100644 index b2e30b30586a2..0000000000000 --- a/.changeset/new-melons-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a case where the build was failing when `experimental.actions` was enabled, an adapter was in use, and there were not actions inside the user code base. diff --git a/.changeset/old-bats-travel.md b/.changeset/old-bats-travel.md deleted file mode 100644 index 136f5ec206142..0000000000000 --- a/.changeset/old-bats-travel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes line with the error not being properly highlighted in the error overlay diff --git a/.changeset/silly-bulldogs-sparkle.md b/.changeset/silly-bulldogs-sparkle.md deleted file mode 100644 index 9b23a675fa538..0000000000000 --- a/.changeset/silly-bulldogs-sparkle.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -'@astrojs/react': patch -'astro': patch ---- - -**BREAKING CHANGE to the experimental Actions API only.** Install the latest `@astrojs/react` integration as well if you're using React 19 features. - -Updates the Astro Actions fallback to support `action={actions.name}` instead of using `getActionProps().` This will submit a form to the server in zero-JS scenarios using a search parameter: - -```astro ---- -import { actions } from 'astro:actions'; ---- - -
-``` - -You may also construct form action URLs using string concatenation, or by using the `URL()` constructor, with the an action's `.queryString` property: - -```astro ---- -import { actions } from 'astro:actions'; - -const confirmationUrl = new URL('/confirmation', Astro.url); -confirmationUrl.search = actions.queryString; ---- - - -``` - -## Migration - -`getActionProps()` is now deprecated. To use the new fallback pattern, remove the `getActionProps()` input from your form and pass your action function to the form `action` attribute: - -```diff ---- -import { - actions, -- getActionProps, -} from 'astro:actions'; ---- - -+ -``` diff --git a/.changeset/tasty-rockets-jog.md b/.changeset/tasty-rockets-jog.md deleted file mode 100644 index 11286bc273296..0000000000000 --- a/.changeset/tasty-rockets-jog.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Allows actions to return falsy values without an error diff --git a/.changeset/tidy-needles-build.md b/.changeset/tidy-needles-build.md deleted file mode 100644 index 140df5c0bbd6a..0000000000000 --- a/.changeset/tidy-needles-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue in content collection caching, where two documents with the same contents were generating an error during the build. diff --git a/.changeset/violet-coats-fail.md b/.changeset/violet-coats-fail.md deleted file mode 100644 index 0319b363f1121..0000000000000 --- a/.changeset/violet-coats-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes `astro add` for packages with only prerelease versions diff --git a/.changeset/violet-drinks-film.md b/.changeset/violet-drinks-film.md deleted file mode 100644 index 20098137fc6da..0000000000000 --- a/.changeset/violet-drinks-film.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes DomException errors not being handled properly diff --git a/.changeset/wicked-books-sip.md b/.changeset/wicked-books-sip.md deleted file mode 100644 index d6e4741a56e75..0000000000000 --- a/.changeset/wicked-books-sip.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fix server islands with trailingSlash: always diff --git a/examples/basics/package.json b/examples/basics/package.json index 0ce97377a2c76..65be26d353901 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index f71948fb7641a..6f2d524dc26e9 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -14,6 +14,6 @@ "@astrojs/mdx": "^3.1.3", "@astrojs/rss": "^4.0.7", "@astrojs/sitemap": "^3.1.6", - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/component/package.json b/examples/component/package.json index b34f38ef0e323..28de0116ca5c6 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.12.2" + "astro": "^4.12.3" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/container-with-vitest/package.json b/examples/container-with-vitest/package.json index dde01df833741..220ef24cbfe52 100644 --- a/examples/container-with-vitest/package.json +++ b/examples/container-with-vitest/package.json @@ -12,8 +12,8 @@ "test": "vitest run" }, "dependencies": { - "astro": "^4.12.2", - "@astrojs/react": "^3.6.0", + "astro": "^4.12.3", + "@astrojs/react": "^3.6.1", "react": "^18.3.1", "react-dom": "^18.3.1", "vitest": "^2.0.3" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 8d414f065f98d..93006889fd19d 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -14,6 +14,6 @@ "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.10", "alpinejs": "^3.14.1", - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index dfe93d735b2c4..12f937ead2366 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^4.3.0", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^4.12.2", + "astro": "^4.12.3", "lit": "^3.1.4" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 25cc87cb26248..982787d644e53 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -12,13 +12,13 @@ }, "dependencies": { "@astrojs/preact": "^3.5.1", - "@astrojs/react": "^3.6.0", + "@astrojs/react": "^3.6.1", "@astrojs/solid-js": "^4.4.0", "@astrojs/svelte": "^5.7.0", "@astrojs/vue": "^4.5.0", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "astro": "^4.12.2", + "astro": "^4.12.3", "preact": "^10.22.1", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index c9f40b7151925..d84256b57988a 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.5.1", "@preact/signals": "^1.3.0", - "astro": "^4.12.2", + "astro": "^4.12.3", "preact": "^10.22.1" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 4b6b6932e3999..a9fd1c301fc45 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -11,10 +11,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/react": "^3.6.0", + "@astrojs/react": "^3.6.1", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "astro": "^4.12.2", + "astro": "^4.12.3", "react": "^18.3.1", "react-dom": "^18.3.1" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index f54d59c592aad..6c923f27aaaf1 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^4.4.0", - "astro": "^4.12.2", + "astro": "^4.12.3", "solid-js": "^1.8.18" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index f4d5515524eea..30114a6cc066d 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^5.7.0", - "astro": "^4.12.2", + "astro": "^4.12.3", "svelte": "^4.2.18" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index e8f4c0a4c3078..d83552f854e7d 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^4.5.0", - "astro": "^4.12.2", + "astro": "^4.12.3", "vue": "^3.4.33" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 88aed2a5eb209..c753d4cae00a9 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^8.3.2", - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index b28114d8e8814..9ec69d7cfbfa8 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.12.2" + "astro": "^4.12.3" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index 2d1a2ae2eb660..9bcedacd9f688 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^8.3.2", - "astro": "^4.12.2", + "astro": "^4.12.3", "html-minifier": "^4.0.0" }, "devDependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index b93c749572e9d..86e905d61567d 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 26a6edc9e5e2a..ff69c03f7f474 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 79f953dac004d..1dad0b570718b 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/server-islands/package.json b/examples/server-islands/package.json index 35c7719217146..9eb14896804cf 100644 --- a/examples/server-islands/package.json +++ b/examples/server-islands/package.json @@ -11,13 +11,13 @@ }, "devDependencies": { "@astrojs/node": "^8.3.2", - "@astrojs/react": "^3.6.0", + "@astrojs/react": "^3.6.1", "@astrojs/tailwind": "^5.1.0", "@fortawesome/fontawesome-free": "^6.6.0", "@tailwindcss/forms": "^0.5.7", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "astro": "^4.12.2", + "astro": "^4.12.3", "postcss": "^8.4.39", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/examples/ssr/package.json b/examples/ssr/package.json index bd0ba7ad6d95e..e3d6d5c4dd259 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^8.3.2", "@astrojs/svelte": "^5.7.0", - "astro": "^4.12.2", + "astro": "^4.12.3", "svelte": "^4.2.18" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index c405f6f19dd11..527df3e101e4b 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.12.2", + "astro": "^4.12.3", "sass": "^1.77.8", "sharp": "^0.33.3" } diff --git a/examples/toolbar-app/package.json b/examples/toolbar-app/package.json index 0574fee731cf0..dfc373adda2a7 100644 --- a/examples/toolbar-app/package.json +++ b/examples/toolbar-app/package.json @@ -15,6 +15,6 @@ "./app": "./dist/app.js" }, "devDependencies": { - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json index 343c96a27c233..f31ddededd0af 100644 --- a/examples/view-transitions/package.json +++ b/examples/view-transitions/package.json @@ -12,6 +12,6 @@ "devDependencies": { "@astrojs/tailwind": "^5.1.0", "@astrojs/node": "^8.3.2", - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 89237c07485f2..c0477420c5d09 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.11.3", - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 5c2d77fc24233..ed1104b7c4c73 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/markdown-remark": "^5.2.0", - "astro": "^4.12.2", + "astro": "^4.12.3", "hast-util-select": "^6.0.2", "rehype-autolink-headings": "^7.1.0", "rehype-slug": "^6.0.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index 132fa97705198..7f43327a44f14 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.12.2" + "astro": "^4.12.3" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 704b9c3bf9335..5ec09294b267a 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^3.1.3", "@astrojs/preact": "^3.5.1", - "astro": "^4.12.2", + "astro": "^4.12.3", "preact": "^10.22.1" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 27128223a18bb..46e1ebe54e5d6 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.5.1", "@nanostores/preact": "^0.5.1", - "astro": "^4.12.2", + "astro": "^4.12.3", "nanostores": "^0.10.3", "preact": "^10.22.1" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index f2dfc62420086..62a36e1f4de53 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -14,7 +14,7 @@ "@astrojs/mdx": "^3.1.3", "@astrojs/tailwind": "^5.1.0", "@types/canvas-confetti": "^1.6.4", - "astro": "^4.12.2", + "astro": "^4.12.3", "autoprefixer": "^10.4.19", "canvas-confetti": "^1.9.3", "postcss": "^8.4.39", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 39a7d4670c993..ba41bc2c2755d 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^4.12.2", + "astro": "^4.12.3", "vitest": "^2.0.3" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 9e412cac673bd..527be3991730a 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,103 @@ # astro +## 4.12.3 + +### Patch Changes + +- [#11509](https://github.com/withastro/astro/pull/11509) [`dfbca06`](https://github.com/withastro/astro/commit/dfbca06dda674c64c7010db2f4de951496a1e631) Thanks [@bluwy](https://github.com/bluwy)! - Excludes hoisted scripts and styles from Astro components imported with `?url` or `?raw` + +- [#11561](https://github.com/withastro/astro/pull/11561) [`904f1e5`](https://github.com/withastro/astro/commit/904f1e535aeb7a14ba7ce07c3130e25f3e708266) Thanks [@ArmandPhilippot](https://github.com/ArmandPhilippot)! - Uses the correct pageSize default in `page.size` JSDoc comment + +- [#11571](https://github.com/withastro/astro/pull/11571) [`1c3265a`](https://github.com/withastro/astro/commit/1c3265a8c9c0b1b1bd597f756b63463146bacc3a) Thanks [@bholmesdev](https://github.com/bholmesdev)! - **BREAKING CHANGE to the experimental Actions API only.** Install the latest `@astrojs/react` integration as well if you're using React 19 features. + + Make `.safe()` the default return value for actions. This means `{ data, error }` will be returned when calling an action directly. If you prefer to get the data while allowing errors to throw, chain the `.orThrow()` modifier. + + ```ts + import { actions } from 'astro:actions'; + + // Before + const { data, error } = await actions.like.safe(); + // After + const { data, error } = await actions.like(); + + // Before + const newLikes = await actions.like(); + // After + const newLikes = await actions.like.orThrow(); + ``` + + ## Migration + + To migrate your existing action calls: + + - Remove `.safe` from existing _safe_ action calls + - Add `.orThrow` to existing _unsafe_ action calls + +- [#11546](https://github.com/withastro/astro/pull/11546) [`7f26de9`](https://github.com/withastro/astro/commit/7f26de906e87f1e8973a1f84399f23e36e506bb3) Thanks [@ArmandPhilippot](https://github.com/ArmandPhilippot)! - Remove "SSR Only" mention in `Astro.redirect` inline documentation and update reference link. + +- [#11525](https://github.com/withastro/astro/pull/11525) [`8068131`](https://github.com/withastro/astro/commit/80681318c6cb0f612fcb5188933fdd20a8f474a3) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a case where the build was failing when `experimental.actions` was enabled, an adapter was in use, and there were not actions inside the user code base. + +- [#11574](https://github.com/withastro/astro/pull/11574) [`e3f29d4`](https://github.com/withastro/astro/commit/e3f29d416a2e0a0b5328ae1075b12575260dddfd) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes line with the error not being properly highlighted in the error overlay + +- [#11570](https://github.com/withastro/astro/pull/11570) [`84189b6`](https://github.com/withastro/astro/commit/84189b6511dc2a14bcfe608696f56a64c2046f39) Thanks [@bholmesdev](https://github.com/bholmesdev)! - **BREAKING CHANGE to the experimental Actions API only.** Install the latest `@astrojs/react` integration as well if you're using React 19 features. + + Updates the Astro Actions fallback to support `action={actions.name}` instead of using `getActionProps().` This will submit a form to the server in zero-JS scenarios using a search parameter: + + ```astro + --- + import { actions } from 'astro:actions'; + --- + + + ``` + + You may also construct form action URLs using string concatenation, or by using the `URL()` constructor, with the an action's `.queryString` property: + + ```astro + --- + import { actions } from 'astro:actions'; + + const confirmationUrl = new URL('/confirmation', Astro.url); + confirmationUrl.search = actions.queryString; + --- + + + ``` + + ## Migration + + `getActionProps()` is now deprecated. To use the new fallback pattern, remove the `getActionProps()` input from your form and pass your action function to the form `action` attribute: + + ```diff + --- + import { + actions, + - getActionProps, + } from 'astro:actions'; + --- + + + + ``` + +- [#11559](https://github.com/withastro/astro/pull/11559) [`1953dbb`](https://github.com/withastro/astro/commit/1953dbbd41d2d7803837601a9e192654f02275ef) Thanks [@bryanwood](https://github.com/bryanwood)! - Allows actions to return falsy values without an error + +- [#11553](https://github.com/withastro/astro/pull/11553) [`02c85b5`](https://github.com/withastro/astro/commit/02c85b541241a07db45bf9e15717e111104898e5) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue in content collection caching, where two documents with the same contents were generating an error during the build. + +- [#11548](https://github.com/withastro/astro/pull/11548) [`602c5bf`](https://github.com/withastro/astro/commit/602c5bf05de4fe5ec1ea97f8e10455485aceb05f) Thanks [@TheOtterlord](https://github.com/TheOtterlord)! - Fixes `astro add` for packages with only prerelease versions + +- [#11566](https://github.com/withastro/astro/pull/11566) [`0dcef3a`](https://github.com/withastro/astro/commit/0dcef3ab171bd7f81c2f99e9366db3724aa7091b) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes DomException errors not being handled properly + +- [#11529](https://github.com/withastro/astro/pull/11529) [`504c383`](https://github.com/withastro/astro/commit/504c383e20dfb5d8eb0825a70935f221b43577b2) Thanks [@matthewp](https://github.com/matthewp)! - Fix server islands with trailingSlash: always + ## 4.12.2 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 018c79db953be..ea38df7fa9a29 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "4.12.2", + "version": "4.12.3", "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/astro/test/types/action-return-type.ts b/packages/astro/test/types/action-return-type.ts index 4922da5530370..d0ac105623263 100644 --- a/packages/astro/test/types/action-return-type.ts +++ b/packages/astro/test/types/action-return-type.ts @@ -1,8 +1,8 @@ import { describe, it } from 'node:test'; import { expectTypeOf } from 'expect-type'; import { - type SafeResult, type ActionReturnType, + type SafeResult, defineAction, } from '../../dist/actions/runtime/virtual/server.js'; import { z } from '../../zod.mjs'; diff --git a/packages/create-astro/CHANGELOG.md b/packages/create-astro/CHANGELOG.md index d5e3320bb65c6..5af50e3122778 100644 --- a/packages/create-astro/CHANGELOG.md +++ b/packages/create-astro/CHANGELOG.md @@ -1,5 +1,11 @@ # create-astro +## 4.8.1 + +### Patch Changes + +- [#11567](https://github.com/withastro/astro/pull/11567) [`d27cf6d`](https://github.com/withastro/astro/commit/d27cf6df7bd612642a1e8da5948333b00b70e8bd) Thanks [@ascorbic](https://github.com/ascorbic)! - Logs underlying error when a template cannot be downloaded + ## 4.8.0 ### Minor Changes diff --git a/packages/create-astro/package.json b/packages/create-astro/package.json index 32071380f4ffe..4a2fc13ad1661 100644 --- a/packages/create-astro/package.json +++ b/packages/create-astro/package.json @@ -1,6 +1,6 @@ { "name": "create-astro", - "version": "4.8.0", + "version": "4.8.1", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/integrations/react/CHANGELOG.md b/packages/integrations/react/CHANGELOG.md index 2bebccb85b6b6..b8aa870f5a01a 100644 --- a/packages/integrations/react/CHANGELOG.md +++ b/packages/integrations/react/CHANGELOG.md @@ -1,5 +1,83 @@ # @astrojs/react +## 3.6.1 + +### Patch Changes + +- [#11571](https://github.com/withastro/astro/pull/11571) [`1c3265a`](https://github.com/withastro/astro/commit/1c3265a8c9c0b1b1bd597f756b63463146bacc3a) Thanks [@bholmesdev](https://github.com/bholmesdev)! - **BREAKING CHANGE to the experimental Actions API only.** Install the latest `@astrojs/react` integration as well if you're using React 19 features. + + Make `.safe()` the default return value for actions. This means `{ data, error }` will be returned when calling an action directly. If you prefer to get the data while allowing errors to throw, chain the `.orThrow()` modifier. + + ```ts + import { actions } from 'astro:actions'; + + // Before + const { data, error } = await actions.like.safe(); + // After + const { data, error } = await actions.like(); + + // Before + const newLikes = await actions.like(); + // After + const newLikes = await actions.like.orThrow(); + ``` + + ## Migration + + To migrate your existing action calls: + + - Remove `.safe` from existing _safe_ action calls + - Add `.orThrow` to existing _unsafe_ action calls + +- [#11570](https://github.com/withastro/astro/pull/11570) [`84189b6`](https://github.com/withastro/astro/commit/84189b6511dc2a14bcfe608696f56a64c2046f39) Thanks [@bholmesdev](https://github.com/bholmesdev)! - **BREAKING CHANGE to the experimental Actions API only.** Install the latest `@astrojs/react` integration as well if you're using React 19 features. + + Updates the Astro Actions fallback to support `action={actions.name}` instead of using `getActionProps().` This will submit a form to the server in zero-JS scenarios using a search parameter: + + ```astro + --- + import { actions } from 'astro:actions'; + --- + + + ``` + + You may also construct form action URLs using string concatenation, or by using the `URL()` constructor, with the an action's `.queryString` property: + + ```astro + --- + import { actions } from 'astro:actions'; + + const confirmationUrl = new URL('/confirmation', Astro.url); + confirmationUrl.search = actions.queryString; + --- + + + ``` + + ## Migration + + `getActionProps()` is now deprecated. To use the new fallback pattern, remove the `getActionProps()` input from your form and pass your action function to the form `action` attribute: + + ```diff + --- + import { + actions, + - getActionProps, + } from 'astro:actions'; + --- + + + + ``` + ## 3.6.0 ### Minor Changes diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index 16ae0b279f778..114628edb25be 100644 --- a/packages/integrations/react/package.json +++ b/packages/integrations/react/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/react", "description": "Use React components within Astro", - "version": "3.6.0", + "version": "3.6.1", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 45f6a2824c02d..108f4dc4b5024 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -128,7 +128,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/blog: @@ -143,22 +143,22 @@ importers: specifier: ^3.1.6 version: link:../../packages/integrations/sitemap astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/container-with-vitest: dependencies: '@astrojs/react': - specifier: ^3.6.0 + specifier: ^3.6.1 version: link:../../packages/integrations/react astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro react: specifier: ^18.3.1 @@ -189,7 +189,7 @@ importers: specifier: ^3.14.1 version: 3.14.1 astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/framework-lit: @@ -201,7 +201,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro lit: specifier: ^3.1.4 @@ -213,7 +213,7 @@ importers: specifier: ^3.5.1 version: link:../../packages/integrations/preact '@astrojs/react': - specifier: ^3.6.0 + specifier: ^3.6.1 version: link:../../packages/integrations/react '@astrojs/solid-js': specifier: ^4.4.0 @@ -231,7 +231,7 @@ importers: specifier: ^18.3.0 version: 18.3.0 astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro preact: specifier: ^10.22.1 @@ -261,7 +261,7 @@ importers: specifier: ^1.3.0 version: 1.3.0(preact@10.22.1) astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro preact: specifier: ^10.22.1 @@ -270,7 +270,7 @@ importers: examples/framework-react: dependencies: '@astrojs/react': - specifier: ^3.6.0 + specifier: ^3.6.1 version: link:../../packages/integrations/react '@types/react': specifier: ^18.3.3 @@ -279,7 +279,7 @@ importers: specifier: ^18.3.0 version: 18.3.0 astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro react: specifier: ^18.3.1 @@ -294,7 +294,7 @@ importers: specifier: ^4.4.0 version: link:../../packages/integrations/solid astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro solid-js: specifier: ^1.8.18 @@ -306,7 +306,7 @@ importers: specifier: ^5.7.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro svelte: specifier: ^4.2.18 @@ -318,7 +318,7 @@ importers: specifier: ^4.5.0 version: link:../../packages/integrations/vue astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro vue: specifier: ^3.4.33 @@ -330,13 +330,13 @@ importers: specifier: ^8.3.2 version: link:../../packages/integrations/node astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/middleware: @@ -345,7 +345,7 @@ importers: specifier: ^8.3.2 version: link:../../packages/integrations/node astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -358,19 +358,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/server-islands: @@ -379,7 +379,7 @@ importers: specifier: ^8.3.2 version: link:../../packages/integrations/node '@astrojs/react': - specifier: ^3.6.0 + specifier: ^3.6.1 version: link:../../packages/integrations/react '@astrojs/tailwind': specifier: ^5.1.0 @@ -397,7 +397,7 @@ importers: specifier: ^18.3.0 version: 18.3.0 astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro postcss: specifier: ^8.4.39 @@ -421,7 +421,7 @@ importers: specifier: ^5.7.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro svelte: specifier: ^4.2.18 @@ -430,7 +430,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro sass: specifier: ^1.77.8 @@ -442,7 +442,7 @@ importers: examples/toolbar-app: devDependencies: astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/view-transitions: @@ -454,7 +454,7 @@ importers: specifier: ^5.1.0 version: link:../../packages/integrations/tailwind astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/with-markdoc: @@ -463,7 +463,7 @@ importers: specifier: ^0.11.3 version: link:../../packages/integrations/markdoc astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/with-markdown-plugins: @@ -472,7 +472,7 @@ importers: specifier: ^5.2.0 version: link:../../packages/markdown/remark astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro hast-util-select: specifier: ^6.0.2 @@ -493,7 +493,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro examples/with-mdx: @@ -505,7 +505,7 @@ importers: specifier: ^3.5.1 version: link:../../packages/integrations/preact astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro preact: specifier: ^10.22.1 @@ -520,7 +520,7 @@ importers: specifier: ^0.5.1 version: 0.5.1(nanostores@0.10.3)(preact@10.22.1) astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro nanostores: specifier: ^0.10.3 @@ -541,7 +541,7 @@ importers: specifier: ^1.6.4 version: 1.6.4 astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro autoprefixer: specifier: ^10.4.19 @@ -559,7 +559,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^4.12.2 + specifier: ^4.12.3 version: link:../../packages/astro vitest: specifier: ^2.0.3