Update dependency astro to v4.15.6 #147

Merged
jahanson merged 1 commit from renovate/astro-monorepo into main 2024-09-13 21:06:09 -05:00
Collaborator

This PR contains the following updates:

Package Type Update Change
astro (source) dependencies patch 4.15.4 -> 4.15.6

Release Notes

withastro/astro (astro)

v4.15.6

Compare Source

Patch Changes

v4.15.5

Compare Source

Patch Changes
  • #​11939 7b09c62 Thanks @​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.

    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:


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | dependencies | patch | [`4.15.4` -> `4.15.6`](https://renovatebot.com/diffs/npm/astro/4.15.4/4.15.6) | --- ### Release Notes <details> <summary>withastro/astro (astro)</summary> ### [`v4.15.6`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4156) [Compare Source](https://github.com/withastro/astro/compare/astro@4.15.5...astro@4.15.6) ##### Patch Changes - [#&#8203;11993](https://github.com/withastro/astro/pull/11993) [`ffba5d7`](https://github.com/withastro/astro/commit/ffba5d716edcdfc42899afaa4188b7a4cd0c91eb) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Fix getStaticPaths regression This reverts a previous change meant to remove a dependency, to fix a regression with multiple nested spread routes. - [#&#8203;11964](https://github.com/withastro/astro/pull/11964) [`06eff60`](https://github.com/withastro/astro/commit/06eff60cabb55d91fe4075421b1693b1ab33225c) Thanks [@&#8203;TheOtterlord](https://github.com/TheOtterlord)! - Add wayland (wl-copy) support to `astro info` ### [`v4.15.5`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#4155) [Compare Source](https://github.com/withastro/astro/compare/astro@4.15.4...astro@4.15.5) ##### Patch Changes - [#&#8203;11939](https://github.com/withastro/astro/pull/11939) [`7b09c62`](https://github.com/withastro/astro/commit/7b09c62b565cd7b50c35fb68d390729f936a43fb) Thanks [@&#8203;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: </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43Ny4zIiwidXBkYXRlZEluVmVyIjoiMzguNzcuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
smeagol-help added 1 commit 2024-09-13 06:32:13 -05:00
smeagol-help force-pushed renovate/astro-monorepo from a20525410f to c84fa51d16 2024-09-13 15:01:52 -05:00 Compare
smeagol-help changed title from Update dependency astro to v4.15.5 to Update dependency astro to v4.15.6 2024-09-13 15:02:12 -05:00
jahanson merged commit deec846044 into main 2024-09-13 21:06:09 -05:00
jahanson deleted branch renovate/astro-monorepo 2024-09-13 21:06:09 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jahanson/joehanson-dev#147
No description provided.