mirror of
https://github.com/react/react-native.git
synced 2026-09-28 13:23:09 +08:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56922 Move `react-native/core-cli-utils` from `packages/` to `private/`, stop publishing it to npm, and reframe it as a reference implementation of React Native CLI tooling. The package has no known external consumers and is only used internally by `private/helloworld/` and `packages/rn-tester/`. Publishing it to npm creates a maintenance surface for a package that serves no external users. See https://github.com/react-native-community/discussions-and-proposals/pull/1002. #### Changes - Move `packages/core-cli-utils/` to `private/core-cli-utils/`. - Convert all source files to CJS (require/module.exports) with Flow comment syntax (/*:: */), eliminating the runtime Babel dependency. - Remove from the JS build pipeline (`scripts/build/config.js`). - Remove the defunct `patchCoreCLIUtilsPackageJSON()` runtime patching from both `helloworld/cli.js` and `rn-tester/cli.js`, and delete both `monorepo.js` files that contained it. - Add as `devDependency` to `rn-tester` and `helloworld`. - Skip `"*"` version deps in `_prepareHelloWorld()` so they aren't rewritten to the Verdaccio-published version. - Remove redundant desktop import ignore entry (`private/**` already covers it). - Rewrite README as reference implementation documentation. Changelog: [General][Breaking] - The `react-native/core-cli-utils` package is no longer published. It remains available in the React Native repo as a reference implementation. Reviewed By: cortinico Differential Revision: D105959855 fbshipit-source-id: 42e439a45273bdeca76029eff306cdf2451308e2
1.1 KiB
1.1 KiB
@react-native/core-cli-utils
A reference implementation of React Native CLI tooling. This package provides composable, ordered Task objects for common CLI operations including Android Gradle builds, iOS Xcode/CocoaPods workflows, Metro bundling with Hermes support, and cache cleaning.
This is not published to npm. Framework authors can use this code as a starting point for their own CLI tooling, but should not depend on it as a versioned API.
Modules
android— Gradle-based Android build tasks (assemble, build, install)apple— Xcode/CocoaPods-based iOS tasks (bootstrap, build, install)app— Metro bundler tasks (watch mode, bundle mode, Hermes bytecode compilation)clean— Cache-cleaning tasks (Android/Gradle, Metro, npm, Watchman, Yarn, CocoaPods)version— Semver version requirements for platform toolchains (Android NDK/SDK, Xcode, Node, etc.)
Consumers
private/helloworld/— the primary consumer, using Android, iOS, and Metro modulespackages/rn-tester/— uses iOS bootstrap for CocoaPods setup