Skip to content

Remove commander dependency from main package (#57645) - #57645

Closed
huntie wants to merge 2 commits into
react:mainfrom
huntie:export-D113389458
Closed

Remove commander dependency from main package (#57645)#57645
huntie wants to merge 2 commits into
react:mainfrom
huntie:export-D113389458

Conversation

@huntie

@huntiehuntie commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary:

Simplify the scripts/bundle.js wrapper and remove the commander dependency from packages/react-native.

This script is a lightweight wrapper around npx react-native bundle, with extra local config arg handling (for now, unchanged / remains located here).

Refactor only with script behaviour unchanged.

Other changes

  • Combined arg parsing is hoisted into community-cli-plugin (which does have commander) via unstable_createBundleCommandParser.
  • Drop program value export (also unused).

Notes

After this change, only yargs remains as a direct dependency react-native package (packages/react-native/scripts/) (a future cleanup).

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D113389458

@meta-clameta-claBot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 23, 2026
@meta-codesync

Copy link
Copy Markdown

@huntie has exported this pull request. If you are a Meta employee, you can view the originating Diff in D113389458.

@cortinicocortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

huntie added 2 commits July 23, 2026 05:31
Summary:
Remove the unused `--version` option from the standalone bundle script wrapper (unreferenced, separately available via RN CLI).
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D113389459
Summary:
Simplify the `scripts/bundle.js` wrapper and remove the `commander` dependency from `packages/react-native`.
This script is a lightweight wrapper around `npx react-native bundle`, with extra local config arg handling (for now, unchanged / remains located here).
**Refactor only** with script behaviour unchanged.
**Other changes**
- Combined arg parsing is hoisted into `community-cli-plugin` (which does have `commander`) via `unstable_createBundleCommandParser`.
- Drop `program` value export (also unused).
**Notes**
After this change, only `yargs` remains as a direct dependency `react-native` package (`packages/react-native/scripts/`) (a future cleanup).
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D113389458
@meta-codesyncmeta-codesyncBot changed the title Remove commander dependency from main packageRemove commander dependency from main package (#57645)Jul 23, 2026
@huntie
huntieforce-pushed the export-D113389458 branch from f632f1c to 4444e82CompareJuly 23, 2026 12:32
huntie added a commit to huntie/react-native that referenced this pull request Jul 23, 2026
Summary:
Simplify the `scripts/bundle.js` wrapper and remove the `commander` dependency from `packages/react-native`.
This script is a lightweight wrapper around `npx react-native bundle`, with extra local config arg handling (for now, unchanged / remains located here).
**Refactor only** with script behaviour unchanged.
**Other changes**
- Combined arg parsing is hoisted into `community-cli-plugin` (which does have `commander`) via `unstable_createBundleCommandParser`.
- Drop `program` value export (also unused).
**Notes**
After this change, only `yargs` remains as a direct dependency `react-native` package (`packages/react-native/scripts/`) (a future cleanup).
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D113389458
huntie added a commit to huntie/react-native that referenced this pull request Jul 23, 2026
Summary:
Simplify the `scripts/bundle.js` wrapper and remove the `commander` dependency from `packages/react-native`.
This script is a lightweight wrapper around `npx react-native bundle`, with extra local config arg handling (for now, unchanged / remains located here).
**Refactor only** with script behaviour unchanged.
**Other changes**
- Combined arg parsing is hoisted into `community-cli-plugin` (which does have `commander`) via `unstable_createBundleCommandParser`.
- Drop `program` value export (also unused).
**Notes**
After this change, only `yargs` remains as a direct dependency `react-native` package (`packages/react-native/scripts/`) (a future cleanup).
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D113389458
@meta-codesyncmeta-codesyncBot added the Merged This PR has been merged. label Jul 24, 2026
@meta-codesync

Copy link
Copy Markdown

This pull request has been merged in 0231514.

@huntie
huntie deleted the export-D113389458 branch July 24, 2026 12:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.meta-exportedp: FacebookPartner: FacebookPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@huntie@cortinico