deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

node: events.setMaxListeners()

Open dahlia opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe.

Node.js introduced events.setMaxListeners() function since v15.4.0, but deno_std's node compatibility layer lacks this API. Some existing libraries depending on this API does not work on Deno.

Describe the solution you'd like

It would be great if deno_std's node compatibility layer also provides the same name of function.

Describe alternatives you've considered

dahlia avatar Jun 29 '22 13:06 dahlia

@kt3k I want to get into Deno (I have prior Rust and Node experience), Can I take this one?

geofmureithi avatar Jul 01 '22 05:07 geofmureithi

@geofmureithi yes, please!

kt3k avatar Jul 01 '22 05:07 kt3k

Looking at the main branch, there is this method. https://github.com/denoland/deno_std/blob/main/node/_events.mjs#L141 @dahlia Am I missing something? FYI, I am a first time contributor to deno 😅.

geofmureithi avatar Jul 02 '22 06:07 geofmureithi

@geofmureithi Node.js provides module-level setMaxListeners() function besides EventEmitter.setMaxListeners() method. Currently deno_std/node only provides the latter.

dahlia avatar Jul 02 '22 07:07 dahlia

Let me make an attempt before the end of the week and see how it goes.

geofmureithi avatar Jul 05 '22 07:07 geofmureithi