ncuillery / rn-diff

Easier React Native upgrades by clearly expose changes from a version to another. :rocket:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support version 0.44.0

jonasb opened this issue · comments

Please :-)

react-native init PROJECT_NAME --version react-native@0.43.4
cd PROJECT_NAME
git init
git add .
git commit -m 'init'
react-native-git-upgrade
git diff

This works too.

Here is the diff in case you don't want to do it manually. Don't forget to run yarn after this as the diff doesn't include yarn.lock

diff --git a/.babelrc b/.babelrc
index 8df53fe..a9ce136 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,3 +1,3 @@
 {
-"presets": ["react-native"]
-}
\ No newline at end of file
+  "presets": ["react-native"]
+}
diff --git a/.flowconfig b/.flowconfig
index dcd5fd6..a76425e 100644
--- a/.flowconfig
+++ b/.flowconfig
@@ -36,12 +36,12 @@ suppress_type=$FlowIssue
 suppress_type=$FlowFixMe
 suppress_type=$FixMe
 
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
 suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
 suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
 
 unsafe.enable_getters_and_setters=true
 
 [version]
-^0.40.0
+^0.42.0
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 1f300f1..9e92107 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -58,7 +58,7 @@ import com.android.build.OutputFile
  *   inputExcludes: ["android/**", "ios/**"],
  *
  *   // override which node gets called and with what additional arguments
- *   nodeExecutableAndArgs: ["node"]
+ *   nodeExecutableAndArgs: ["node"],
  *
  *   // supply additional arguments to the packager
  *   extraPackagerArgs: []
diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
index 48361a9..6e8516c 100644
--- a/android/app/proguard-rules.pro
+++ b/android/app/proguard-rules.pro
@@ -50,6 +50,10 @@
 
 -dontwarn com.facebook.react.**
 
+# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
+# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
+-dontwarn android.text.StaticLayout
+
 # okhttp
 
 -keepattributes Signature
diff --git a/ios/upgrade_test_appTests/upgrade_test_appTests.m b/ios/upgrade_test_appTests/upgrade_test_appTests.m
index dbd9796..ea138b1 100644
--- a/ios/upgrade_test_appTests/upgrade_test_appTests.m
+++ b/ios/upgrade_test_appTests/upgrade_test_appTests.m
@@ -37,7 +37,7 @@
 
 - (void)testRendersWelcomeScreen
 {
-  UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
+  UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
   NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
   BOOL foundElement = NO;
 
diff --git a/package.json b/package.json
index 261708e..2e69dcb 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
 	},
 	"dependencies": {
 		"react": "16.0.0-alpha.6",
-		"react-native": "0.43.4"
+		"react-native": "0.44.0"
 	},
 	"devDependencies": {
 		"babel-jest": "19.0.0",
@@ -19,4 +19,4 @@
 	"jest": {
 		"preset": "react-native"
 	}
-}
\ No newline at end of file
+}

I've pushed the latest version -- thanks for your patience. I haven't done this in a while so hopefully I ran everything correctly.

Thanks @ryankask!

Just came back from my 2-week holidays. Sorry to have kept you in the cold guys 🙂