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)

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

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

(cherry picked from commit a8b2184)
  • Loading branch information
Kudo committed Mar 19, 2024
1 parent f3d0d6d commit cc7ef60
Show file tree
Hide file tree
Showing 27 changed files with 332 additions and 403 deletions.
2 changes: 2 additions & 0 deletions packages/expo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### 🐛 Bug fixes

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

### 📚 3rd party library updates

- Update react-native to 0.73.6. ([#27641](https://github.com/expo/expo/pull/27641) by [@gabrieldonadel](https://github.com/gabrieldonadel))
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 cc7ef60

Please sign in to comment.