ky is a popular fetching library based on fetch which has over 10k stars on Github. It doesn't work nice with Bun and sometimes provides undefined instead of json output.
What version of Bun is running?
1.1.12+43f0913c3
What platform is your computer?
Darwin 23.5.0 arm64 arm
What steps can reproduce the bug?
create repro.ts file and run it:
import _ky from 'ky'
const ky = _ky.extend({
"method": "GET",
})
while (true) {
const fetched = await ky('https://jsonplaceholder.typicode.com/posts/1').json<any>()
console.log(fetched.id)
}
What is the expected behavior?
Bun expected to output
1
1
1
1
1
1
1
1
Literally always one
What do you see instead?
It randomly provides undefined values, which doesn't happen with node
ky
is a popular fetching library based onfetch
which has over 10k stars on Github. It doesn't work nice with Bun and sometimes provides undefined instead of json output.What version of Bun is running?
1.1.12+43f0913c3
What platform is your computer?
Darwin 23.5.0 arm64 arm
What steps can reproduce the bug?
create repro.ts file and run it:
What is the expected behavior?
Bun expected to output
Literally always one
What do you see instead?
It randomly provides undefined values, which doesn't happen with node
Additional information
No response