From 84639ca63c06ae68c385a262f789bf26f21ccafb Mon Sep 17 00:00:00 2001 From: smartapant Date: Fri, 8 Apr 2016 12:27:09 +0300 Subject: [PATCH] React Native upgrade - 0.16.0 --- .babelrc | 5 +--- .flowconfig | 30 +++++++++++++------ ios/ReactNativeRedditReader/AppDelegate.m | 2 +- .../ReactNativeRedditReaderTests.m | 2 +- package.json | 4 +-- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/.babelrc b/.babelrc index 6982b7b..0e0dcd2 100644 --- a/.babelrc +++ b/.babelrc @@ -1,6 +1,3 @@ { - "whitelist": [ - "es7.classProperties", - "es7.decorators" - ] + } \ No newline at end of file diff --git a/.flowconfig b/.flowconfig index 05cad20..8eadd33 100644 --- a/.flowconfig +++ b/.flowconfig @@ -7,12 +7,24 @@ # Some modules have their own node_modules with overlap .*/node_modules/node-haste/.* -# Ignore react-tools where there are overlaps, but don't ignore anything that -# react-native relies on -.*/node_modules/react-tools/src/React.js -.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js -.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js -.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js +# Ugh +.*/node_modules/babel.* +.*/node_modules/babylon.* +.*/node_modules/invariant.* + +# Ignore react and fbjs where there are overlaps, but don't ignore +# anything that react-native relies on +.*/node_modules/fbjs-haste/.*/__tests__/.* +.*/node_modules/fbjs-haste/__forks__/Map.js +.*/node_modules/fbjs-haste/__forks__/Promise.js +.*/node_modules/fbjs-haste/__forks__/fetch.js +.*/node_modules/fbjs-haste/core/ExecutionEnvironment.js +.*/node_modules/fbjs-haste/core/isEmpty.js +.*/node_modules/fbjs-haste/crypto/crc32.js +.*/node_modules/fbjs-haste/stubs/ErrorUtils.js +.*/node_modules/react-haste/React.js +.*/node_modules/react-haste/renderers/dom/ReactDOM.js +.*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js # Ignore commoner tests .*/node_modules/commoner/test/.* @@ -43,9 +55,9 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy [version] -0.17.0 +0.18.1 diff --git a/ios/ReactNativeRedditReader/AppDelegate.m b/ios/ReactNativeRedditReader/AppDelegate.m index d96a4e0..c52afc0 100644 --- a/ios/ReactNativeRedditReader/AppDelegate.m +++ b/ios/ReactNativeRedditReader/AppDelegate.m @@ -47,7 +47,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( launchOptions:launchOptions]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [[UIViewController alloc] init]; + UIViewController *rootViewController = [UIViewController new]; rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible]; diff --git a/ios/ReactNativeRedditReaderTests/ReactNativeRedditReaderTests.m b/ios/ReactNativeRedditReaderTests/ReactNativeRedditReaderTests.m index 0724dc7..e99a139 100644 --- a/ios/ReactNativeRedditReaderTests/ReactNativeRedditReaderTests.m +++ b/ios/ReactNativeRedditReaderTests/ReactNativeRedditReaderTests.m @@ -42,7 +42,7 @@ - (void)testRendersWelcomeScreen BOOL foundElement = NO; __block NSString *redboxError = nil; - RCTSetLogFunction(^(RCTLogLevel level, NSString *fileName, NSNumber *lineNumber, NSString *message) { + RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { if (level >= RCTLogLevelError) { redboxError = message; } diff --git a/package.json b/package.json index d493cc2..bfd627c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ReactNativeRedditReader", - "version": "0.0.2", + "version": "0.0.3", "private": true, "scripts": { "start": "node_modules/react-native/packager/packager.sh" @@ -8,7 +8,7 @@ "dependencies": { "he": "^0.5.0", "moment": "^2.10.6", - "react-native": "^0.14.2", + "react-native": "^0.16.0", "react-native-infinite-scroll-view": "^0.2.2" } }