Skip to content

fix(hono): use Hono HttpBindings in createHonoProxyMiddleware#1201

Merged
chimurai merged 1 commit intomasterfrom
hono-req-res-types
Apr 7, 2026
Merged

fix(hono): use Hono HttpBindings in createHonoProxyMiddleware#1201
chimurai merged 1 commit intomasterfrom
hono-req-res-types

Conversation

@chimurai
Copy link
Copy Markdown
Owner

@chimurai chimurai commented Apr 7, 2026

Summary by CodeRabbit

  • Refactor
    • Improved internal type safety for proxy middleware configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a01123ff-9e18-4a1e-8653-955cfe9df3cc

📥 Commits

Reviewing files that changed from the base of the PR and between a0a11c1 and 0b0bc82.

📒 Files selected for processing (1)
  • src/factory-hono.ts

📝 Walkthrough

Walkthrough

Added explicit generic type parameters to createProxyMiddleware invocation within createHonoProxyMiddleware, constraining the proxy function's type signature to match Hono's HttpBindings['incoming'] and HttpBindings['outgoing']. No runtime behavior changes.

Changes

Cohort / File(s) Summary
Generic Type Parameterization
src/factory-hono.ts
Added explicit generic types <HttpBindings['incoming'], HttpBindings['outgoing']> to createProxyMiddleware call to enforce compile-time type constraints aligned with Hono bindings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • #1193: Introduced the createHonoProxyMiddleware implementation that now receives explicit generic type parameterization in this change.

Poem

🐰 A hop, a skip, through types so tight,
Generic bounds now shining bright,
No runtime fright, just compile-time might,
The proxy stands precise and right! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: parameterizing createHonoProxyMiddleware to use Hono's HttpBindings for type safety.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hono-req-res-types

Comment @coderabbitai help to get the list of available commands and usage tips.

@chimurai chimurai force-pushed the hono-req-res-types branch from 4af1617 to 0b0bc82 Compare April 7, 2026 18:50
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 7, 2026

npm i https://pkg.pr.new/http-proxy-middleware@1201

commit: 0b0bc82

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 7, 2026

Coverage Status

No base build to compare — hono-req-res-types into master

@chimurai chimurai merged commit b489ab6 into master Apr 7, 2026
21 checks passed
@chimurai chimurai deleted the hono-req-res-types branch April 7, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants