Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@sentry/deno": "latest || *",
"@sentry/hono": "latest || *",
"@sentry/node": "latest || *",
"@hono/node-server": "^1.19.10",
"@hono/node-server": "^2.0.5",
"hono": "^4.12.14"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/hono/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
},
"peerDependencies": {
"@cloudflare/workers-types": "^4.x",
"@hono/node-server": "^1.x",
"@hono/node-server": "^1.x || ^2.x",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional peer dep, that is fine. we'll bump to 20 in the next sdk major

"@sentry/bun": "10.58.0",
"@sentry/cloudflare": "10.58.0",
"@sentry/deno": "10.58.0",
Expand Down
Loading