From 232e4474e6c16bfa1a5769867ca7b1f8f4482bc8 Mon Sep 17 00:00:00 2001 From: Lorenzo Sciandra Date: Tue, 4 Oct 2022 08:36:21 -0700 Subject: [PATCH] chore: re-align version to be 1000.0.0 on main everywhere (#34817) Summary: While working on https://github.com/facebook/react-native/pull/34513 I noticed that on main branch the versioning is not really consistent everywhere. So this PR is an attempt at realigning so that on the main branch, RN is 1000.0.0 everywhere - in a way, it's cleaning up the room for the monorepo work to go flawlessly). It's just a pass of `node scripts/set-rn-version.js --to-version 1000.0.0`. There's the small chance that some versions where kept to 0.0.0 on purpose (build tools are weird), so we might just have to close this off. No big deal :) ## Changelog [Internal] [Changed] - re-align version to be 1000.0.0 on main everywhere Pull Request resolved: https://github.com/facebook/react-native/pull/34817 Test Plan: CI is green and when imported, nothing breaks. Reviewed By: cortinico Differential Revision: D39926953 Pulled By: cortinico fbshipit-source-id: ff66530382f891e17c00b35edf97c03591b6a9a8 --- Libraries/Core/ReactNativeVersion.js | 6 +++--- React/Base/RCTVersion.m | 10 +++++----- ReactAndroid/gradle.properties | 2 +- .../react/modules/systeminfo/ReactNativeVersion.java | 2 +- ReactCommon/cxxreact/ReactNativeVersion.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Libraries/Core/ReactNativeVersion.js b/Libraries/Core/ReactNativeVersion.js index eefc716eaa9..1d82274f85c 100644 --- a/Libraries/Core/ReactNativeVersion.js +++ b/Libraries/Core/ReactNativeVersion.js @@ -1,16 +1,16 @@ /** + * @generated by scripts/set-rn-version.js + * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @format - * @generated by scripts/set-rn-version.js * @flow strict */ exports.version = { - major: 0, + major: 1000, minor: 0, patch: 0, prerelease: null, diff --git a/React/Base/RCTVersion.m b/React/Base/RCTVersion.m index 965c57cd19a..1794ca2e521 100644 --- a/React/Base/RCTVersion.m +++ b/React/Base/RCTVersion.m @@ -21,11 +21,11 @@ NSDictionary* RCTGetReactNativeVersion(void) static dispatch_once_t onceToken; dispatch_once(&onceToken, ^(void){ __rnVersion = @{ - RCTVersionMajor: @(0), - RCTVersionMinor: @(0), - RCTVersionPatch: @(0), - RCTVersionPrerelease: [NSNull null], - }; + RCTVersionMajor: @(1000), + RCTVersionMinor: @(0), + RCTVersionPatch: @(0), + RCTVersionPrerelease: [NSNull null], + }; }); return __rnVersion; } diff --git a/ReactAndroid/gradle.properties b/ReactAndroid/gradle.properties index 11bbc9b3531..a17efe657c7 100644 --- a/ReactAndroid/gradle.properties +++ b/ReactAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=1000.0.0-main +VERSION_NAME=1000.0.0 GROUP=com.facebook.react POM_NAME=ReactNative diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java b/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java index d42743752bb..ea97bff8de8 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java @@ -15,7 +15,7 @@ import java.util.Map; public class ReactNativeVersion { public static final Map VERSION = MapBuilder.of( - "major", 0, + "major", 1000, "minor", 0, "patch", 0, "prerelease", null); diff --git a/ReactCommon/cxxreact/ReactNativeVersion.h b/ReactCommon/cxxreact/ReactNativeVersion.h index 63153026725..5d89f4efaae 100644 --- a/ReactCommon/cxxreact/ReactNativeVersion.h +++ b/ReactCommon/cxxreact/ReactNativeVersion.h @@ -15,7 +15,7 @@ namespace facebook::react { constexpr struct { - int32_t Major = 0; + int32_t Major = 1000; int32_t Minor = 0; int32_t Patch = 0; std::string_view Prerelease = "";