Open RafaelGSS opened 1 week ago
We could mark it as legacy and decide to not fix the issue, as long as the promise version is correctly async we can probably get away with the callback version being wrongly sync.
We could mark it as legacy and decide to not fix the issue, as long as the promise version is correctly async we can probably get away with the callback version being wrongly sync.
If a sync version has a feature and its callback equivalent call doesn't... looks like a bad UX to me. Have we considered a new function instead? It seems more appropriate: fs.recursiveReaddir()
Nevermind, I have a PR almost ready to fix this.
Reviving https://github.com/nodejs/node/issues/51749.
The implementation in https://github.com/nodejs/node/pull/41439 is calling a synchronous approach even for an asynchronous call. See https://github.com/nodejs/node/blob/main/lib/fs.js#L1458.
I will take a quick look at that and see if I can fix it; otherwise, we might want to consider documenting it explicitly until we have a real solution for it.
cc: @Ethan-Arrowood