Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Node EventEmitter with standard EventTarget #3

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

pascalduez
Copy link
Member

@pascalduez pascalduez commented Sep 2, 2024

  • goal: remove the events polyfill from our client bundles.
  • Use an EventTarget which is native to both Node and browsers, but have fewer capabilities compared to EventEmitter.
  • Emulate EventEmitter.listenerCount to keep the expected behaviour on errors.
  • The only breaking change is that event listener will get passed data as a single event object instead of individual params.

@pascalduez pascalduez force-pushed the feature/remove-node-eventemitter branch 3 times, most recently from 6496100 to d5707f3 Compare September 2, 2024 16:09
@pascalduez pascalduez marked this pull request as ready for review September 3, 2024 15:22
@pascalduez pascalduez requested review from yanndinendal, iamdey, benoitbar and a team and removed request for a team September 3, 2024 15:23
@pascalduez pascalduez force-pushed the feature/remove-node-eventemitter branch from d5707f3 to 7c08699 Compare September 4, 2024 15:44
@pascalduez pascalduez merged commit 7bfbce4 into master Sep 4, 2024
1 check passed
@pascalduez pascalduez deleted the feature/remove-node-eventemitter branch September 4, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants