mirror of
https://github.com/renovatebot/renovate.git
synced 2026-11-01 18:19:51 +00:00
15f4bd8eff
* chore: migrate from zod/v3 to zod/v4 This commit contains the logic changes * chore: migrate imports from zod/v3 to zod/v4 This contains import updates and adds explicit record keys as zod/v4 requires these now * ci: enforce usage of zod/v4
21 lines
596 B
TypeScript
21 lines
596 B
TypeScript
import { z } from 'zod/v4';
|
|
|
|
const DepObject = z.object({
|
|
currentValue: z.string().optional(),
|
|
datasource: z.string().optional(),
|
|
depName: z.string().optional(),
|
|
packageName: z.string().optional(),
|
|
currentDigest: z.string().optional(),
|
|
versioning: z.string().optional(),
|
|
depType: z.string().optional(),
|
|
registryUrl: z.string().optional(),
|
|
extractVersion: z.string().optional(),
|
|
indentation: z.string().optional(),
|
|
});
|
|
|
|
export const QueryResultZod = z
|
|
.union([z.array(DepObject), DepObject])
|
|
.transform((input) => {
|
|
return Array.isArray(input) ? input : [input];
|
|
});
|