Skip to content

Conversation

nakasyou
Copy link
Contributor

I've just realized that WebSocket helper didn't require createBunWebSocket to provide functions used to upgrade connections.
This PR allows to write code like the code:

import { upgradeWebSocket, websocket } from 'hono/bun'

app.get('/ws', upgradeWebSocket(...))

export default {
  fetch: app.fetch,
  websocket
}

Codes using a WebSocket with Bun will become simpler than before.

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

yusukebe and others added 11 commits June 17, 2025 07:43
- Add conditional logic to handle external fork PRs
- Internal PRs: post comment as before
- Fork PRs: show results in logs due to permission restrictions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <[email protected]>
* fix(utils/color): avoid unhandled scheme errors

* test: add esbuild test
* fix(utils/color): avoid resolving pacakages via Bun.build

* fix: use try/catch instead of let
* fix(cookie): use `tryDecode` when parsing cookie

* add test

* typo
Copy link

codecov bot commented Jun 21, 2025

Codecov Report

❌ Patch coverage is 88.13559% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.23%. Comparing base (5af4f1f) to head (a176bfc).
⚠️ Report is 1 commits behind head on next.

Files with missing lines Patch % Lines
src/utils/color.ts 12.50% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4242      +/-   ##
==========================================
- Coverage   91.44%   91.23%   -0.21%     
==========================================
  Files         170      170              
  Lines       10881    10884       +3     
  Branches     3103     3077      -26     
==========================================
- Hits         9950     9930      -20     
- Misses        930      953      +23     
  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.

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

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

LGTM!

@yusukebe
Copy link
Member

Hi @nakasyou

Looks good to me! I'll include this change in the next minor release v4.9 since this is a feat change, and making the method deprecated. If we should hurry, can you tell me so?

@nakasyou
Copy link
Contributor Author

Hi @yusukebe. Thank you for reviewing. I don't hurry so releasing with v4.9 is good.

@yusukebe yusukebe changed the base branch from main to next August 7, 2025 00:14
@yusukebe yusukebe merged commit 6dafa42 into honojs:next Aug 7, 2025
17 checks passed
@nakasyou nakasyou deleted the feat/direct-import-bun-websocket branch August 7, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants