Open justinweinberg opened 3 months ago
1.1.26+0a37423ba
Darwin 23.6.0 arm64 arm
The following code in bun does not recurse subdirectories. It does in Node. Paste into an index.ts.
import { opendir } from 'node:fs/promises'; async function* list(path: string, deep: boolean) { const entries = await opendir(path, { recursive: deep, }); for await (const item of entries) { yield item; } } async function go() { let count = 0; for await (let i of list("./", true)) { count += 1; } return count; }
node --experimental-strip-types index.ts 3 bun index.ts 2
NodeJS returns the recursive result, in my case 3. Bun does not, in my case 2.
No response
This not producing an obvious error makes it more problematic imo, it would be nice to have the option being present cause an error/warning until its implemented
What version of Bun is running?
1.1.26+0a37423ba
What platform is your computer?
Darwin 23.6.0 arm64 arm
What steps can reproduce the bug?
The following code in bun does not recurse subdirectories. It does in Node. Paste into an index.ts.
What is the expected behavior?
What do you see instead?
NodeJS returns the recursive result, in my case 3. Bun does not, in my case 2.
Additional information
No response