Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52784 Resolves https://github.com/react-native-community/discussions-and-proposals/discussions/893#discussioncomment-13860767. **Changes** - Formalises the design of `ReactNativeVersion` as a single object and adds a `getVersionString` accessor. - Expose `ReactNativeVersion` as a root export on `index.js`. - Update deep imports use in `NewAppScreen`. **Notes** - Subtly, we also have `Platform.constants.reactNativeVersion` in our public API already. **However**, this is the per-platform ***native-reported*** RN version, distinct from the JS version (this diff). See [`ReactNativeVersionCheck.js`](https://github.com/facebook/react-native/blob/54d733311d87e9ab4e18f947edf3f5c85f9a6275/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js#L24). Changelog: [General][Added] - Expose `ReactNativeVersion` API as JavaScript root export Reviewed By: cortinico Differential Revision: D78806347 fbshipit-source-id: 974251fdaa9ab18fac8a584644fea894e4f6e083
scripts/releases
Scripts related to creating a React Native release. These are the lower level entry points used by scripts/releases-ci.
Commands
For information on command arguments, run node <command> --help.
create-release-commit
Creates a release commit to trigger a new release.
set-version
Bump the version of all packages.
- Updates
package.jsonmetadata for all workspaces and the project root. - Updates relevant native files in the
react-nativepackage.
If --skipReactNativeVersion is passed, the react-native package version will be left unmodified as "1000.0.0" (special static version on main), and native files will not be touched.
set-rn-artifacts-version
Note
Deprecated: Prefer
set-version. This entry point is a subset ofset-version, and is used only by test workflows. We will replace these call sites in future.
Updates relevant native files in the react-native package to materialize the given release version. This is run by set-version unless --skipReactNativeVersion is passed.