fix(zod): DateTime, Bytes, and Decimal field inference for z.input#2685
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughUpdates FieldTypeZodMap to use concrete Zod types and explicit input/output type parameters (DateTime -> z.ZodDate; Decimal/Bytes -> z.ZodType<T, T>) and adds a type-level test that verifies z.input infers the expected field input types. ChangesZod scalar type mappings and input type verification
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/zod/src/types.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
DateTime field inference for z.inputDateTime, Bytes, and Decimal field inference for z.input
|
The cast for |
|
@ymc9 I didn't know about that parameter. Will try that out later today and report back. |
|
@ymc9 everything looks good now. |
ymc9
left a comment
There was a problem hiding this comment.
Awesome, thank you! I'm merging it.
Closes #2673
Summary by CodeRabbit
Bug Fixes
Tests