When write-file-atomic is used by multiple processes (e.g. in worker-farm) it can run into a race condition where the same file is being written/renamed concurrently. On Windows it causes the following error:
Error: EPERM: operation not permitted, rename '...' -> '...'
#22 seems to address this issue for async writes within the same process, but the issue still exists for parallel sync/async writes.
Here's a repro that demonstrates the problem: https://github.com/asapach/write-atomic-issue
Original issue: jestjs/jest#4444