[PR #651] [CLOSED] feat: add optional dev-time next typegen #749

Closed
opened 2026-05-06 13:09:55 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/651
Author: @pacexy
Created: 3/22/2026
Status: Closed

Base: mainHead: feat/dev-next-typegen


📝 Commits (10+)

  • 2849219 Add dev-time Next typegen support
  • 056b6f6 Document type safety workflow
  • 436bad6 update
  • ad3b936 update docs
  • 9c8b1a6 fix: close typegen on vite server shutdown
  • 13e693b fix: rely on default env inheritance for typegen
  • 7937f92 fix: log the first successful typegen run
  • 79b276c fix: detach typegen child listeners before kill
  • a2f061d docs: explain deferred dev typegen startup
  • 0fbb66e docs: clarify the temporary next typegen tradeoff

📊 Changes

4 files changed (+384 additions, -0 deletions)

View changed files

📝 README.md (+21 -0)
📝 packages/vinext/src/index.ts (+25 -0)
packages/vinext/src/typegen.ts (+139 -0)
tests/typegen.test.ts (+199 -0)

📄 Description

Summary

  • run automatically during dev server startup when Next.js is installed
  • rerun typegen when app/pages route files are added or removed, with a small debounce and serialized execution
  • add tests covering startup, opt-out via , route-file watch reruns, and missing-Next fallback behavior

Notes

  • this PR is intended as a temporary stopgap to improve developer experience
  • Vinext startup still succeeds when next is not installed; typegen is skipped in that case
  • the long-term goal is still native Vinext type generation rather than depending on next typegen

Testing

  • vp check
  • vp test tests/tsconfig-paths-vite8.test.ts tests/typegen.test.ts

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/651 **Author:** [@pacexy](https://github.com/pacexy) **Created:** 3/22/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/dev-next-typegen` --- ### 📝 Commits (10+) - [`2849219`](https://github.com/cloudflare/vinext/commit/2849219206bf29ccb9a7268b54d31c88c12a24bf) Add dev-time Next typegen support - [`056b6f6`](https://github.com/cloudflare/vinext/commit/056b6f634fd33f779948dfbf77958811a0421cd0) Document type safety workflow - [`436bad6`](https://github.com/cloudflare/vinext/commit/436bad619c0b48a341121d2226433311bc2d84df) update - [`ad3b936`](https://github.com/cloudflare/vinext/commit/ad3b9367462763a76ed7e404174917fe7c425895) update docs - [`9c8b1a6`](https://github.com/cloudflare/vinext/commit/9c8b1a66c2f178a2f18a610f643bc673963eb339) fix: close typegen on vite server shutdown - [`13e693b`](https://github.com/cloudflare/vinext/commit/13e693b91ca97b14dc59951e3b581d23cba8c6e9) fix: rely on default env inheritance for typegen - [`7937f92`](https://github.com/cloudflare/vinext/commit/7937f92c276ae812cdf84266a31178b4bedeb6c9) fix: log the first successful typegen run - [`79b276c`](https://github.com/cloudflare/vinext/commit/79b276c7591d976e25a2ddfc21fdf70f2ebd08a4) fix: detach typegen child listeners before kill - [`a2f061d`](https://github.com/cloudflare/vinext/commit/a2f061d4e1b9723b0cb2c58188b48c8ae46932bb) docs: explain deferred dev typegen startup - [`0fbb66e`](https://github.com/cloudflare/vinext/commit/0fbb66e4475b4c7294055b0b7abdbdcf1640e2a4) docs: clarify the temporary next typegen tradeoff ### 📊 Changes **4 files changed** (+384 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+21 -0) 📝 `packages/vinext/src/index.ts` (+25 -0) ➕ `packages/vinext/src/typegen.ts` (+139 -0) ➕ `tests/typegen.test.ts` (+199 -0) </details> ### 📄 Description ## Summary - run automatically during dev server startup when Next.js is installed - rerun typegen when app/pages route files are added or removed, with a small debounce and serialized execution - add tests covering startup, opt-out via , route-file watch reruns, and missing-Next fallback behavior ## Notes - this PR is intended as a temporary stopgap to improve developer experience - Vinext startup still succeeds when `next` is not installed; typegen is skipped in that case - the long-term goal is still native Vinext type generation rather than depending on `next typegen` ## Testing - vp check - vp test tests/tsconfig-paths-vite8.test.ts tests/typegen.test.ts --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:09:55 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#749
No description provided.