Skip to content

Commit

Permalink
[expo] support DevToolsPluginClient websocket multiplexing on expo web (
Browse files Browse the repository at this point in the history
#27702)

# Why

if an expo web app contain multiple devtool plugins, we will create
multiple websocket connection on web.

# How

- move the connection multiplexer from `DevToolsPluginClientImplApp` to
base `DevToolsPluginClient`
- the multiplexer relies on static variables. however, the unit tests
are running in single process. this pr introduces a
`WebSocketBackingStore` for test to specify their backing store. for
normal use case, the default backing store is a static variable.
  • Loading branch information
Kudo committed Mar 18, 2024
1 parent fe44524 commit a8b2184
Show file tree
Hide file tree
Showing 27 changed files with 331 additions and 403 deletions.
1 change: 1 addition & 0 deletions packages/expo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
### 🐛 Bug fixes

- Fixed breaking changes from React-Native 0.74. ([#26357](https://github.com/expo/expo/pull/26357) by [@kudo](https://github.com/kudo))
- Fixed multiple WebSocket connections created on Web when an app containing multiple dev tools plugins. ([#27702](https://github.com/expo/expo/pull/27702) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
20 changes: 16 additions & 4 deletions packages/expo/build/devtools/DevToolsPluginClient.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/expo/build/devtools/DevToolsPluginClient.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions packages/expo/build/devtools/DevToolsPluginClient.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/expo/build/devtools/DevToolsPluginClient.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a8b2184

Please sign in to comment.