Thanks for a really helpful library! I'm using it on a deployment process that needs to swap out strings in around 10,000 files during build. On certain glob matches, this causes a failure, because Promise.all attempts to run all promises concurrently. Node fails with a memory error. This change introduces a rate-limit to Promise.all and ensures that only 5 replacement processes are running concurrently. 5 is an arbitrary number, but seems reasonable. I've verified this causes no test failures, and it results in my build process completing. However, it introduces a dependency, so you may want to take this as a helpful pointer but make your own version of what Bottleneck does.
Coverage remained the same at 100.0% when pulling e51fdd6d683f240ad000d3f69ea2d26bf1e5d1e5 on stefl:master into ebb3c7df191189fc8d3d7bb43797c91994d75096 on adamreisnz:master.
Thanks for a really helpful library! I'm using it on a deployment process that needs to swap out strings in around 10,000 files during build. On certain glob matches, this causes a failure, because Promise.all attempts to run all promises concurrently. Node fails with a memory error. This change introduces a rate-limit to Promise.all and ensures that only 5 replacement processes are running concurrently. 5 is an arbitrary number, but seems reasonable. I've verified this causes no test failures, and it results in my build process completing. However, it introduces a dependency, so you may want to take this as a helpful pointer but make your own version of what Bottleneck does.