feat(hono): Extend peer dependency range#21550
Merged
Merged
Conversation
| "peerDependencies": { | ||
| "@cloudflare/workers-types": "^4.x", | ||
| "@hono/node-server": "^1.x", | ||
| "@hono/node-server": "^1.x || ^2.x", |
Contributor
There was a problem hiding this comment.
Bug: The peerDependencies range for @hono/node-server allows installing v2, which requires Node.js v20+, on projects using Node.js v18, causing runtime failures.
Severity: HIGH
Suggested Fix
To prevent runtime failures on Node.js v18, either update @sentry/hono's engines field to require Node.js v20+, or restrict the @hono/node-server peer dependency to ^1.x to ensure only compatible versions are installed.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: packages/hono/package.json#L99
Potential issue: The `package.json` for `@sentry/hono` specifies a Node.js engine
requirement of `>=18`. However, it defines an optional peer dependency on
`@hono/node-server` with a version range of `^1.x || ^2.x`. Since version 2 of
`@hono/node-server` requires Node.js v20+, a user on a Node.js v18 environment could
inadvertently install this incompatible version. This will lead to a runtime failure
when the application attempts to import from `@hono/node-server`, as the package is not
compatible with Node.js v18.
Also affects:
dev-packages/e2e-tests/test-applications/hono-4/package.json:21~21
Did we get this right? 👍 / 👎 to inform future reviews.
Member
Author
There was a problem hiding this comment.
optional peer dep, that is fine. we'll bump to 20 in the next sdk major
nicohrubec
approved these changes
Jun 15, 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
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.
@hono/node-server@2, v1 is covered in integration tests