Skip to content

Commit bc23207

Browse files
Make publishDate optional in output schema
The Zod schema used z.union([z.string(), z.undefined()]) which requires the key to be present. Providers like Mise never set publishDate, so the key is absent entirely. Changed to z.string().optional() which allows missing keys. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1b32428 commit bc23207

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const dependencyVersionSchema = z.object({
66
latestVersion: z.string(),
77
usedBy: z.array(z.string()),
88
dependencyTypes: z.array(z.enum(['dev', 'prod'])),
9-
publishDate: z.union([z.string(), z.undefined()]),
9+
publishDate: z.string().optional(),
1010
inCatalog: z.boolean(),
1111
});
1212

0 commit comments

Comments
 (0)