Files
Alex Hunt b26baaeba0 Move Community CLI discovery config into plugin package (1/2) (#58670)
Summary:
Replaces https://github.com/react/react-native/issues/57352.

Self-register commands from the `community-cli-plugin` package via `react-native.config.js` — meaning we can remove the redirect within `packages/react-native/react-native.config.js`.

Progress towards removing `community-cli-plugin` as a direct dep of `react-native`, and paired with https://github.com/react-native-community/template/pull/235.

RNTester and HelloWorld list `react-native/community-cli-plugin` in `devDependencies`, as the template now does (react-native-community/template#235).

Changelog:
[General][Breaking] - `react-native/community-cli-plugin` will no longer be auto-detected from `react-native`. It must now be specified in `devDependencies`.

Pull Request resolved: https://github.com/react/react-native/pull/58670

Test Plan:
Compared `react-native config` output with `react-native-community/cli` 20.2.0.

**RNTester**

- ✅ Commands, platforms, and project config are unchanged from `main`
- ✅ Removing the new `react-native/community-cli-plugin` devDependency drops `bundle`, `start`, `spm`, and `codegen`, so they are registered by plugin discovery

**Template-shaped app** (plugin in `devDependencies`, no project `react-native.config.js`)

- ✅ `bundle`, `start`, `spm`, and `codegen` are registered

Reviewed By: christophpurrer, cortinico

Differential Revision: D121634885

Pulled By: Abbondanzo

fbshipit-source-id: e97c9f820d3c597233ef4a7ddaaf1b752f1f7688
2026-09-25 09:05:12 -07:00

62 lines
1.5 KiB
JSON

{
"name": "@react-native/community-cli-plugin",
"version": "0.87.0-main",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
"tools"
],
"homepage": "https://github.com/react/react-native/tree/HEAD/packages/community-cli-plugin#readme",
"bugs": "https://github.com/react/react-native/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/react/react-native.git",
"directory": "packages/community-cli-plugin"
},
"license": "MIT",
"exports": {
".": "./src/index.js",
"./package.json": "./package.json"
},
"publishConfig": {
"exports": {
".": "./dist/index.js",
"./package.json": "./package.json"
}
},
"files": [
"dist",
"react-native.config.js"
],
"scripts": {
"prepack": "node ../../scripts/build/prepack.js"
},
"dependencies": {
"@react-native/asset-utils": "0.87.0-main",
"@react-native/dev-middleware": "0.87.0-main",
"commander": "^12.0.0",
"debug": "^4.4.0",
"invariant": "^2.2.4",
"metro": "^0.87.0",
"semver": "^7.1.3"
},
"devDependencies": {
"metro-resolver": "^0.87.0"
},
"peerDependencies": {
"@react-native-community/cli": "*",
"@react-native/metro-config": "0.87.0-main"
},
"peerDependenciesMeta": {
"@react-native-community/cli": {
"optional": true
},
"@react-native/metro-config": {
"optional": true
}
},
"engines": {
"node": "^22.13.0 || ^24.3.0 || >= 26.0.0"
}
}