mcollina / fastq

Fast, in memory work queue
ISC License
943 stars 47 forks source link

Using argument.call #18

Closed yonathan06 closed 4 years ago

yonathan06 commented 4 years ago

I get the following error trying to register a plugin in fastify v3, which uses avvio which uses this library: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them stack trace:

Plugin.exec (node_modules/avvio/plugin.js:129:17)
Boot.loadPlugin (node_modules/avvio/plugin.js:263:10)
Task.release (node_modules/fastq/queue.js:140:16)
worked (node_modules/fastq/queue.js:182:10)
node_modules/avvio/plugin.js:266:7
done (node_modules/avvio/plugin.js:198:5)
check (node_modules/avvio/plugin.js:222:9)

it seams that fastq is using worker.call(), when worker is an argument (assigned from context argument), but using argument.call() is desecrated from es5

Hope I'm not missing anything

mcollina commented 4 years ago

I'm totally lost on the error you are getting, can you please include an example to reproduce?

yonathan06 commented 4 years ago

Error on my side, sorry for the trouble