react-native-community / react-native-community/cli

Rethink automatic discovery of commands

Open
#568 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

discussion no-stale-bot
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.