sindresorhus / p-queue

Promise queue with concurrency control
MIT License
3.39k stars 182 forks source link

Use `EventTarget` when targeting Node.js 20 #162

Open Richienb opened 2 years ago

Richienb commented 2 years ago

EventTarget is a built-in way to do events in Node.js 16+. This could be used instead of eventemitter3 when Node.js 14 is EOL.

sindresorhus commented 12 months ago

This can be done now.

Richienb commented 12 months ago

nevermind https://nodejs.org/api/events.html#class-customevent

Richienb commented 12 months ago

waiting for CustomEvent to go stable on node

Richienb commented 9 months ago

CustomEvent exposed in globals on v19 https://github.com/nodejs/node/pull/44860 I think new globals is semver major so might not be backported...?

Richienb commented 1 month ago

Node.js 18 will be EOL April 2025. So, we should make this change by sometime early 2025.