Skip to content

Commit 7939eb6

Browse files
authored
feat: upgrade example react-native version to latest (#10)
1 parent fa2b2f1 commit 7939eb6

File tree

77 files changed

+7349
-6437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+7349
-6437
lines changed

example/.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

example/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

example/.flowconfig

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,63 +5,62 @@
55
; Ignore "BUCK" generated dirs
66
<PROJECT_ROOT>/\.buckd/
77

8-
; Ignore unexpected extra "@providesModule"
9-
.*/node_modules/.*/node_modules/fbjs/.*
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
1010

11-
; Ignore duplicate module providers
12-
; For RN Apps installed via npm, "Libraries" folder is inside
13-
; "node_modules/react-native" but in the source repo it is in the root
14-
.*/Libraries/react-native/React.js
11+
; Flow doesn't support platforms
12+
.*/Libraries/Utilities/LoadingView.js
1513

16-
; Ignore polyfills
17-
.*/Libraries/polyfills/.*
14+
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
1815

19-
; Ignore metro
20-
.*/node_modules/metro/.*
16+
[untyped]
17+
.*/node_modules/@react-native-community/cli/.*/.*
2118

2219
[include]
2320

2421
[libs]
25-
node_modules/react-native/Libraries/react-native/react-native-interface.js
22+
node_modules/react-native/interface.js
2623
node_modules/react-native/flow/
27-
node_modules/react-native/flow-github/
2824

2925
[options]
3026
emoji=true
3127

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

49-
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'
30+
format.bracket_spacing=false
5031

5132
module.file_ext=.js
52-
module.file_ext=.jsx
5333
module.file_ext=.json
54-
module.file_ext=.native.js
34+
module.file_ext=.ios.js
35+
36+
munge_underscores=true
37+
38+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
39+
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\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
5540

5641
suppress_type=$FlowIssue
5742
suppress_type=$FlowFixMe
5843
suppress_type=$FlowFixMeProps
5944
suppress_type=$FlowFixMeState
6045

61-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
62-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
63-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
64-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
46+
[lints]
47+
sketchy-null-number=warn
48+
sketchy-null-mixed=warn
49+
sketchy-number=warn
50+
untyped-type-import=warn
51+
nonstrict-import=warn
52+
deprecated-type=warn
53+
unsafe-getters-setters=warn
54+
unnecessary-invariant=warn
55+
56+
[strict]
57+
deprecated-type
58+
nonstrict-import
59+
sketchy-null
60+
unclear-type
61+
unsafe-getters-setters
62+
untyped-import
63+
untyped-type-import
6564

6665
[version]
67-
^0.75.0
66+
^0.182.0

example/.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/.gitignore

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
project.xcworkspace
23+
ios/.xcode.env.local
2424

2525
# Android/IntelliJ
2626
#
@@ -29,6 +29,8 @@ build/
2929
.gradle
3030
local.properties
3131
*.iml
32+
*.hprof
33+
.cxx/
3234

3335
# node.js
3436
#
@@ -40,14 +42,23 @@ yarn-error.log
4042
buck-out/
4143
\.buckd/
4244
*.keystore
45+
!debug.keystore
4346

4447
# fastlane
4548
#
4649
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4750
# screenshots whenever they are needed.
4851
# For more information about the recommended setup visit:
49-
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
52+
# https://docs.fastlane.tools/best-practices/source-control/
5053

51-
fastlane/report.xml
52-
fastlane/Preview.html
53-
fastlane/screenshots
54+
**/fastlane/report.xml
55+
**/fastlane/Preview.html
56+
**/fastlane/screenshots
57+
**/fastlane/test_output
58+
59+
# Bundle artifact
60+
*.jsbundle
61+
62+
# Ruby / CocoaPods
63+
/ios/Pods/
64+
/vendor/bundle/

example/.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16

example/.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
4+
bracketSpacing: false,
5+
singleQuote: true,
6+
trailingComma: 'all',
7+
};

example/.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.5

example/App.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import {
1313
Alert,
1414
TouchableOpacity,
1515
ScrollView,
16-
Platform
16+
Platform,
17+
SafeAreaView
1718
} from 'react-native';
1819
import { RNCamera } from 'react-native-camera';
1920

@@ -46,7 +47,7 @@ export default class example extends Component {
4647

4748
render() {
4849
return (
49-
<View style={styles.container}>
50+
<SafeAreaView style={styles.container}>
5051
{
5152
this.state.example === 0 &&
5253
<View style={{ justifyContent: 'center', alignItems: 'center', width: 340 }}>
@@ -596,7 +597,7 @@ export default class example extends Component {
596597
</ScrollView>
597598
</View>
598599
}
599-
</View>
600+
</SafeAreaView>
600601
);
601602
}
602603
}
@@ -665,5 +666,6 @@ const styles = StyleSheet.create({
665666
shadowRadius: 2
666667
}
667668
});
668-
669-
AppRegistry.registerComponent('example', () => example);
669+
670+
AppRegistry.registerComponent('example', () => example);
671+

0 commit comments

Comments
 (0)