Skip to content

Commit fa59a56

Browse files
committed
Update React Native to version 0.59.8
1 parent a553514 commit fa59a56

File tree

12 files changed

+851
-699
lines changed

12 files changed

+851
-699
lines changed

.flowconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
[libs]
2525
node_modules/react-native/Libraries/react-native/react-native-interface.js
2626
node_modules/react-native/flow/
27-
node_modules/react-native/flow-github/
2827

2928
[options]
3029
emoji=true
@@ -67,4 +66,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
6766
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
6867

6968
[version]
70-
^0.86.0
69+
^0.92.0

android/app/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ def enableProguardInReleaseBuilds = false
9595

9696
android {
9797
compileSdkVersion rootProject.ext.compileSdkVersion
98-
buildToolsVersion rootProject.ext.buildToolsVersion
98+
99+
compileOptions {
100+
sourceCompatibility JavaVersion.VERSION_1_8
101+
targetCompatibility JavaVersion.VERSION_1_8
102+
}
99103

100104
defaultConfig {
101105
applicationId "com.cssmodulesexample"
@@ -109,7 +113,7 @@ android {
109113
reset()
110114
enable enableSeparateBuildPerCPUArchitecture
111115
universalApk false // If true, also generate a universal APK
112-
include "armeabi-v7a", "x86", "arm64-v8a"
116+
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
113117
}
114118
}
115119
buildTypes {
@@ -123,7 +127,7 @@ android {
123127
variant.outputs.each { output ->
124128
// For each separate APK per architecture, set a unique version code as described here:
125129
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
126-
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
130+
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
127131
def abi = output.getFilter(OutputFile.ABI)
128132
if (abi != null) { // null for the universal-debug, universal-release variants
129133
output.versionCodeOverride =
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6+
7+
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
8+
</manifest>

android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
package="com.cssmodulesexample">
33

44
<uses-permission android:name="android.permission.INTERNET" />
5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
65

76
<application
87
android:name=".MainApplication"

android/build.gradle

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "28.0.2"
5+
buildToolsVersion = "28.0.3"
66
minSdkVersion = 16
77
compileSdkVersion = 28
8-
targetSdkVersion = 27
8+
targetSdkVersion = 28
99
supportLibVersion = "28.0.0"
1010
}
1111
repositories {
1212
google()
1313
jcenter()
1414
}
1515
dependencies {
16-
classpath 'com.android.tools.build:gradle:3.2.1'
16+
classpath 'com.android.tools.build:gradle:3.3.1'
1717

1818
// NOTE: Do not place your application dependencies here; they belong
1919
// in the individual module build.gradle files
@@ -31,9 +31,3 @@ allprojects {
3131
}
3232
}
3333
}
34-
35-
36-
task wrapper(type: Wrapper) {
37-
gradleVersion = '4.7'
38-
distributionUrl = distributionUrl.replace("bin", "all")
39-
}

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

ios/CSSModulesExample/AppDelegate.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#import <React/RCTBridgeDelegate.h>
89
#import <UIKit/UIKit.h>
910

10-
@interface AppDelegate : UIResponder <UIApplicationDelegate>
11+
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
1112

1213
@property (nonatomic, strong) UIWindow *window;
1314

14-
@end
15+
@end

ios/CSSModulesExample/AppDelegate.m

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,20 @@
77

88
#import "AppDelegate.h"
99

10+
#import <React/RCTBridge.h>
1011
#import <React/RCTBundleURLProvider.h>
1112
#import <React/RCTRootView.h>
1213

1314
@implementation AppDelegate
1415

1516
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
1617
{
17-
NSURL *jsCodeLocation;
18+
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
19+
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
20+
moduleName:@"CSSModulesExample"
21+
initialProperties:nil];
1822

19-
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
20-
21-
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
22-
moduleName:@"CSSModulesExample"
23-
initialProperties:nil
24-
launchOptions:launchOptions];
25-
rootView.backgroundColor = [UIColor blackColor];
23+
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
2624

2725
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
2826
UIViewController *rootViewController = [UIViewController new];
@@ -32,4 +30,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3230
return YES;
3331
}
3432

33+
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
34+
{
35+
#if DEBUG
36+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
37+
#else
38+
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
39+
#endif
40+
}
41+
3542
@end

metro.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ module.exports = (async () => {
66
} = await getDefaultConfig();
77
return {
88
transformer: {
9+
getTransformOptions: async () => ({
10+
transform: {
11+
experimentalImportSupport: false,
12+
inlineRequires: false
13+
}
14+
}),
915
babelTransformerPath: require.resolve("./rn-transformer.js")
1016
},
1117
resolver: {

package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,19 @@
1313
},
1414
"dependencies": {
1515
"es6-shim": "^0.35.5",
16-
"react": "16.6.3",
17-
"react-art": "^16.6.3",
18-
"react-dom": "^16.6.3",
16+
"react": "16.8.3",
17+
"react-art": "^16.8.3",
18+
"react-dom": "^16.8.3",
1919
"react-fontawesome": "^1.6.1",
20-
"react-native": "0.58.6",
20+
"react-native": "0.59.8",
2121
"react-native-fontawesome": "5.7.0",
2222
"react-native-web": "^0.10.0",
2323
"tslib": "^1.9.3"
2424
},
2525
"devDependencies": {
26-
"@babel/core": "^7.4.3",
27-
"@babel/preset-env": "^7.4.3",
26+
"@babel/core": "^7.4.4",
27+
"@babel/runtime": "^7.4.4",
28+
"@babel/preset-env": "^7.4.4",
2829
"@teamthread/strict-css-modules-loader": "^0.0.3",
2930
"@types/jest": "^24.0.11",
3031
"@types/prop-types": "^15.7.0",
@@ -33,7 +34,7 @@
3334
"@types/react-test-renderer": "^16.0.3",
3435
"@typescript-eslint/parser": "^1.6.0",
3536
"autoprefixer": "^9.5.1",
36-
"babel-jest": "24.7.1",
37+
"babel-jest": "^24.8.0",
3738
"babel-loader": "^8.0.5",
3839
"babel-plugin-react-native-classname-to-style": "^1.2.2",
3940
"babel-plugin-react-native-platform-specific-extensions": "^1.1.1",
@@ -43,16 +44,16 @@
4344
"eslint-plugin-css-modules": "^2.11.0",
4445
"file-loader": "^3.0.1",
4546
"identity-obj-proxy": "^3.0.0",
46-
"jest-cli": "^24.7.1",
47-
"metro-react-native-babel-preset": "^0.53.1",
47+
"jest-cli": "^24.8.0",
48+
"metro-react-native-babel-preset": "^0.54.0",
4849
"node-sass": "^4.11.0",
4950
"postcss": "^7.0.14",
5051
"postcss-css-variables": "^0.12.0",
5152
"postcss-loader": "^3.0.0",
5253
"react-hot-loader": "3.1.3",
5354
"react-native-sass-transformer": "^1.4.0",
5455
"react-native-typed-postcss-transformer": "^0.10.2",
55-
"react-test-renderer": "16.6.3",
56+
"react-test-renderer": "16.8.3",
5657
"sass-loader": "^7.1.0",
5758
"style-loader": "^0.23.1",
5859
"stylelint": "9.10.1",

rn-transformer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var upstreamTransformer = require("metro/src/reactNativeTransformer");
1+
var upstreamTransformer = require("metro-react-native-babel-transformer");
22
var sassTransformer = require("react-native-sass-transformer");
33
var postCSSTransformer = require("react-native-typed-postcss-transformer");
44

0 commit comments

Comments
 (0)