Skip to content

Commit 84a7b47

Browse files
committed
fix: replace z.undefined() with z.never() for JSON Schema compat
Zod v4 cannot represent z.undefined() in JSON Schema, causing the release workflow schema generation to fail. Replace with z.never() in the AB test variant XOR union — semantically equivalent for validation but serializable to JSON Schema.
1 parent 839b32b commit 84a7b47

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/schema/schemas/primitives/ab-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ export type TargetRef = z.infer<typeof TargetRefSchema>;
4545

4646
const ConfigBundleVariantConfigSchema = z.object({
4747
configurationBundle: ConfigurationBundleRefSchema,
48-
target: z.undefined().optional(),
48+
target: z.never().optional(),
4949
});
5050

5151
const TargetVariantConfigSchema = z.object({
52-
configurationBundle: z.undefined().optional(),
52+
configurationBundle: z.never().optional(),
5353
target: TargetRefSchema,
5454
});
5555

0 commit comments

Comments
 (0)