Repository navigation
fix: run close hooks once per nitro instance - #4835
Conversation
The vite builder closes nitro after the server bundle, and `nitro build` closed it again, so `close` hooks ran twice. `nitro.close()` now returns the same promise on repeated calls.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
commit: |
With the vite builder,
nitro buildranclosehooks twice:buildEnvironmentscloses nitro after the server bundle, then the CLI closes it again.nitro.close()had no guard, so anyclosehook (from config or modules) ran on every call.nitro.close()now caches its promise, so repeated or concurrent calls run the hooks once. Tests cover it with a unit test and the existing vitenitro buildfixture, which now also logsclose.🤖 Generated with AI assistant