Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Aug 15, 2024

Unlike the EventEmitter in the node SDK the EventTarget was not providing an interface directly on the LDClient. The LDClient has its own off/on interface which is not directly implemented via an event target. Which means removing it simplifies the implementation instead of complicating it.

Second it is in the common code and node in a leaf implementation. Which means it requires a polyfill where it is not supported. Like when using hermes with React Native.

Typically we dispatch using a micro-task, but EventTarget dispatches synchronously. For now this maintains the synchronous behavior.

Fixes: #412

@kinyoklion kinyoklion marked this pull request as ready for review August 15, 2024 17:25
@kinyoklion kinyoklion requested a review from a team as a code owner August 15, 2024 17:25
@kinyoklion kinyoklion merged commit 448ad67 into main Aug 15, 2024
@kinyoklion kinyoklion deleted the rlamb/remove-event-target-shim branch August 15, 2024 19:12
@github-actions github-actions bot mentioned this pull request Aug 15, 2024
kinyoklion pushed a commit that referenced this pull request Aug 16, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>js-client-sdk-common: 1.4.0</summary>

##
[1.4.0](js-client-sdk-common-v1.3.0...js-client-sdk-common-v1.4.0)
(2024-08-15)


### Features

* Remove event target shim.
([#545](#545))
([448ad67](448ad67)),
closes [#412](#412)
</details>

<details><summary>react-native-client-sdk: 10.5.0</summary>

##
[10.5.0](react-native-client-sdk-v10.4.0...react-native-client-sdk-v10.5.0)
(2024-08-15)


### Features

* Remove event target shim.
([#545](#545))
([448ad67](448ad67)),
closes [#412](#412)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk-common bumped from 1.3.0 to 1.4.0
</details>

---
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.

React native SDK issue on Monorepo

3 participants