Upgrade to Zod v4 (#2605)

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Dax
2025-09-15 03:12:07 -04:00
committed by GitHub
parent 89d820b1c4
commit c1b4e1f19d
75 changed files with 1106 additions and 1304 deletions

View File

@@ -1,7 +1,7 @@
import path from "path"
import { Global } from "../global"
import fs from "fs/promises"
import { z } from "zod"
import z from "zod/v4"
import { NamedError } from "../util/error"
import { lazy } from "../util/lazy"
import { Log } from "../util/log"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import z from "zod/v4"
import { Bus } from "../bus"
import { $ } from "bun"
import { formatPatch, structuredPatch } from "diff"
@@ -18,7 +18,7 @@ export namespace File {
removed: z.number().int(),
status: z.enum(["added", "deleted", "modified"]),
})
.openapi({
.meta({
ref: "File",
})
@@ -32,7 +32,7 @@ export namespace File {
type: z.enum(["file", "directory"]),
ignored: z.boolean(),
})
.openapi({
.meta({
ref: "FileNode",
})
export type Node = z.infer<typeof Node>
@@ -60,7 +60,7 @@ export namespace File {
})
.optional(),
})
.openapi({
.meta({
ref: "FileContent",
})
export type Content = z.infer<typeof Content>

View File

@@ -2,7 +2,7 @@
import path from "path"
import { Global } from "../global"
import fs from "fs/promises"
import { z } from "zod"
import z from "zod/v4"
import { NamedError } from "../util/error"
import { lazy } from "../util/lazy"
import { $ } from "bun"

View File

@@ -1,4 +1,4 @@
import { z } from "zod"
import z from "zod/v4"
import { Bus } from "../bus"
import fs from "fs"
import { Log } from "../util/log"