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

Switch exported EventEmitter to the C++ implementation #28946

Merged
merged 27 commits into from
May 20, 2024

Conversation

tsapeta
Copy link
Member

@tsapeta tsapeta commented May 17, 2024

Why

I'm switching the exported EventEmitter from the legacy JS implementation to the new one in C++. The previous one will be exported as LegacyEventEmitter and still used in some modules that were not migrated to Expo Modules API (in this case the module object is not an instance of the C++ emitter).

It also renames Subscription type to a more meaningful EventSubscription. I'm intentionally not renaming how the type is re-exported by other packages so I don't introduce a breaking change yet – eventually this type shouldn't be re-exported at all, instead be a common type exported from the expo package.

Test Plan

I went through tests and examples of the modules I changed.

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label May 17, 2024
@expo-bot
Copy link
Collaborator

expo-bot commented May 17, 2024

The Pull Request introduced fingerprint changes against the base commit: 025f63f

Fingerprint diff
[
  {
    "type": "dir",
    "filePath": "../../node_modules/expo",
    "reasons": [
      "bareRncliAutolinking"
    ],
    "hash": "e1210adc8e3b158a03f1c78a63901e403cfe5bc9"
  },
  {
    "type": "dir",
    "filePath": "../../packages/expo",
    "reasons": [
      "expoAutolinkingIos",
      "expoAutolinkingAndroid",
      "expoConfigPlugins",
      "expoConfigPlugins"
    ],
    "hash": "f791cd1726404fa85442b32e12047368d6e90818"
  },
  {
    "type": "dir",
    "filePath": "../../packages/expo-dev-launcher",
    "reasons": [
      "expoAutolinkingIos",
      "expoAutolinkingAndroid"
    ],
    "hash": "16e8fe388df60d874ff08162b0962b2d3fa5f158"
  },
  {
    "type": "dir",
    "filePath": "../../packages/expo-modules-core",
    "reasons": [
      "expoAutolinkingIos",
      "expoAutolinkingAndroid"
    ],
    "hash": "eff67da5a285006dc532eb299cde08e2b7576cbb"
  }
]

Generated by PR labeler 🤖

@tsapeta tsapeta force-pushed the @tsapeta/core/remove-legacy-event-emitter branch 2 times, most recently from 72ab8a4 to c873630 Compare May 18, 2024 08:27
@tsapeta tsapeta changed the title [core] Remove legacy EventEmitter class Switch exported EventEmitter to the C++ implementation May 18, 2024
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels May 18, 2024
@tsapeta tsapeta merged commit 84dedef into main May 20, 2024
18 of 20 checks passed
@tsapeta tsapeta deleted the @tsapeta/core/remove-legacy-event-emitter branch May 20, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants