react-native-community / react-native-community/cli
Rethink automatic discovery of commands
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 949
- PR merge metrics
- No merged PRs in 30d
Description
By installing a 3rd party dependency, which exposed a custom command with a side-effectful code loaded eagerly, CLI bailed on cleanly exiting after executing a command.
See https://github.com/react-native-community/cli/issues/567 for details.
This scenario revealed a flaw in our plugin design, where any package may, consciously or not, abuse the user workflow. We should rethink the automatic discovery of user configs (and in turn commands). Maybe it's not that big of a deal, but maybe we can do something to make it harder to exploit. Or at least hard exit after the command was finished, to not let it go rogue.
cc @grabbou @satya164 @cpojer
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the related issue at https://github.com/react-native-community/cli/issues/567 to understand the eager-loading failure. Then investigate the automatic discovery of user configs and commands; done means defining a safer discovery or command-exit behavior that prevents third-party side effects from disrupting the CLI workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100