-
-
Notifications
You must be signed in to change notification settings - Fork 270
Fix Valibot time format to generate v.isoTimeSecond() instead of v.time() #2889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
🦋 Changeset detectedLatest commit: 0db5a43 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
|
@copilot |
Per feedback from @mrlubos, format: 'time' represents values like 20:20:39+00:00, and Valibot's isoTimeSecond() is a better fit than isoTime(). Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Changed to use v.pipe(v.string(), v.isoTimeSecond())This validates time values like |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2889 +/- ##
==========================================
- Coverage 30.01% 30.00% -0.01%
==========================================
Files 488 488
Lines 40423 40432 +9
Branches 2427 2427
==========================================
Hits 12131 12131
- Misses 28258 28267 +9
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
commit: |
OpenAPI parameters with
format: timewere generatingv.time()which doesn't exist in Valibot, causing runtime errors.Changes
timecase instring.tsto explicitly map toidentifiers.actions.isoTimeSecondBefore/After
The
isoTimeSecondidentifier already existed in constants but wasn't being used for thetimeformat case. This validator is the appropriate choice for OpenAPI'sformat: timewhich represents values like20:20:39+00:00.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.