Documentation Is:
Please Explain in Detail...
The concurrency option's description is as follows:
Limits the number of simultaneous requests to fs.
This was a bit misleading. I was running into errors of Error: EMFILE, too many open files while using this plugin even changing concurrency down to a value of 1.
The actual code in the plugin is as follow:
await Promise.all(this.patterns.map((item, index) => limit(async () => { ...
This means that if you pass an entire directory like node_modules, this plugin will go ham opening files which might cause an error if your process's open file limit is too low.
Maybe its a misuse of the plugin but it might be worth being more specific in the docs.
Your Proposal for Changes
I would specify this limits the number of concurrent patterns that will be running but the number of files opened might still be quite large if you pass a directory. Perhaps something like:
Limits the number of simultaneous patterns that will run concurrently. This has no affect on limiting the number of files opened for directories.
Documentation Is:
Please Explain in Detail...
The concurrency option's description is as follows:
This was a bit misleading. I was running into errors of
Error: EMFILE, too many open fileswhile using this plugin even changing concurrency down to a value of 1.The actual code in the plugin is as follow:
await Promise.all(this.patterns.map((item, index) => limit(async () => { ...This means that if you pass an entire directory like node_modules, this plugin will go ham opening files which might cause an error if your process's open file limit is too low.
Maybe its a misuse of the plugin but it might be worth being more specific in the docs.
Your Proposal for Changes
I would specify this limits the number of concurrent patterns that will be running but the number of files opened might still be quite large if you pass a directory. Perhaps something like: