bugconfirmed buggood first issue
説明
What version of Bun is running?
1.1.20+ae1948925
What platform is your computer?
Darwin 23.6.0 arm64 arm
What steps can reproduce the bug?
let Undici = await import("undici")
let agent = new Undici.Agent()
await agent.close()
What is the expected behavior?
On Node 22.9.0 - the last command returns null, no exceptions.
What do you see instead?
On Bun 1.1.20, agent.close is not implemented, so an exception is thrown (somehow crashing the REPL if using it).
> await agent.close()
2 | return await agent.close();;})();
^
TypeError: agent.close is not a function. (In 'agent.close()', 'agent.close' is undefined)
Additional information
This is preventing NodeHttpClient.layerUndici from @effect/platform-node from working, as agent.close is used here:
Thankfully the default client (NodeHttpClient.layer) works just fine as it uses node:http module under the hood.