Repository navigation
ref(hono): Share the middleware classification - #25453
Merged
Merged
Conversation
Hono 5 removes c.req.matchedRoutes and c.req.routePath. The vendored HonoRequest type required both, so app.use(honoMiddleware(app)) failed with TS2769 on Hono 5. Make matchedRoutes optional and drop routePath, which the SDK does not read. Add Vitest type tests against Hono 4 and a pinned Hono 5 release candidate, a type check of the SDK calls in the Hono 4 E2E apps, and a lint rule that keeps hono imports out of @sentry/server-utils. Pin the hono devDependency of @sentry/hono to 4.13.9, so the package no longer builds against the hoisted version by chance. Refs #25223 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
s1gr1d
added this pull request to stack #25455
October 16, 2026 12:14
Contributor
size-limit report 📦Compared: 98cdb6e (PR test merge using develop at 250547c) Against: 250547c (develop) · base run #63375 ✅ Baseline matches: this diff contains only this PR's changes.
|
The hono devDependency of @sentry/hono (4.13.9) and the integration tests (^4.13.7) resolved to two Hono copies. Their HonoRequest types differ by a unique symbol, so sentry(app) did not type-check in the bun and cloudflare integration tests, and yarn dedupe-deps:check failed. Resolve both to 4.13.9. Refs #25223 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
s1gr1d
force-pushed
the
sig/hono-5--1-classifier
branch
from
October 16, 2026 12:29
6d659c1 to
2b08611
Compare
s1gr1d
marked this pull request as ready for review
October 16, 2026 12:36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Context hook and wrapSubAppMiddleware each had their own copy of the rule that tells middleware from route handlers. Move the rule to getMiddlewareFlags() and check the shape of the match result entries before the hook reads them. No behavior change. Refs #25223 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
s1gr1d
force-pushed
the
sig/hono-5--1-classifier
branch
from
October 16, 2026 12:44
2b08611 to
1de41db
Compare
Contributor
mydea
approved these changes
Oct 21, 2026
# Conflicts: # packages/hono/package.json # yarn.lock
# Conflicts: # packages/server-utils/src/integrations/hono/honoIntegration.ts
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 59 successful. See the run.
Successful checks
|
s1gr1d
requested review from
chargome and
nicohrubec
and removed request for
a team
October 23, 2026 14:55
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.
Preparation for #25454. No behavior change.
wrapSubAppMiddlewarehad their own copies of the rule that tells middleware from route handlers. Both now callgetMiddlewareFlags()isMatchedHandlerList()), instead of optional chaining at each stepRef #25223