0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-03 22:57:08 -05:00

[ci] release (#11940)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Houston (Bot) 2024-09-13 04:04:37 -07:00 committed by GitHub
parent 878f7f60ba
commit 490eed1cd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 142 additions and 146 deletions

View file

@ -1,5 +0,0 @@
---
'@astrojs/mdx': patch
---
Handles nested root hast node when optimizing MDX

View file

@ -1,63 +0,0 @@
---
'astro': patch
---
Adds support for Zod discriminated unions on Action form inputs. This allows forms with different inputs to be submitted to the same action, using a given input to decide which object should be used for validation.
This example accepts either a `create` or `update` form submission, and uses the `type` field to determine which object to validate against.
```ts
import { defineAction } from 'astro:actions';
import { z } from 'astro:schema';
export const server = {
changeUser: defineAction({
accept: 'form',
input: z.discriminatedUnion('type', [
z.object({
type: z.literal('create'),
name: z.string(),
email: z.string().email(),
}),
z.object({
type: z.literal('update'),
id: z.number(),
name: z.string(),
email: z.string().email(),
}),
]),
async handler(input) {
if (input.type === 'create') {
// input is { type: 'create', name: string, email: string }
} else {
// input is { type: 'update', id: number, name: string, email: string }
}
},
}),
}
```
The corresponding `create` and `update` forms may look like this:
```astro
---
import { actions } from 'astro:actions';
---
<!--Create-->
<form action={actions.changeUser} method="POST">
<input type="hidden" name="type" value="create" />
<input type="text" name="name" required />
<input type="email" name="email" required />
<button type="submit">Create User</button>
</form>
<!--Update-->
<form action={actions.changeUser} method="POST">
<input type="hidden" name="type" value="update" />
<input type="hidden" name="id" value="user-123" />
<input type="text" name="name" required />
<input type="email" name="email" required />
<button type="submit">Update User</button>
</form>
```

View file

@ -1,5 +0,0 @@
---
"astro": patch
---
Fixes a typo in the server island JSDoc

View file

@ -1,5 +0,0 @@
---
'astro': patch
---
Remove dependency on path-to-regexp

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.15.4"
"astro": "^4.15.5"
}
}

View file

@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^3.1.5",
"@astrojs/mdx": "^3.1.6",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"astro": "^4.15.4"
"astro": "^4.15.5"
}
}

View file

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

View file

@ -12,7 +12,7 @@
"test": "vitest run"
},
"dependencies": {
"astro": "^4.15.4",
"astro": "^4.15.5",
"@astrojs/react": "^3.6.2",
"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.15.4"
"astro": "^4.15.5"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^4.3.0",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.15.4",
"astro": "^4.15.5",
"lit": "^3.2.0"
}
}

View file

@ -18,7 +18,7 @@
"@astrojs/vue": "^4.5.0",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"astro": "^4.15.4",
"astro": "^4.15.5",
"preact": "^10.23.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.3",
"@preact/signals": "^1.3.0",
"astro": "^4.15.4",
"astro": "^4.15.5",
"preact": "^10.23.2"
}
}

View file

@ -14,7 +14,7 @@
"@astrojs/react": "^3.6.2",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"astro": "^4.15.4",
"astro": "^4.15.5",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.4.1",
"astro": "^4.15.4",
"astro": "^4.15.5",
"solid-js": "^1.8.22"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^5.7.0",
"astro": "^4.15.4",
"astro": "^4.15.5",
"svelte": "^4.2.19"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^4.5.0",
"astro": "^4.15.4",
"astro": "^4.15.5",
"vue": "^3.5.3"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^8.3.3",
"astro": "^4.15.4"
"astro": "^4.15.5"
}
}

View file

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

View file

@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^8.3.3",
"astro": "^4.15.4",
"astro": "^4.15.5",
"html-minifier": "^4.0.0"
},
"devDependencies": {

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.15.4"
"astro": "^4.15.5"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.15.4"
"astro": "^4.15.5"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.15.4"
"astro": "^4.15.5"
}
}

View file

@ -17,7 +17,7 @@
"@tailwindcss/forms": "^0.5.9",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"astro": "^4.15.4",
"astro": "^4.15.5",
"postcss": "^8.4.45",
"react": "^18.3.1",
"react-dom": "^18.3.1",

View file

@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^8.3.3",
"@astrojs/svelte": "^5.7.0",
"astro": "^4.15.4",
"astro": "^4.15.5",
"svelte": "^4.2.19"
}
}

View file

@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.15.4",
"astro": "^4.15.5",
"sass": "^1.78.0",
"sharp": "^0.33.3"
}

View file

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

View file

@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^5.1.0",
"@astrojs/node": "^8.3.3",
"astro": "^4.15.4"
"astro": "^4.15.5"
}
}

View file

@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.11.4",
"astro": "^4.15.4"
"astro": "^4.15.5"
}
}

View file

@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^5.2.0",
"astro": "^4.15.4",
"astro": "^4.15.5",
"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.15.4"
"astro": "^4.15.5"
}
}

View file

@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^3.1.5",
"@astrojs/mdx": "^3.1.6",
"@astrojs/preact": "^3.5.3",
"astro": "^4.15.4",
"astro": "^4.15.5",
"preact": "^10.23.2"
}
}

View file

@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.3",
"@nanostores/preact": "^0.5.2",
"astro": "^4.15.4",
"astro": "^4.15.5",
"nanostores": "^0.11.3",
"preact": "^10.23.2"
}

View file

@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^3.1.5",
"@astrojs/mdx": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
"@types/canvas-confetti": "^1.6.4",
"astro": "^4.15.4",
"astro": "^4.15.5",
"autoprefixer": "^10.4.20",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.45",

View file

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

View file

@ -1,5 +1,73 @@
# astro
## 4.15.5
### Patch Changes
- [#11939](https://github.com/withastro/astro/pull/11939) [`7b09c62`](https://github.com/withastro/astro/commit/7b09c62b565cd7b50c35fb68d390729f936a43fb) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Adds support for Zod discriminated unions on Action form inputs. This allows forms with different inputs to be submitted to the same action, using a given input to decide which object should be used for validation.
This example accepts either a `create` or `update` form submission, and uses the `type` field to determine which object to validate against.
```ts
import { defineAction } from 'astro:actions';
import { z } from 'astro:schema';
export const server = {
changeUser: defineAction({
accept: 'form',
input: z.discriminatedUnion('type', [
z.object({
type: z.literal('create'),
name: z.string(),
email: z.string().email(),
}),
z.object({
type: z.literal('update'),
id: z.number(),
name: z.string(),
email: z.string().email(),
}),
]),
async handler(input) {
if (input.type === 'create') {
// input is { type: 'create', name: string, email: string }
} else {
// input is { type: 'update', id: number, name: string, email: string }
}
},
}),
};
```
The corresponding `create` and `update` forms may look like this:
```astro
---
import { actions } from 'astro:actions';
---
<!--Create-->
<form action={actions.changeUser} method="POST">
<input type="hidden" name="type" value="create" />
<input type="text" name="name" required />
<input type="email" name="email" required />
<button type="submit">Create User</button>
</form>
<!--Update-->
<form action={actions.changeUser} method="POST">
<input type="hidden" name="type" value="update" />
<input type="hidden" name="id" value="user-123" />
<input type="text" name="name" required />
<input type="email" name="email" required />
<button type="submit">Update User</button>
</form>
```
- [#11968](https://github.com/withastro/astro/pull/11968) [`86ad1fd`](https://github.com/withastro/astro/commit/86ad1fd223e2d2c448372caa159090efbee69237) Thanks [@NikolaRHristov](https://github.com/NikolaRHristov)! - Fixes a typo in the server island JSDoc
- [#11983](https://github.com/withastro/astro/pull/11983) [`633eeaa`](https://github.com/withastro/astro/commit/633eeaa9d8a8a35bba638fde06fd8f52cc1c2ce3) Thanks [@uwej711](https://github.com/uwej711)! - Remove dependency on path-to-regexp
## 4.15.4
### Patch Changes

View file

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

View file

@ -1,5 +1,11 @@
# @astrojs/mdx
## 3.1.6
### Patch Changes
- [#11975](https://github.com/withastro/astro/pull/11975) [`c9ae7b1`](https://github.com/withastro/astro/commit/c9ae7b1b89e050900bbc111f29e8c5d95c26bf36) Thanks [@bluwy](https://github.com/bluwy)! - Handles nested root hast node when optimizing MDX
## 3.1.5
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@astrojs/mdx",
"description": "Add support for MDX pages in your Astro site",
"version": "3.1.5",
"version": "3.1.6",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",

66
pnpm-lock.yaml generated
View file

@ -116,13 +116,13 @@ importers:
examples/basics:
dependencies:
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/blog:
dependencies:
'@astrojs/mdx':
specifier: ^3.1.5
specifier: ^3.1.6
version: link:../../packages/integrations/mdx
'@astrojs/rss':
specifier: ^4.0.7
@ -131,13 +131,13 @@ importers:
specifier: ^3.1.6
version: link:../../packages/integrations/sitemap
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/component:
devDependencies:
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/container-with-vitest:
@ -146,7 +146,7 @@ importers:
specifier: ^3.6.2
version: link:../../packages/integrations/react
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
react:
specifier: ^18.3.1
@ -177,7 +177,7 @@ importers:
specifier: ^3.14.1
version: 3.14.1
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/framework-lit:
@ -189,7 +189,7 @@ importers:
specifier: ^0.2.1
version: 0.2.1
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
lit:
specifier: ^3.2.0
@ -219,7 +219,7 @@ importers:
specifier: ^18.3.0
version: 18.3.0
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
preact:
specifier: ^10.23.2
@ -249,7 +249,7 @@ importers:
specifier: ^1.3.0
version: 1.3.0(preact@10.23.2)
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
preact:
specifier: ^10.23.2
@ -267,7 +267,7 @@ importers:
specifier: ^18.3.0
version: 18.3.0
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
react:
specifier: ^18.3.1
@ -282,7 +282,7 @@ importers:
specifier: ^4.4.1
version: link:../../packages/integrations/solid
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
solid-js:
specifier: ^1.8.22
@ -294,7 +294,7 @@ importers:
specifier: ^5.7.0
version: link:../../packages/integrations/svelte
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
svelte:
specifier: ^4.2.19
@ -306,7 +306,7 @@ importers:
specifier: ^4.5.0
version: link:../../packages/integrations/vue
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
vue:
specifier: ^3.5.3
@ -318,13 +318,13 @@ importers:
specifier: ^8.3.3
version: 8.3.3(astro@packages+astro)
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/integration:
devDependencies:
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/middleware:
@ -333,7 +333,7 @@ importers:
specifier: ^8.3.3
version: 8.3.3(astro@packages+astro)
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
html-minifier:
specifier: ^4.0.0
@ -346,19 +346,19 @@ importers:
examples/minimal:
dependencies:
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/non-html-pages:
dependencies:
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/portfolio:
dependencies:
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/server-islands:
@ -385,7 +385,7 @@ importers:
specifier: ^18.3.0
version: 18.3.0
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
postcss:
specifier: ^8.4.45
@ -409,7 +409,7 @@ importers:
specifier: ^5.7.0
version: link:../../packages/integrations/svelte
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
svelte:
specifier: ^4.2.19
@ -418,7 +418,7 @@ importers:
examples/starlog:
dependencies:
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
sass:
specifier: ^1.78.0
@ -430,7 +430,7 @@ importers:
examples/toolbar-app:
devDependencies:
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/view-transitions:
@ -442,7 +442,7 @@ importers:
specifier: ^5.1.0
version: link:../../packages/integrations/tailwind
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/with-markdoc:
@ -451,7 +451,7 @@ importers:
specifier: ^0.11.4
version: link:../../packages/integrations/markdoc
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/with-markdown-plugins:
@ -460,7 +460,7 @@ importers:
specifier: ^5.2.0
version: link:../../packages/markdown/remark
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
hast-util-select:
specifier: ^6.0.2
@ -481,19 +481,19 @@ importers:
examples/with-markdown-shiki:
dependencies:
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
examples/with-mdx:
dependencies:
'@astrojs/mdx':
specifier: ^3.1.5
specifier: ^3.1.6
version: link:../../packages/integrations/mdx
'@astrojs/preact':
specifier: ^3.5.3
version: link:../../packages/integrations/preact
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
preact:
specifier: ^10.23.2
@ -508,7 +508,7 @@ importers:
specifier: ^0.5.2
version: 0.5.2(nanostores@0.11.3)(preact@10.23.2)
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
nanostores:
specifier: ^0.11.3
@ -520,7 +520,7 @@ importers:
examples/with-tailwindcss:
dependencies:
'@astrojs/mdx':
specifier: ^3.1.5
specifier: ^3.1.6
version: link:../../packages/integrations/mdx
'@astrojs/tailwind':
specifier: ^5.1.0
@ -529,7 +529,7 @@ importers:
specifier: ^1.6.4
version: 1.6.4
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
autoprefixer:
specifier: ^10.4.20
@ -547,7 +547,7 @@ importers:
examples/with-vitest:
dependencies:
astro:
specifier: ^4.15.4
specifier: ^4.15.5
version: link:../../packages/astro
vitest:
specifier: ^2.0.5