mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
## Summary - Fixes #22481 where `Socket.write()` was throwing "Stream._isArrayBufferView is not a function" when passed a Uint8Array - The helper methods were being added to the wrong Stream export - Now adds them directly to the Stream constructor in `internal/streams/legacy.ts` where they're actually used ## Test plan - Added regression test in `test/regression/issue/22481.test.ts` - Test verifies that sockets can write Uint8Array, Buffer, and other TypedArray views - All tests pass with the fix 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>