mirror of
https://github.com/renovatebot/renovate.git
synced 2026-11-01 02:00:10 +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
26 lines
640 B
TypeScript
26 lines
640 B
TypeScript
import { z } from 'zod/v4';
|
|
import { Toml } from '../../../util/schema-utils/index.ts';
|
|
|
|
export const GleamToml = Toml.pipe(
|
|
z.object({
|
|
name: z.string(),
|
|
dependencies: z.record(z.string(), z.string()).optional(),
|
|
['dev-dependencies']: z.record(z.string(), z.string()).optional(),
|
|
}),
|
|
);
|
|
|
|
const Package = z.object({
|
|
name: z.string(),
|
|
version: z.string(),
|
|
requirements: z.array(z.string()).optional(),
|
|
});
|
|
|
|
export const ManifestToml = Toml.pipe(
|
|
z.object({
|
|
packages: z.array(Package).optional(),
|
|
}),
|
|
);
|
|
|
|
export type GleamToml = z.infer<typeof GleamToml>;
|
|
export type ManifestToml = z.infer<typeof ManifestToml>;
|