fix: remove unused --verbose option from start command #1394
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
While investigating #1391 I discovered that the start command had a
--verbose
option that didn't do anything. You do get extra logging with--verbose
but this comes from the parent react-native command, where it is already documented.I had a look through the metro functions being called to see if
verbose
was meant to be passed to one of them and had been missed but couldn't find anywhere it would be relevant. The only one I could see that it would potentially apply to is theloadMetroConfig
call. WhileloadMetroConfig
doesn't document a verbose parameter of its own, it callsloadConfig
in themetro-config
package which does take a verbose parameter. However, all that does is kill the reporter ifverbose === false
(see https://github.com/facebook/metro/blob/master/packages/metro-config/src/loadConfig.js#L256), which would mean you get no output from the start command whatsoever. Currently, the loadMetroConfig code is reliant on the fact that verbose isundefined
when callingloadConfig
so its custom reporter isn't overwritten.Test Plan:
react-native start --verbose
before making this change and observed extra loggingreact-native start --verbose
again and still observed extra logging