-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: move to native fs.promises #314
base: main
Are you sure you want to change the base?
Conversation
@isaacs are you able to review this? Just want to make sure it doesn't fall through the cracks |
Here are the benchmarks (run from #319) before and after this change. Run in Node 22.4.0 on a MacBook Pro with an M3 Pro chip. before
after
|
I was able to adapt the test from I think it happens less often but that's just anecdotal from running it in CI a bunch of times until it fails eventually. So I still think the solution proposed in #303 will need to be applied to make this more bulletproof. |
This is basically #284 but rebased with the latest changes.
While working on sindresorhus/del#161, I came across #303 - and can consistently reproduce that on Windows (there's a test in
del
to try 200 deletions in quick succession). From testing, it seemed to me this issue is related to timings aroundreaddir
, and seeminglynode:fs/promises
don't suffer from the same issue (tests consistently passes with this patch applied).If it's acceptable, this would be a useful patch to v5 as well since Node.js v18 is still in maintenance mode.