Skip to content

Commit e0ffe2c

Browse files
machourchinesedfan
authored andcommitted
chore: Upgrade react, react-dom, react-native to latests versions (#698)
* chore: Upgrade react, react-dom, react-native to latests versions Upgrading react-native-linear-gradient is mandatory as it fixes a compatibility problem: react-native-linear-gradient/react-native-linear-gradient#235 * chore: upgrade react-dom as well * chore: fix whitespaces * refactor: delete empty line
1 parent 00f5a09 commit e0ffe2c

File tree

11 files changed

+1612
-1149
lines changed

11 files changed

+1612
-1149
lines changed

.flowconfig

+18-7
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,19 @@
1212
; For RN Apps installed via npm, "Libraries" folder is inside
1313
; "node_modules/react-native" but in the source repo it is in the root
1414
.*/Libraries/react-native/React.js
15-
.*/Libraries/react-native/ReactNative.js
15+
16+
; Ignore polyfills
17+
.*/Libraries/polyfills/.*
18+
19+
; Ignore metro
20+
.*/node_modules/metro/.*
1621

1722
[include]
1823

1924
[libs]
2025
node_modules/react-native/Libraries/react-native/react-native-interface.js
21-
node_modules/react-native/flow
22-
flow/
26+
node_modules/react-native/flow/
27+
node_modules/react-native/flow-github/
2328

2429
[options]
2530
module.system.node.resolve_dirname=node_modules
@@ -32,15 +37,21 @@ munge_underscores=true
3237

3338
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
3439

40+
module.file_ext=.js
41+
module.file_ext=.jsx
42+
module.file_ext=.json
43+
module.file_ext=.native.js
44+
3545
suppress_type=$FlowIssue
3646
suppress_type=$FlowFixMe
37-
suppress_type=$FixMe
47+
suppress_type=$FlowFixMeProps
48+
suppress_type=$FlowFixMeState
3849

39-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
50+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
51+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
4152
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4253

4354
unsafe.enable_getters_and_setters=true
4455

4556
[version]
46-
^0.47.0
57+
^0.61.0

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ buck-out/
4747
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4848
# screenshots whenever they are needed.
4949
# For more information about the recommended setup visit:
50-
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
50+
# https://docs.fastlane.tools/best-practices/source-control/
5151

5252
fastlane/report.xml
5353
fastlane/Preview.html

android/app/build.gradle

+11-8
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,17 @@ import com.android.build.OutputFile
7272
* ]
7373
*/
7474

75-
project.ext.vectoricons = [
76-
// Name of the font files you want to copy
77-
iconFontNames: [
78-
'FontAwesome.ttf',
79-
'Ionicons.ttf',
80-
'MaterialIcons.ttf',
81-
'Octicons.ttf']
82-
]
75+
project.ext.vectoricons = [
76+
// Name of the font files you want to copy
77+
iconFontNames: [
78+
'FontAwesome.ttf',
79+
'Ionicons.ttf',
80+
'MaterialIcons.ttf',
81+
'Octicons.ttf']
82+
]
83+
project.ext.react = [
84+
entryFile: "index.js"
85+
]
8386

8487
apply from: "../../node_modules/react-native/react.gradle"
8588
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

android/app/src/main/java/com/gitpoint/MainApplication.java

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ protected List<ReactPackage> getPackages() {
4747
new VectorIconsPackage()
4848
);
4949
}
50+
51+
@Override
52+
protected String getJSMainModuleName() {
53+
return "index";
54+
}
5055
};
5156

5257
@Override

index.ios.js

-1
This file was deleted.
File renamed without changes.

ios/GitPoint.xcodeproj/project.pbxproj

+109-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
};
66
objectVersion = 46;
77
objects = {
8+
89
/* Begin PBXBuildFile section */
910
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
1011
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
@@ -51,10 +52,10 @@
5152
B58367881AB44EC4944D4698 /* Nunito-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E37A1EB69E2D4FD7B138343D /* Nunito-Italic.ttf */; };
5253
B66611A59CDF49A19C845B57 /* Nunito-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 78A9FAE6B34B4FAC9F27CBC3 /* Nunito-Regular.ttf */; };
5354
B8D599F61D2A4797A2F71CAA /* libRNVectorIcons.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AFDBB5669CAB4C5C8215B571 /* libRNVectorIcons.a */; };
55+
BFF2C570004F4232B1F5CB1C /* Inconsolata-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E648F057A2064CA08EED0BD1 /* Inconsolata-Regular.ttf */; };
5456
D2C2FCD70676466EA8E466D6 /* Menlo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 18487F5E165143648CF0950E /* Menlo.ttf */; };
5557
DC5C35E71E37AD1800F3F526 /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DC5C35DD1E37AD1800F3F526 /* FontAwesome.ttf */; };
5658
EB0F176BE52B4561B9FF07AB /* libReactNativeConfig.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D7043BDB577E427391ECFBB0 /* libReactNativeConfig.a */; };
57-
BFF2C570004F4232B1F5CB1C /* Inconsolata-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E648F057A2064CA08EED0BD1 /* Inconsolata-Regular.ttf */; };
5859
/* End PBXBuildFile section */
5960

6061
/* Begin PBXContainerItemProxy section */
@@ -233,6 +234,55 @@
233234
remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
234235
remoteInfo = "jschelpers-tvOS";
235236
};
237+
4855487C200E23A10020211B /* PBXContainerItemProxy */ = {
238+
isa = PBXContainerItemProxy;
239+
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
240+
proxyType = 2;
241+
remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
242+
remoteInfo = fishhook;
243+
};
244+
4855487E200E23A10020211B /* PBXContainerItemProxy */ = {
245+
isa = PBXContainerItemProxy;
246+
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
247+
proxyType = 2;
248+
remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
249+
remoteInfo = "fishhook-tvOS";
250+
};
251+
48554890200E23A10020211B /* PBXContainerItemProxy */ = {
252+
isa = PBXContainerItemProxy;
253+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
254+
proxyType = 2;
255+
remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
256+
remoteInfo = "React-tvOS";
257+
};
258+
48554892200E23A10020211B /* PBXContainerItemProxy */ = {
259+
isa = PBXContainerItemProxy;
260+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
261+
proxyType = 2;
262+
remoteGlobalIDString = EBF21BDC1FC498900052F4D5;
263+
remoteInfo = jsinspector;
264+
};
265+
48554894200E23A10020211B /* PBXContainerItemProxy */ = {
266+
isa = PBXContainerItemProxy;
267+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
268+
proxyType = 2;
269+
remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5;
270+
remoteInfo = "jsinspector-tvOS";
271+
};
272+
48554896200E23A10020211B /* PBXContainerItemProxy */ = {
273+
isa = PBXContainerItemProxy;
274+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
275+
proxyType = 2;
276+
remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
277+
remoteInfo = privatedata;
278+
};
279+
48554898200E23A10020211B /* PBXContainerItemProxy */ = {
280+
isa = PBXContainerItemProxy;
281+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
282+
proxyType = 2;
283+
remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
284+
remoteInfo = "privatedata-tvOS";
285+
};
236286
489690581FD58E4300D83DAD /* PBXContainerItemProxy */ = {
237287
isa = PBXContainerItemProxy;
238288
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
@@ -420,11 +470,11 @@
420470
DC5C35E21E37AD1800F3F526 /* Octicons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = Octicons.ttf; sourceTree = "<group>"; };
421471
E14CC94AAEF7467B9AFD7CDB /* RNCookieManagerIOS.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNCookieManagerIOS.xcodeproj; path = "../node_modules/react-native-cookies/ios/RNCookieManagerIOS.xcodeproj"; sourceTree = "<group>"; };
422472
E37A1EB69E2D4FD7B138343D /* Nunito-Italic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-Italic.ttf"; path = "../src/assets/fonts/Nunito-Italic.ttf"; sourceTree = "<group>"; };
473+
E648F057A2064CA08EED0BD1 /* Inconsolata-Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inconsolata-Regular.ttf"; path = "../src/assets/fonts/Inconsolata-Regular.ttf"; sourceTree = "<group>"; };
423474
ED00F0F2B2624699A679DFB6 /* libRNCookieManagerIOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNCookieManagerIOS.a; sourceTree = "<group>"; };
424475
ED1B22A89E134AA89E251577 /* Nunito-Light.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-Light.ttf"; path = "../src/assets/fonts/Nunito-Light.ttf"; sourceTree = "<group>"; };
425476
EE0605281E45441288EA9435 /* RNDeviceInfo.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNDeviceInfo.xcodeproj; path = "../node_modules/react-native-device-info/RNDeviceInfo.xcodeproj"; sourceTree = "<group>"; };
426477
FBD0F4CBD299403498005E08 /* Nunito-SemiBold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Nunito-SemiBold.ttf"; path = "../src/assets/fonts/Nunito-SemiBold.ttf"; sourceTree = "<group>"; };
427-
E648F057A2064CA08EED0BD1 /* Inconsolata-Regular.ttf */ = {isa = PBXFileReference; name = "Inconsolata-Regular.ttf"; path = "../src/assets/fonts/Inconsolata-Regular.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
428478
/* End PBXFileReference section */
429479

430480
/* Begin PBXFrameworksBuildPhase section */
@@ -563,6 +613,8 @@
563613
children = (
564614
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
565615
3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
616+
4855487D200E23A10020211B /* libfishhook.a */,
617+
4855487F200E23A10020211B /* libfishhook-tvOS.a */,
566618
);
567619
name = Products;
568620
sourceTree = "<group>";
@@ -584,17 +636,21 @@
584636
isa = PBXGroup;
585637
children = (
586638
146834041AC3E56700842450 /* libReact.a */,
587-
3DAD3EA31DF850E9000B6D8A /* libReact.a */,
639+
48554891200E23A10020211B /* libReact.a */,
588640
3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
589641
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
590642
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
591643
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
592644
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
593645
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
646+
48554893200E23A10020211B /* libjsinspector.a */,
647+
48554895200E23A10020211B /* libjsinspector-tvOS.a */,
594648
489690591FD58E4300D83DAD /* libthird-party.a */,
595649
4896905B1FD58E4300D83DAD /* libthird-party.a */,
596650
4896905D1FD58E4300D83DAD /* libdouble-conversion.a */,
597651
4896905F1FD58E4300D83DAD /* libdouble-conversion.a */,
652+
48554897200E23A10020211B /* libprivatedata.a */,
653+
48554899200E23A10020211B /* libprivatedata-tvOS.a */,
598654
);
599655
name = Products;
600656
sourceTree = "<group>";
@@ -687,6 +743,7 @@
687743
ED00F0F2B2624699A679DFB6 /* libRNCookieManagerIOS.a */,
688744
1ABB0D8AB2424B1595DABB16 /* libRNPhotoView.a */,
689745
6C17E03AEA7E44AAB78D224F /* libBVLinearGradient.a */,
746+
3DAD3EA31DF850E9000B6D8A /* libReact.a */,
690747
);
691748
name = "Recovered References";
692749
sourceTree = "<group>";
@@ -1189,6 +1246,55 @@
11891246
remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
11901247
sourceTree = BUILT_PRODUCTS_DIR;
11911248
};
1249+
4855487D200E23A10020211B /* libfishhook.a */ = {
1250+
isa = PBXReferenceProxy;
1251+
fileType = archive.ar;
1252+
path = libfishhook.a;
1253+
remoteRef = 4855487C200E23A10020211B /* PBXContainerItemProxy */;
1254+
sourceTree = BUILT_PRODUCTS_DIR;
1255+
};
1256+
4855487F200E23A10020211B /* libfishhook-tvOS.a */ = {
1257+
isa = PBXReferenceProxy;
1258+
fileType = archive.ar;
1259+
path = "libfishhook-tvOS.a";
1260+
remoteRef = 4855487E200E23A10020211B /* PBXContainerItemProxy */;
1261+
sourceTree = BUILT_PRODUCTS_DIR;
1262+
};
1263+
48554891200E23A10020211B /* libReact.a */ = {
1264+
isa = PBXReferenceProxy;
1265+
fileType = archive.ar;
1266+
path = libReact.a;
1267+
remoteRef = 48554890200E23A10020211B /* PBXContainerItemProxy */;
1268+
sourceTree = BUILT_PRODUCTS_DIR;
1269+
};
1270+
48554893200E23A10020211B /* libjsinspector.a */ = {
1271+
isa = PBXReferenceProxy;
1272+
fileType = archive.ar;
1273+
path = libjsinspector.a;
1274+
remoteRef = 48554892200E23A10020211B /* PBXContainerItemProxy */;
1275+
sourceTree = BUILT_PRODUCTS_DIR;
1276+
};
1277+
48554895200E23A10020211B /* libjsinspector-tvOS.a */ = {
1278+
isa = PBXReferenceProxy;
1279+
fileType = archive.ar;
1280+
path = "libjsinspector-tvOS.a";
1281+
remoteRef = 48554894200E23A10020211B /* PBXContainerItemProxy */;
1282+
sourceTree = BUILT_PRODUCTS_DIR;
1283+
};
1284+
48554897200E23A10020211B /* libprivatedata.a */ = {
1285+
isa = PBXReferenceProxy;
1286+
fileType = archive.ar;
1287+
path = libprivatedata.a;
1288+
remoteRef = 48554896200E23A10020211B /* PBXContainerItemProxy */;
1289+
sourceTree = BUILT_PRODUCTS_DIR;
1290+
};
1291+
48554899200E23A10020211B /* libprivatedata-tvOS.a */ = {
1292+
isa = PBXReferenceProxy;
1293+
fileType = archive.ar;
1294+
path = "libprivatedata-tvOS.a";
1295+
remoteRef = 48554898200E23A10020211B /* PBXContainerItemProxy */;
1296+
sourceTree = BUILT_PRODUCTS_DIR;
1297+
};
11921298
489690591FD58E4300D83DAD /* libthird-party.a */ = {
11931299
isa = PBXReferenceProxy;
11941300
fileType = archive.ar;

ios/GitPoint/AppDelegate.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
2020
{
2121
NSURL *jsCodeLocation;
2222

23-
2423
#ifdef DEBUG
25-
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
24+
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
2625
#else
2726
jsCodeLocation = [CodePush bundleURL];
2827
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
"opencollective": "^1.0.3",
6565
"parse-diff": "^0.4.0",
6666
"query-string": "^4.3.1",
67-
"react": "^16.0.0",
68-
"react-native": "^0.48.4",
67+
"react": "16.2.0",
68+
"react-native": "0.52.0",
6969
"react-native-actionsheet": "^2.2.0",
7070
"react-native-code-push": "^5.0.0-beta",
7171
"react-native-collapsible": "^0.9.0",
@@ -76,7 +76,7 @@
7676
"react-native-elements": "^0.18.2",
7777
"react-native-htmlview": "^0.12.0",
7878
"react-native-i18n": "^2.0.4",
79-
"react-native-linear-gradient": "^2.3.0",
79+
"react-native-linear-gradient": "^2.4.0",
8080
"react-native-material-design-searchbar": "^1.1.4",
8181
"react-native-mock": "https://github.com/shqld/react-native-mock/tarball/master",
8282
"react-native-parallax-scroll-view": "^0.20.1",
@@ -128,7 +128,7 @@
128128
"lint-staged": "^3.2.6",
129129
"minicat": "^1.0.0",
130130
"prettier": "^1.7.4",
131-
"react-dom": "^16.0.0",
131+
"react-dom": "^16.2.0",
132132
"react-native-cli": "^2.0.1",
133133
"react-test-renderer": "^16.0.0",
134134
"reactotron-react-native": "^1.12.2",

0 commit comments

Comments
 (0)