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

feat: typesafe event emitter #490

Merged
merged 4 commits into from
Jul 21, 2023

Conversation

beeme1mr
Copy link
Member

This PR

  • adds type safety to the event emitter

Related Issues

Fixes #489

Notes

The event emitter was split into two classes. OpenFeatureEventEmitter is meant to be used by developers working on OpenFeature. InternalEventEmitter is meant for use within the SDK. Unfortunately, the internal emitter is currently being exposed publically. This is because both the client and server SDKs expose the entire shared lib.

Signed-off-by: Michael Beemer <[email protected]>
@beeme1mr beeme1mr requested a review from a team as a code owner July 20, 2023 20:53
@beeme1mr beeme1mr linked an issue Jul 20, 2023 that may be closed by this pull request
beeme1mr added 2 commits July 20, 2023 16:55
Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Copy link
Member

@thomaspoignant thomaspoignant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I like the fact that we have typed objects for each event type it makes it explicit when to use optional fields such as flagsChanged.

@beeme1mr beeme1mr requested a review from lukas-reining July 21, 2023 14:25
Signed-off-by: Michael Beemer <[email protected]>
@beeme1mr beeme1mr merged commit 92e3a72 into main Jul 21, 2023
@beeme1mr beeme1mr deleted the 489-web-sdk-clientname-in-eventdetails-is-overriden branch July 21, 2023 18:21
toddbaert pushed a commit that referenced this pull request Jul 22, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.0.8](shared-v0.0.7...shared-v0.0.8)
(2023-07-22)


### Features

* typesafe event emitter
([#490](#490))
([92e3a72](92e3a72))


### Bug Fixes

* race adding handler during init
([#501](#501))
([0be9c5d](0be9c5d))

---
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>
beeme1mr pushed a commit that referenced this pull request Jul 24, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.4.0](js-sdk-v1.3.3...js-sdk-v1.4.0)
(2023-07-22)


### Features

* typesafe event emitter
([#490](#490))
([92e3a72](92e3a72))


### Bug Fixes

* race adding handler during init
([#501](#501))
([0be9c5d](0be9c5d))

---
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>
beeme1mr pushed a commit that referenced this pull request Jul 24, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.3.8-experimental](web-sdk-v0.3.7-experimental...web-sdk-v0.3.8-experimental)
(2023-07-24)


### Features

* typesafe event emitter
([#490](#490))
([92e3a72](92e3a72))


### Bug Fixes

* onContextChanged not running for named providers
([#491](#491))
([1ab0cc6](1ab0cc6))
* race adding handler during init
([#501](#501))
([0be9c5d](0be9c5d))

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

web-sdk: clientName in EventDetails is overriden
4 participants