Move codegen and spm command wrappers into community-cli-plugin (#57652)#57652
Open
huntie wants to merge 3 commits into
Open
Move codegen and spm command wrappers into community-cli-plugin (#57652)#57652huntie wants to merge 3 commits into
huntie wants to merge 3 commits into
Conversation
huntie
added a commit
to huntie/react-native
that referenced
this pull request
Jul 23, 2026
…t#57652) Summary: Migrate the `codegen` and `spm` command implementations out of `react-native.config.js` and into the `react-native/community-cli-plugin` package, alongside the existing `bundleCommand` and `startCommand`. This continues moving command definitions into the plugin so `react-native.config.js` becomes a thin routing layer, as the file's own comment already calls for. **Changes** - Add `src/commands/spm/index.js` and `src/commands/codegen/index.js`, each defining and default-exporting its command (unchanged `name`, `description`, and `options`) plus an exported args type — mirroring the `bundle`/`start` command structure. - Export `spmCommand` and `codegenCommand` from `src/index.flow.js`. - Drop the inline `spmCommand` and `codegenCommand` definitions from `react-native.config.js`. Changelog: [Internal] Differential Revision: D113412987
huntie
force-pushed
the
export-D113412987
branch
from
July 23, 2026 16:42
d86b0ee to
7284dfd
Compare
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
…t#57652) Summary: Migrate the `codegen` and `spm` command implementations out of `react-native.config.js` and into the `react-native/community-cli-plugin` package, alongside the existing `bundleCommand` and `startCommand`. This continues moving command definitions into the plugin so `react-native.config.js` becomes a thin routing layer, as the file's own comment already calls for. **Changes** - Add `src/commands/spm/index.js` and `src/commands/codegen/index.js`, each defining and default-exporting its command (unchanged `name`, `description`, and `options`) plus an exported args type — mirroring the `bundle`/`start` command structure. - Export `spmCommand` and `codegenCommand` from `src/index.flow.js`. - Drop the inline `spmCommand` and `codegenCommand` definitions from `react-native.config.js`. - Add docs to README. Changelog: [Internal] Differential Revision: D113412987
huntie
force-pushed
the
export-D113412987
branch
from
July 23, 2026 16:54
7284dfd to
3a90a9a
Compare
|
@huntie has exported this pull request. If you are a Meta employee, you can view the originating Diff in D113412987. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Migrate the
codegenandspmcommand implementations out ofreact-native.config.jsand into thereact-native/community-cli-pluginpackage, alongside the existingbundleCommandandstartCommand.This continues moving command definitions into the plugin so
react-native.config.jsbecomes a thin routing layer, as the file's own comment already calls for.Changes
src/commands/spm/index.jsandsrc/commands/codegen/index.js, each defining and default-exporting its command (unchangedname,description, andoptions) plus an exported args type — mirroring thebundle/startcommand structure.spmCommandandcodegenCommandfromsrc/index.flow.js.spmCommandandcodegenCommanddefinitions fromreact-native.config.js.Changelog: [Internal]
Differential Revision: D113412987