I'm seeing the error: FATAL RangeError: Maximum call stack size exceeded while attempting to run this on a very large directory.
The reason is that each file path (84K of them in my case) is spread in arrayUnion, meaning it's placed on the stack.
This can be fixed by changing return arrayUnion(...tasks); to instead be something like return arrayUnion(tasks); and changing arrayUnion to take a single array of arrays, instead of spread.
I can open a PR sometime, but it might be a while, as it depends on my (rare) spare time!
I'm seeing the error:
FATAL RangeError: Maximum call stack size exceededwhile attempting to run this on a very large directory.The reason is that each file path (84K of them in my case) is spread in
arrayUnion, meaning it's placed on the stack.This can be fixed by changing
return arrayUnion(...tasks);to instead be something likereturn arrayUnion(tasks);and changingarrayUnionto take a single array of arrays, instead of spread.I can open a PR sometime, but it might be a while, as it depends on my (rare) spare time!