Skip to content

Commit c550d40

Browse files
author
39otrebla
committed
upgrade react-native and react-native-maps to latest version
1 parent efd090a commit c550d40

File tree

19 files changed

+1472
-1698
lines changed

19 files changed

+1472
-1698
lines changed

.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["react-native"]
3-
}
2+
"presets": ["module:metro-react-native-babel-preset"]
3+
}

.flowconfig

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,55 @@
1616
; Ignore polyfills
1717
.*/Libraries/polyfills/.*
1818

19+
; Ignore metro
20+
.*/node_modules/metro/.*
21+
1922
[include]
2023

2124
[libs]
2225
node_modules/react-native/Libraries/react-native/react-native-interface.js
2326
node_modules/react-native/flow/
27+
node_modules/react-native/flow-github/
2428

2529
[options]
2630
emoji=true
2731

32+
esproposal.optional_chaining=enable
33+
esproposal.nullish_coalescing=enable
34+
2835
module.system=haste
36+
module.system.haste.use_name_reducers=true
37+
# get basename
38+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
39+
# strip .js or .js.flow suffix
40+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
41+
# strip .ios suffix
42+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
43+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
44+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
45+
module.system.haste.paths.blacklist=.*/__tests__/.*
46+
module.system.haste.paths.blacklist=.*/__mocks__/.*
47+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
48+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
2949

3050
munge_underscores=true
3151

3252
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'
3353

54+
module.file_ext=.js
55+
module.file_ext=.jsx
56+
module.file_ext=.json
57+
module.file_ext=.native.js
58+
3459
suppress_type=$FlowIssue
3560
suppress_type=$FlowFixMe
3661
suppress_type=$FlowFixMeProps
3762
suppress_type=$FlowFixMeState
38-
suppress_type=$FixMe
3963

40-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
41-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
64+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
65+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
4266
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4367
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
4468

45-
unsafe.enable_getters_and_setters=true
46-
4769
[version]
48-
^0.56.0
70+
^0.78.0

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ build/
2929
.gradle
3030
local.properties
3131
*.iml
32-
.project
33-
.settings
34-
.classpath
3532

3633
# node.js
3734
#
@@ -54,3 +51,6 @@ buck-out/
5451
*/fastlane/report.xml
5552
*/fastlane/Preview.html
5653
*/fastlane/screenshots
54+
55+
# Bundle artifact
56+
*.jsbundle

App.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ import {
77
Text,
88
View,
99
Image,
10-
Platform,
1110
StyleSheet,
12-
ScrollView,
11+
SafeAreaView,
1312
TouchableOpacity,
14-
ActivityIndicator,
1513
} from 'react-native'
1614
import { Marker, Callout } from 'react-native-maps'
1715
import ClusteredMapView from 'react-native-maps-super-cluster'
@@ -74,8 +72,7 @@ export default class App extends Component {
7472

7573
render() {
7674
return (
77-
<View style={styles.container} style={{flex: 1}}>
78-
75+
<SafeAreaView style={styles.container}>
7976
{/* Cluster Map Example */}
8077
<ClusteredMapView
8178
style={{flex: 1}}
@@ -103,11 +100,12 @@ export default class App extends Component {
103100
<Text style={styles.text}>Load more</Text>
104101
</TouchableOpacity>
105102
</View>
103+
106104
<Image
107105
resizeMode='contain'
108106
source={require('./simbol.png')}
109-
style={{position: 'absolute', bottom: 8, right: 8, width: 64, height: 64}}/>
110-
</View>
107+
style={{position: 'absolute', bottom: 26, right: 8, width: 64, height: 64}}/>
108+
</SafeAreaView>
111109
)
112110
}
113111
}
@@ -137,7 +135,7 @@ const styles = StyleSheet.create({
137135
textAlign: 'center',
138136
},
139137
controlBar: {
140-
top: 24,
138+
top: 48,
141139
left: 25,
142140
right: 25,
143141
height: 40,

android/app/proguard-rules.pro

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -15,56 +15,3 @@
1515
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1616
# public *;
1717
#}
18-
19-
# Disabling obfuscation is useful if you collect stack traces from production crashes
20-
# (unless you are using a system that supports de-obfuscate the stack traces).
21-
-dontobfuscate
22-
23-
# React Native
24-
25-
# Keep our interfaces so they can be used by other ProGuard rules.
26-
# See http://sourceforge.net/p/proguard/bugs/466/
27-
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28-
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29-
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30-
31-
# Do not strip any method/class that is annotated with @DoNotStrip
32-
-keep @com.facebook.proguard.annotations.DoNotStrip class *
33-
-keep @com.facebook.common.internal.DoNotStrip class *
34-
-keepclassmembers class * {
35-
@com.facebook.proguard.annotations.DoNotStrip *;
36-
@com.facebook.common.internal.DoNotStrip *;
37-
}
38-
39-
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40-
void set*(***);
41-
*** get*();
42-
}
43-
44-
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45-
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
46-
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
47-
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
48-
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
49-
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
50-
51-
-dontwarn com.facebook.react.**
52-
53-
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
54-
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
55-
-dontwarn android.text.StaticLayout
56-
57-
# okhttp
58-
59-
-keepattributes Signature
60-
-keepattributes *Annotation*
61-
-keep class okhttp3.** { *; }
62-
-keep interface okhttp3.** { *; }
63-
-dontwarn okhttp3.**
64-
65-
# okio
66-
67-
-keep class sun.misc.Unsafe { *; }
68-
-dontwarn java.nio.file.*
69-
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
70-
-dontwarn okio.**
4.91 KB
Loading
2.79 KB
Loading
6.93 KB
Loading
10.4 KB
Loading
9.03 KB
Loading

0 commit comments

Comments
 (0)