0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] release (#11590)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Houston (Bot) 2024-08-02 06:18:47 -07:00 committed by GitHub
parent 19adfaa705
commit 2abbc281b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 125 additions and 121 deletions

View file

@ -1,60 +0,0 @@
---
'astro': patch
---
Removes async local storage dependency from Astro Actions. This allows Actions to run in Cloudflare and Stackblitz without opt-in flags or other configuration.
This also introduces a new convention for calling actions from server code. Instead of calling actions directly, you must wrap function calls with the new `Astro.callAction()` utility.
> `callAction()` is meant to _trigger_ an action from server code. `getActionResult()` usage with form submissions remains unchanged.
```astro
---
import { actions } from 'astro:actions';
const result = await Astro.callAction(actions.searchPosts, {
searchTerm: Astro.url.searchParams.get('search'),
});
---
{result.data && (
{/* render the results */}
)}
```
## Migration
If you call actions directly from server code, update function calls to use the `Astro.callAction()` wrapper for pages and `context.callAction()` for endpoints:
```diff
---
import { actions } from 'astro:actions';
- const result = await actions.searchPosts({ searchTerm: 'test' });
+ const result = await Astro.callAction(actions.searchPosts, { searchTerm: 'test' });
---
```
If you deploy with Cloudflare and added [the `nodejs_compat` or `nodejs_als` flags](https://developers.cloudflare.com/workers/runtime-apis/nodejs) for Actions, we recommend removing these:
```diff
compatibility_flags = [
- "nodejs_compat",
- "nodejs_als"
]
```
You can also remove `node:async_hooks` from the `vite.ssr.external` option in your `astro.config` file:
```diff
// astro.config.mjs
import { defineConfig } from 'astro/config';
export default defineConfig({
- vite: {
- ssr: {
- external: ["node:async_hooks"]
- }
- }
})
```

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -14,6 +14,6 @@
"@astrojs/mdx": "^3.1.3",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.13.0"
"astro": "^4.13.1"
},
"peerDependencies": {
"astro": "^4.0.0"

View file

@ -12,7 +12,7 @@
"test": "vitest run"
},
"dependencies": {
"astro": "^4.13.0",
"astro": "^4.13.1",
"@astrojs/react": "^3.6.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",

View file

@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.14.1",
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^4.3.0",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.13.0",
"astro": "^4.13.1",
"lit": "^3.1.4"
}
}

View file

@ -18,7 +18,7 @@
"@astrojs/vue": "^4.5.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^4.13.0",
"astro": "^4.13.1",
"preact": "^10.23.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.1",
"@preact/signals": "^1.3.0",
"astro": "^4.13.0",
"astro": "^4.13.1",
"preact": "^10.23.1"
}
}

View file

@ -14,7 +14,7 @@
"@astrojs/react": "^3.6.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^4.13.0",
"astro": "^4.13.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.4.0",
"astro": "^4.13.0",
"astro": "^4.13.1",
"solid-js": "^1.8.19"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^5.7.0",
"astro": "^4.13.0",
"astro": "^4.13.1",
"svelte": "^4.2.18"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^4.5.0",
"astro": "^4.13.0",
"astro": "^4.13.1",
"vue": "^3.4.35"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^8.3.2",
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.13.0"
"astro": "^4.13.1"
},
"peerDependencies": {
"astro": "^4.0.0"

View file

@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^8.3.2",
"astro": "^4.13.0",
"astro": "^4.13.1",
"html-minifier": "^4.0.0"
},
"devDependencies": {

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -17,7 +17,7 @@
"@tailwindcss/forms": "^0.5.7",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^4.13.0",
"astro": "^4.13.1",
"postcss": "^8.4.40",
"react": "^18.3.1",
"react-dom": "^18.3.1",

View file

@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^8.3.2",
"@astrojs/svelte": "^5.7.0",
"astro": "^4.13.0",
"astro": "^4.13.1",
"svelte": "^4.2.18"
}
}

View file

@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.13.0",
"astro": "^4.13.1",
"sass": "^1.77.8",
"sharp": "^0.33.3"
}

View file

@ -15,6 +15,6 @@
"./app": "./dist/app.js"
},
"devDependencies": {
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.1.0",
"@astrojs/node": "^8.3.2",
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.11.3",
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^5.2.0",
"astro": "^4.13.0",
"astro": "^4.13.1",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.13.0"
"astro": "^4.13.1"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^3.1.3",
"@astrojs/preact": "^3.5.1",
"astro": "^4.13.0",
"astro": "^4.13.1",
"preact": "^10.23.1"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.1",
"@nanostores/preact": "^0.5.1",
"astro": "^4.13.0",
"astro": "^4.13.1",
"nanostores": "^0.10.3",
"preact": "^10.23.1"
}

View file

@ -14,7 +14,7 @@
"@astrojs/mdx": "^3.1.3",
"@astrojs/tailwind": "^5.1.0",
"@types/canvas-confetti": "^1.6.4",
"astro": "^4.13.0",
"astro": "^4.13.1",
"autoprefixer": "^10.4.19",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.40",

View file

@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^4.13.0",
"astro": "^4.13.1",
"vitest": "^2.0.5"
}
}

View file

@ -1,5 +1,69 @@
# astro
## 4.13.1
### Patch Changes
- [#11584](https://github.com/withastro/astro/pull/11584) [`a65ffe3`](https://github.com/withastro/astro/commit/a65ffe314b112213421def26c7cc5b7e7b93558c) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Removes async local storage dependency from Astro Actions. This allows Actions to run in Cloudflare and Stackblitz without opt-in flags or other configuration.
This also introduces a new convention for calling actions from server code. Instead of calling actions directly, you must wrap function calls with the new `Astro.callAction()` utility.
> `callAction()` is meant to _trigger_ an action from server code. `getActionResult()` usage with form submissions remains unchanged.
```astro
---
import { actions } from 'astro:actions';
const result = await Astro.callAction(actions.searchPosts, {
searchTerm: Astro.url.searchParams.get('search'),
});
---
{
result.data &&
{
/* render the results */
}
}
```
## Migration
If you call actions directly from server code, update function calls to use the `Astro.callAction()` wrapper for pages and `context.callAction()` for endpoints:
```diff
---
import { actions } from 'astro:actions';
- const result = await actions.searchPosts({ searchTerm: 'test' });
+ const result = await Astro.callAction(actions.searchPosts, { searchTerm: 'test' });
---
```
If you deploy with Cloudflare and added [the `nodejs_compat` or `nodejs_als` flags](https://developers.cloudflare.com/workers/runtime-apis/nodejs) for Actions, we recommend removing these:
```diff
compatibility_flags = [
- "nodejs_compat",
- "nodejs_als"
]
```
You can also remove `node:async_hooks` from the `vite.ssr.external` option in your `astro.config` file:
```diff
// astro.config.mjs
import { defineConfig } from 'astro/config';
export default defineConfig({
- vite: {
- ssr: {
- external: ["node:async_hooks"]
- }
- }
})
```
## 4.13.0
### Minor Changes

View file

@ -1,6 +1,6 @@
{
"name": "astro",
"version": "4.13.0",
"version": "4.13.1",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",

View file

@ -115,7 +115,7 @@ importers:
examples/basics:
dependencies:
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/blog:
@ -130,13 +130,13 @@ importers:
specifier: ^3.1.6
version: link:../../packages/integrations/sitemap
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/component:
devDependencies:
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/container-with-vitest:
@ -145,7 +145,7 @@ importers:
specifier: ^3.6.1
version: link:../../packages/integrations/react
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
react:
specifier: ^18.3.1
@ -176,7 +176,7 @@ importers:
specifier: ^3.14.1
version: 3.14.1
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/framework-lit:
@ -188,7 +188,7 @@ importers:
specifier: ^0.2.1
version: 0.2.1
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
lit:
specifier: ^3.1.4
@ -218,7 +218,7 @@ importers:
specifier: ^18.3.0
version: 18.3.0
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
preact:
specifier: ^10.23.1
@ -248,7 +248,7 @@ importers:
specifier: ^1.3.0
version: 1.3.0(preact@10.23.1)
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
preact:
specifier: ^10.23.1
@ -266,7 +266,7 @@ importers:
specifier: ^18.3.0
version: 18.3.0
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
react:
specifier: ^18.3.1
@ -281,7 +281,7 @@ importers:
specifier: ^4.4.0
version: link:../../packages/integrations/solid
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
solid-js:
specifier: ^1.8.19
@ -293,7 +293,7 @@ importers:
specifier: ^5.7.0
version: link:../../packages/integrations/svelte
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
svelte:
specifier: ^4.2.18
@ -305,7 +305,7 @@ importers:
specifier: ^4.5.0
version: link:../../packages/integrations/vue
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
vue:
specifier: ^3.4.35
@ -317,13 +317,13 @@ importers:
specifier: ^8.3.2
version: link:../../packages/integrations/node
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/integration:
devDependencies:
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/middleware:
@ -332,7 +332,7 @@ importers:
specifier: ^8.3.2
version: link:../../packages/integrations/node
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
html-minifier:
specifier: ^4.0.0
@ -345,19 +345,19 @@ importers:
examples/minimal:
dependencies:
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/non-html-pages:
dependencies:
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/portfolio:
dependencies:
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/server-islands:
@ -384,7 +384,7 @@ importers:
specifier: ^18.3.0
version: 18.3.0
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
postcss:
specifier: ^8.4.40
@ -408,7 +408,7 @@ importers:
specifier: ^5.7.0
version: link:../../packages/integrations/svelte
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
svelte:
specifier: ^4.2.18
@ -417,7 +417,7 @@ importers:
examples/starlog:
dependencies:
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
sass:
specifier: ^1.77.8
@ -429,7 +429,7 @@ importers:
examples/toolbar-app:
devDependencies:
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/view-transitions:
@ -441,7 +441,7 @@ importers:
specifier: ^5.1.0
version: link:../../packages/integrations/tailwind
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/with-markdoc:
@ -450,7 +450,7 @@ importers:
specifier: ^0.11.3
version: link:../../packages/integrations/markdoc
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/with-markdown-plugins:
@ -459,7 +459,7 @@ importers:
specifier: ^5.2.0
version: link:../../packages/markdown/remark
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
hast-util-select:
specifier: ^6.0.2
@ -480,7 +480,7 @@ importers:
examples/with-markdown-shiki:
dependencies:
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
examples/with-mdx:
@ -492,7 +492,7 @@ importers:
specifier: ^3.5.1
version: link:../../packages/integrations/preact
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
preact:
specifier: ^10.23.1
@ -507,7 +507,7 @@ importers:
specifier: ^0.5.1
version: 0.5.1(nanostores@0.10.3)(preact@10.23.1)
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
nanostores:
specifier: ^0.10.3
@ -528,7 +528,7 @@ importers:
specifier: ^1.6.4
version: 1.6.4
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
autoprefixer:
specifier: ^10.4.19
@ -546,7 +546,7 @@ importers:
examples/with-vitest:
dependencies:
astro:
specifier: ^4.13.0
specifier: ^4.13.1
version: link:../../packages/astro
vitest:
specifier: ^2.0.5