chore: upgrade-zod-4#470
Conversation
ec8857d to
4214def
Compare
| } | ||
| }) as z.ZodEffects<z.ZodNullable<T>, z.infer<T>>; | ||
| }; | ||
| ): z.ZodType<z.infer<typeof schema>, z.infer<typeof schema> | null> { |
There was a problem hiding this comment.
ZodType<output type, input type> cause why would they do it the natural way> Twats!
There was a problem hiding this comment.
In fact, it might make some sense cause I guess it is more frequent modifying/adding the first parameter?
| // eslint-disable-next-line @typescript-eslint/explicit-function-return-type | ||
| const tryItOutSchema = () => | ||
| z.object({ | ||
| const tryItOutSchema = function (): z.ZodObject<{ hasSentTestReminder: z.ZodBoolean }, z.core.$strip> { |
There was a problem hiding this comment.
can be avoided we we prefer the eslint exception
There was a problem hiding this comment.
Nah, this is fine now the return type isn't a complex mess. Probably not worth doing everywhere else though
| "@mantine/core": "8.2.2", | ||
| "@mantine/hooks": "8.2.2", | ||
| "@notifycal/shared": "5.1.0", | ||
| "@notifycal/shared": "file:../shared/notifycal-shared-5.1.0.tgz", |
| } | ||
| return; | ||
| }) | ||
| .transform((v) => v!) as z.ZodType<z.infer<typeof schema>, z.infer<typeof schema> | null>; |
There was a problem hiding this comment.
What does the transform do? return true/false?
| subcategory: nullableInputSchema( | ||
| z.string({ message: t('businessDetails.formIndustrySubcategoryField.isRequired') }) | ||
| z.string({ message: t('businessDetails.formIndustrySubcategoryField.isRequired') }), | ||
| t('businessDetails.formIndustrySubcategoryField.isRequired') |
There was a problem hiding this comment.
Is the 2nd parameter required? Or it was a bug? If it was a bug, maybe we can drop the message from z.string to avoid having the same thing in 2 places?
There was a problem hiding this comment.
I had to be a bug although I didn't bother checking.
I assumed the translation was needed in both places judging by nullable category equivalent.
dsiguero
left a comment
There was a problem hiding this comment.
Remember to use fix or feat to ensure we get a release off this
ah good point. I will make it fix although it is really a chore. |

No description provided.