Skip to content

fix(context): revert PR #4707#4757

Merged
yusukebe merged 1 commit intomainfrom
fix/context-revert-4707
Feb 23, 2026
Merged

fix(context): revert PR #4707#4757
yusukebe merged 1 commit intomainfrom
fix/context-revert-4707

Conversation

@yusukebe
Copy link
Copy Markdown
Member

We added the fast path for c.json() in #4707. It uses Response.json() in the fast path. It seems good, but sometimes the behavior of Response.json() differs across runtimes. For example, c.json(undefined). The result, the PR #4756, is created.

Now, I revert the PR #4707 and disable the fast path for c.json(). We can keep the fast path logic without Response.json(), but if so, the bundle size will increase slightly. For now, revert.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

@github-actions
Copy link
Copy Markdown

Bundle size check

main (2de30d7) #4757 (ca558ef) +/-
Bundle Size (B) 18,528B 18,483B -45B
Bundle Size (KB) 18.09K 18.05K -0.04K

Compiler Diagnostics (tsc)

main (2de30d7) #4757 (ca558ef) +/-
Files 303 303 0
Lines 141,269 141,261 -8
Identifiers 129,115 129,106 -9
Symbols 270,135 269,884 -251
Types 203,192 203,188 -4
Instantiations 610,147 610,141 -6
Memory used 339,860K 339,713K -147K
I/O read 0.03s 0.02s -0.01s
I/O write 0s 0s 0s
Parse time 0.68s 0.69s 0.01s
Bind time 0.27s 0.3s 0.03s
Check time 2.66s 2.48s -0.18s
Emit time 0s 0s 0s
Total time 3.61s 3.46s -0.15s

Compiler Diagnostics (typescript-go)

main (2de30d7) #4757 (ca558ef) +/-
Files 303 303 0
Lines 145,450 145,442 -8
Identifiers 130,706 130,697 -9
Symbols 393,045 388,548 -4,497
Types 373,354 373,348 -6
Instantiations 984,371 984,355 -16
Memory used 256,032K 254,978K -1,054K
Memory allocs 2,582,658 2,582,592 -66
Config time 0.001s 0.001s 0s
Parse time 0.096s 0.099s 0.003s
Bind time 0.038s 0.023s -0.015s
Check time 0.625s 0.621s -0.004s
Emit time 0s 0s 0s
Total time 0.804s 0.798s -0.006s

Reported by octocov

@github-actions
Copy link
Copy Markdown

HTTP Performance Benchmark

Framework Runtime Average Ping Query Body
hono (origin/main) bun 35,247.06 49,609.99 29,962.13 26,169.05
hono (current) bun 34,785.17 49,812.08 29,528.12 25,015.32
Change -1.31% +0.41% -1.45% -4.41%

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.48%. Comparing base (2de30d7) to head (8d9f1e6).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4757      +/-   ##
==========================================
- Coverage   91.48%   91.48%   -0.01%     
==========================================
  Files         177      177              
  Lines       11556    11550       -6     
  Branches     3357     3354       -3     
==========================================
- Hits        10572    10566       -6     
  Misses        983      983              
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yusukebe yusukebe merged commit 212c64f into main Feb 23, 2026
20 checks passed
@yusukebe yusukebe deleted the fix/context-revert-4707 branch February 23, 2026 07:16
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.

1 participant