You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: node_modules/.../http-proxy-middleware/index.d.ts(8,30): error TS2307: Cannot find module '@hono/node-server' or its corresponding type declarations.
Error: node_modules/.../http-proxy-middleware/index.d.ts(9,35): error TS2307: Cannot find module 'hono' or its corresponding type declarations.
Separate package 'http-proxy-middleware/hono' subpath export
This PR introduces a Hono-specific export subpath (./hono) to the package, separating Hono-dependent types from the main distribution. It creates a new index-hono.ts entrypoint and updates imports across examples, tests, and documentation to use the subpath import path.
Changes
Hono-Specific Export Separation
Layer / File(s)
Summary
Package Export Configuration package.json
Adds new exports["./hono"] entry pointing to ./dist/index-hono.d.ts and ./dist/index-hono.js, enabling the http-proxy-middleware/hono subpath.
Hono Entrypoint src/index-hono.ts
New file documents the Hono-specific API entrypoint and re-exports createHonoProxyMiddleware from ./factory-hono.js to avoid forcing Hono types on consumers of the main package.
Main API Restructuring src/index.ts
Updated to re-export from ./factory.js instead of ./factory-hono.js, removing Hono-dependent code from the default export.
Example Shim Infrastructure examples/package.json, examples/subpath.hono.shim.js
Adds ESM imports mapping for #http-proxy-middleware/hono → ./subpath.hono.shim.js and creates the shim to re-export from ../dist/index-hono.js.
🐰 A bunny hops through exports fair,
Separating Hono with care,
Types no longer burden the main,
A subpath shines like sun after rain,
Cleaner imports, lighter to bear!
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name
Status
Explanation
Linked Issues check
✅ Passed
The PR successfully addresses issue #1219 by creating a separate 'http-proxy-middleware/hono' export, allowing consumers to opt-in to hono support without requiring hono as a dependency.
Out of Scope Changes check
✅ Passed
All changes directly support the objective of creating a separate hono export entry point; no unrelated modifications are present.
Title check
✅ Passed
The title accurately describes the main objective: creating a separate subpath export for Hono-specific middleware to allow optional, opt-in consumption without forcing Hono dependencies.
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
✏️ 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 fix-hono-deps
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
chimurai
changed the title
refactor(hono): package export 'http-proxy-middleware/hono'
refactor(hono): package subpath 'http-proxy-middleware/hono'
May 2, 2026
chimurai
changed the title
refactor(hono): package subpath 'http-proxy-middleware/hono'
refactor(package): subpath 'http-proxy-middleware/hono'
May 2, 2026
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
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.
fixes: #1219
fixes: web-infra-dev/rspack#13883
Separate package
'http-proxy-middleware/hono'subpath exportSummary by CodeRabbit
New Features
http-proxy-middleware/honosubpath export, enabling developers to import and use Hono-specific proxy middleware independently.Documentation