Repository navigation
feat(mount): introduce Mount Middleware and deprecate app.mount - #5221
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5221 +/- ##
==========================================
+ Coverage 80.24% 80.30% +0.06%
==========================================
Files 148 149 +1
Lines 10472 10504 +32
Branches 2336 2347 +11
==========================================
+ Hits 8403 8435 +32
Misses 2069 2069 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hey @usualoma ! What do you think of moving the mount feature from |
|
@yusukebe I think |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Bundle size check
Compiler Diagnostics (tsc)
Compiler Diagnostics (typescript-go)
Reported by octocov |
HTTP Performance Benchmark
|
app.mountapp.mount
|
Hey @usualoma I am planing introuce Mount Middleware and depracate I think it's okay to obsolete So, please review this! If you have an opinion about the breaking change, feel free to share. |
|
Thank you. LGTM! |
|
@usualoma Thanks! |
I realized that
app.mount()doesn't need to be placed inhono-base.ts. The codebase ofapp.mount()is a little bit fat compared to other methods inhono-base.ts, though the lines are very few in the real world. Anyway, the unnecessary should be removed fromhono-base.ts.So, we can make it a middleware called Mount Middleware. The usage is below:
I think the API syntax is very Hono-like and love it.
As a result, the bundle size will be
501Bsmaller (vs current main):This PR will obsolete
app.mount()completely, so this is a breaking change. Should be introduced in the next major release v5.The author should do the following, if applicable
bun run format:fix && bun run lint:fixto format the code