chore: Upgrade Zod to version 4 (#11465)

This commit is contained in:
Tom Moor authored and GitHub committed 2026-02-15 22:54:50 -05:00
1 parent c54194f97a
commit c758f0d93a
61 files changed
+400 -373

No files matched your search

+7 -5
View File
@@ -12,16 +12,16 @@ export const GitHubCallbackSchema = BaseSchema.extend({
query: z
.object({
code: z.string().nullish(),
state: z.string().uuid().nullish(),
state: z.uuid().nullish(),
error: z.string().nullish(),
installation_id: z.coerce.number().optional(),
setup_action: z.nativeEnum(SetupAction),
setup_action: z.enum(SetupAction),
})
.refine((req) => !(isEmpty(req.code) && isEmpty(req.error)), {
message: "one of code or error is required",
error: "one of code or error is required",
})
.refine((req) => isEmpty(req.code) || isEmpty(req.error), {
message: "code and error cannot both be present",
error: "code and error cannot both be present",
})
.refine(
(req) =>
@@ -29,7 +29,9 @@ export const GitHubCallbackSchema = BaseSchema.extend({
req.setup_action === SetupAction.install &&
isUndefined(req.installation_id)
),
{ message: "installation_id is required for installation" }
{
error: "installation_id is required for installation",
}
),
});