✨ feat: Added optional production graceful shutdown for bun adapter.#196
Merged
rphlmr merged 2 commits intorphlmr:mainfrom Feb 17, 2026
Merged
✨ feat: Added optional production graceful shutdown for bun adapter.#196rphlmr merged 2 commits intorphlmr:mainfrom
rphlmr merged 2 commits intorphlmr:mainfrom
Conversation
commit: |
Owner
|
Thanks for your pull request! I will take a look ASAP, in the meantime a temporary release is available |
There was a problem hiding this comment.
Pull request overview
Adds an optional “production graceful shutdown” hook to the Bun adapter so consumers can run cleanup after the HTTP server is stopped, and includes a new Bun example plus README updates.
Changes:
- Add
onGracefulShutdownoption to Bun adapter options and attempt to wire SIGINT/SIGTERM handling in production. - Add a new
examples/bun/graceful-shutdownproject demonstrating the feature. - Document the new option in the root README and add a changeset for a minor release.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/adapters/bun.ts |
Introduces onGracefulShutdown option and production signal/shutdown logic. |
README.md |
Documents the new Bun option in the Bun adapter options section. |
examples/bun/graceful-shutdown/* |
New example app/config demonstrating graceful shutdown usage. |
.changeset/bold-jars-cheer.md |
Declares a minor version bump for the new feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
Do not bother too much with AI reviews, it was initially just to try this feature 👀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #195
Description
This adds an item to the
Bunoptions increateHonoServerto enable an optional production graceful shutdown handler that cleans up resources after HTTP connections are closed and all requests have completed.Includes an example.
Type of change
Please mark relevant options with an
xin the brackets.How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also
list any relevant details for your test configuration
Reviewer checklist
Mark everything that needs to be checked before merging the PR.
Screenshots (if appropriate):