Open babymum7 opened 1 year ago
I'm actually just about done fixing this, the problem was our node:events.on
was out of spec and didn't return an async iterator, which readline
's async iterator uses internally. Once I finish testing that, this issue should be resolved too
Related: #2187
when fix
This works on bun 1.0.25:
import { createReadStream } from "node:fs";
import { createInterface } from "node:readline/promises";
const stream = createReadStream('file.csv');
const rl = createInterface({ input: stream });
for await (const line of rl) {
console.log(line);
}
Edit: Nope. Only reads 3 lines.
It now appears to only read the first line.
It now appears to only read the first line.
Confirmed in 1.0.26
What version of Bun is running?
0.5.8
What platform is your computer?
Darwin 22.4.0 x86_64 i386
What steps can reproduce the bug?
readline node not working with async iterator syntax while createReadStream dose
What is the expected behavior?
Should work just like with Node
What do you see instead?
Additional information
minimal snippet