feat: add generators for missing types and cli option to fail on errors#166
Conversation
…ndler inference Stop eagerly emitting z.infer aliases during preprocess and apply alias components on cache hits. Reuse shared handler insights in the app router so coverage and redirect inference stay correct. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@martijn00 really appreciate the heavy lifting here! 👍 Could we split this into smaller incremental PRs? It'd make isolating the test regressions and reviewing much smoother. Thanks a lot! 😉 |
|
I understand it is easier in smaller PRs, but I've just quickly fixed the issues I found in my own projects here. It should be fine because it is covered by tests. I added a lot more tests even. It seems like a lot of changes but most of these are test samples for the projects. |
|
@martijn00 makes sense, thanks for the clarification! Appreciate the quick reply. |
Use organizationId and projectId in scale fixture detail routes so Next.js app-router sample apps no longer conflict at build time, and declare zod in scalar/swagger apps to satisfy knip. Co-authored-by: Cursor <cursoragent@cursor.com>
tazo90
left a comment
There was a problem hiding this comment.
Thanks for the PR @martijn00! 🙏
I finally had some time today to go through the changes. Overall, really nice work - especially the runtime cache, handler insights, and the Zod runtime exporter. I just have two merge blockers before we can land it:
-
E2E next-app-drizzle-zod fails on typecheck. The committed apps/next-app-drizzle-zod/src/schemas/generated/ files break because the app is pinned to Zod 3 while drizzle-zod@0.8.3 generates Zod 4 schemas. Per the repo convention, generated app schemas shouldn't be committed? Would it make sense to gitignore this directory? That should fix the E2E.
-
schema-full-coverage.test.ts times out in CI (5s). It probably just needs a slightly higher test timeout, either for this test or the integration suite.
|
@tazo90 i've done a fix. Let me know if there is anything else |
|
Also fixed #167 |
There was a problem hiding this comment.
@martijn00 sorry for the hold-up, I just wanted to be 100% sure this was ready to merge. Massive thanks for the heavy lifting on this PR. I deeply appreciate the time and hard work you poured into it. Amazing contribution! 🚀 🙏
Thank you very much for fixing #167 👍
Pull Request
Description
Type of Change
!after type, e.g.,feat!:)Checklist
pnpm checkpassespnpm testandpnpm buildwhen relevant)Your PR title must follow Conventional Commits:
✅ Good Examples
❌ Bad Examples
Why? We use squash merge - your PR title becomes the commit message and is used for:
feat:= minor,fix:= patch)See CONTRIBUTING.md for details.
Thanks for contributing! 🚀