-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat!: use bundled event emitter type #389
Conversation
Signed-off-by: Todd Baert <toddbaert@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #389 +/- ##
=======================================
Coverage 99.84% 99.84%
=======================================
Files 18 18
Lines 1326 1326
Branches 101 101
=======================================
Hits 1324 1324
Misses 2 2 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: Todd Baert <toddbaert@gmail.com>
Signed-off-by: Todd Baert <toddbaert@gmail.com>
Signed-off-by: Todd Baert <toddbaert@gmail.com>
I think this is a step in the right direction. I know you are only intending to change the client at the moment, but I think this would generally be important for server as well, though it may also become less so over time. Edge environments have their own non-node version of a number of libraries, so it would be convenient to be able to swap. I think Cloudflare added EventEmitter around a week ago, for instance. |
I'm wondering if we should define our own interface that the |
I think that exposing (and aliasing) our own export allow us to defer this decision. Of course, the underlying events lib could change underneath us, but between reasonable unit tests (yet to be written) and a locked version of that dep, I think we can call this good enough for now. I dont think it would be a huge effort though, so we could do as you say if you feel like it's worth it. |
🤖 I have created a release *beep* *boop* --- ## [0.3.0-experimental](web-sdk-v0.2.0-experimental...web-sdk-v0.3.0-experimental) (2023-04-03) ### ⚠ BREAKING CHANGES * use bundled event emitter type ([#389](#389)) ### Features * use bundled event emitter type ([#389](#389)) ([47d1634](47d1634)) ### Bug Fixes * fix readme typo ([a23f899](a23f899)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This includes an aliased, bundled version of
EventEmitter
so we have full control over that API/implementation, and consumers don't need theevents
dep for browsers.We currently bundle events (a browser polyfill for the node events API) into this package, but a provider author who wants to implement events in their provider would need to install that package as well. This removes the need for that. Interested in others' thoughts.