-
Notifications
You must be signed in to change notification settings - Fork 906
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
refactor: use the cli-server-api package #1140
refactor: use the cli-server-api package #1140
Conversation
@@ -9,13 +9,13 @@ | |||
import Metro from 'metro'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also rename the directory from server
to start
now that most of the implementation moved to other package? I think it's a good moment to make it happen and be consistent with other commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, renamed the directory to commands/start
.
8bbe167
to
d768303
Compare
Noticed an issue with "Reload app" button in Chrome (works fine with Flipper), opening another debugger tab unnecessarily. Same when pressing Reload from an app. Tested on Android |
@@ -79,6 +79,7 @@ export function createDevServerMiddleware(options: MiddlewareOptions) { | |||
'/message', | |||
); | |||
broadcast = messageSocket.broadcast; | |||
isDebuggerConnected = debuggerProxy.isDebuggerConnected; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @fson the debugger connected state was not updated, likely an oversight when moving code around
Summary:
The development server middleware and WebSocket servers were extracted out to the
@react-native-community/cli-server-api
package in #1118. This PR makes the CLI use that package and removes any remaining duplicates of these modules that have been moved.Test Plan:
Followed the Testing your changes instructions in
CONTRIBUTING.md
and started the server withnpx react-native start --watchFolders /Users/ville/Projects/react-native-cli/ --resetCache
. Verified the following features work:r