Skip to content

v4.5.3

@cody-greene cody-greene tagged this 04 Apr 23:11
The bun runtime seems to have a buggy implementation of the Buffer
interface: `buffer.writeUInt8(value, offset)` should return the number
of bytes written plus the offset, where the offset defaults to 0.
However, the bun implementation returns "NaN" when the offset is
undefined!

```
const buf = Buffer.alloc(4)

// node 20.11.1
buf.writeUInt8(0) // return 1

// bun 1.1.0
buf.writeUInt8(0) // return NaN
```

Annoying, but the workaround is simple: Always provide the offset. Most
of the tests now work with the bun runtime with minimal modifications.
Assets 2
Loading