unjs / unenv

🕊️ Convert javaScript code to be runtime agnostic
MIT License
340 stars 18 forks source link

feat!: rewrite `node:events` with upstream node impl #264

Closed pi0 closed 2 weeks ago

pi0 commented 2 weeks ago

This PR rewrites node:events module using upstream Node.js code with class and added type safety.

Previous implementation was another rewrite of older browserify in unenv but adding new functionalities became more troubling.

pi0 commented 2 weeks ago

(not tested enough but merging to to test via nightly + followup on other modules that need it)