Commit 6933cbb
authored
fix skipConvexValidation - still do zod validation (#874)
<!-- Describe your PR here. -->
Fixes #865
<!--
The following applies to third-party contributors.
Convex employees and contractors can delete or ignore.
-->
----
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Option to skip automatic Convex validation for custom function
builders retained.
* **Improvements**
* Centralized input/output validation for consistent behavior and
clearer error messages.
* When skipping Convex validation, argument and return validation
behavior is now predictable for Zod-backed custom functions.
* **Tests**
* Added tests for skip-validation scenarios: extra-arg handling,
input-type errors, and invalid return-data errors.
* **Chores**
* Package version bumped.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->File tree
6 files changed
+96
-14
lines changed- packages/convex-helpers
- server
6 files changed
+96
-14
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
349 | 355 | | |
350 | 356 | | |
351 | 357 | | |
352 | 358 | | |
353 | 359 | | |
354 | 360 | | |
355 | 361 | | |
356 | | - | |
| 362 | + | |
357 | 363 | | |
358 | 364 | | |
359 | 365 | | |
360 | | - | |
| 366 | + | |
361 | 367 | | |
362 | 368 | | |
363 | 369 | | |
| |||
371 | 377 | | |
372 | 378 | | |
373 | 379 | | |
374 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
375 | 383 | | |
376 | 384 | | |
377 | 385 | | |
| |||
404 | 412 | | |
405 | 413 | | |
406 | 414 | | |
407 | | - | |
| 415 | + | |
408 | 416 | | |
409 | 417 | | |
410 | | - | |
| 418 | + | |
411 | 419 | | |
412 | 420 | | |
413 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
185 | 216 | | |
186 | 217 | | |
187 | 218 | | |
| |||
264 | 295 | | |
265 | 296 | | |
266 | 297 | | |
| 298 | + | |
267 | 299 | | |
268 | 300 | | |
269 | 301 | | |
| |||
398 | 430 | | |
399 | 431 | | |
400 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
401 | 466 | | |
402 | 467 | | |
403 | 468 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
849 | 849 | | |
850 | 850 | | |
851 | 851 | | |
852 | | - | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
853 | 859 | | |
854 | 860 | | |
855 | 861 | | |
856 | 862 | | |
857 | 863 | | |
858 | 864 | | |
859 | 865 | | |
860 | | - | |
| 866 | + | |
861 | 867 | | |
862 | 868 | | |
863 | 869 | | |
864 | | - | |
| 870 | + | |
865 | 871 | | |
866 | 872 | | |
867 | 873 | | |
| |||
875 | 881 | | |
876 | 882 | | |
877 | 883 | | |
878 | | - | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
879 | 887 | | |
880 | 888 | | |
881 | 889 | | |
| |||
908 | 916 | | |
909 | 917 | | |
910 | 918 | | |
911 | | - | |
| 919 | + | |
912 | 920 | | |
913 | 921 | | |
914 | | - | |
| 922 | + | |
915 | 923 | | |
916 | 924 | | |
917 | 925 | | |
| |||
0 commit comments