Skip to content

Commit 552cc47

Browse files
committed
Merge branch 'master' of https://github.com/Naturalclar/react-native-segmented-control into chore/addMissingTypes
2 parents 064c981 + dae75f6 commit 552cc47

35 files changed

+2961
-5161
lines changed

.circleci/config.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defaults: &defaults
1010
linux_defaults: &linux_defaults
1111
<<: *defaults
1212
docker:
13-
- image: circleci/node:8
13+
- image: circleci/node:10
1414
environment:
1515
- PATH: "/opt/yarn/yarn-v1.5.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
1616

@@ -19,7 +19,7 @@ android_defaults: &android_defaults
1919
<<: *defaults
2020
docker:
2121
- image: circleci/android:api-27-node8-alpha
22-
resource_class: "large"
22+
resource_class: "medium"
2323
environment:
2424
- TERM: "dumb"
2525
- ADB_INSTALL_TIMEOUT: 10
@@ -30,7 +30,7 @@ android_defaults: &android_defaults
3030
# MACOS
3131
macos_defaults: &macos_defaults
3232
<<: *defaults
33-
resource_class: "large"
33+
resource_class: "medium"
3434
macos:
3535
xcode: "10.1.0"
3636

@@ -142,7 +142,9 @@ jobs:
142142
- run:
143143
name: Build Android Example App and Library
144144
command: |-
145-
cd example/android
145+
cd example
146+
yarn install
147+
cd android
146148
./gradlew clean assembleDebug
147149
- save-cache: *save-gradle-cache
148150

.flowconfig

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,79 @@
11
[ignore]
22
; We fork some components by platform
3-
.*/node_modules/react-native/.*/*[.]android.js
3+
.*/*[.]android.js
44

55
; Ignore "BUCK" generated dirs
66
<PROJECT_ROOT>/\.buckd/
77

8-
; Ignore unexpected extra "@providesModule"
9-
.*/node_modules/.*/node_modules/fbjs/.*
10-
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
15-
168
; Ignore polyfills
17-
.*/Libraries/polyfills/.*
9+
node_modules/react-native/Libraries/polyfills/.*
1810

19-
; Ignore metro
20-
.*/node_modules/metro/.*
11+
; These should not be required directly
12+
; require from fbjs/lib instead: require('fbjs/lib/warning')
13+
node_modules/warning/.*
14+
15+
; Flow doesn't support platforms
16+
.*/Libraries/Utilities/LoadingView.js
2117

2218
; Ignore example folder
2319
.*/example/.*
2420

21+
22+
[untyped]
23+
.*/node_modules/@react-native-community/cli/.*/.*
24+
2525
[include]
2626

2727
[libs]
2828
node_modules/react-native/Libraries/react-native/react-native-interface.js
2929
node_modules/react-native/flow/
30-
node_modules/react-native/flow-github/
3130

3231
[options]
3332
emoji=true
3433

3534
esproposal.optional_chaining=enable
3635
esproposal.nullish_coalescing=enable
3736

38-
module.system=haste
39-
module.system.haste.use_name_reducers=true
40-
# get basename
41-
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
42-
# strip .js or .js.flow suffix
43-
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
44-
# strip .ios suffix
45-
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
46-
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
47-
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
48-
module.system.haste.paths.blacklist=.*/__tests__/.*
49-
module.system.haste.paths.blacklist=.*/__mocks__/.*
50-
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
51-
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
52-
53-
munge_underscores=true
54-
55-
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'
56-
# Support the library import in examples
57-
module.name_mapper='^\@react-native-community/react-native-segmented-control$' -> '<PROJECT_ROOT>/js/index.js'
58-
5937
module.file_ext=.js
60-
module.file_ext=.jsx
6138
module.file_ext=.json
62-
module.file_ext=.native.js
63-
module.file_ext=.android.js
6439
module.file_ext=.ios.js
6540

41+
munge_underscores=true
42+
43+
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
44+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
45+
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'
46+
6647
suppress_type=$FlowIssue
6748
suppress_type=$FlowFixMe
6849
suppress_type=$FlowFixMeProps
6950
suppress_type=$FlowFixMeState
7051

71-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
72-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
73-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
52+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
53+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
7454
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
7555

56+
[lints]
57+
sketchy-null-number=warn
58+
sketchy-null-mixed=warn
59+
sketchy-number=warn
60+
untyped-type-import=warn
61+
nonstrict-import=warn
62+
deprecated-type=warn
63+
unsafe-getters-setters=warn
64+
inexact-spread=warn
65+
unnecessary-invariant=warn
66+
signature-verification-failure=warn
67+
deprecated-utility=error
68+
69+
[strict]
70+
deprecated-type
71+
nonstrict-import
72+
sketchy-null
73+
unclear-type
74+
unsafe-getters-setters
75+
untyped-import
76+
untyped-type-import
77+
7678
[version]
77-
^0.92.0
79+
^0.105.0

example/.flowconfig

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@
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+
; These should not be required directly
12+
; require from fbjs/lib instead: require('fbjs/lib/warning')
13+
node_modules/warning/.*
1514

16-
; Ignore polyfills
17-
.*/Libraries/polyfills/.*
15+
; Flow doesn't support platforms
16+
.*/Libraries/Utilities/LoadingView.js
1817

19-
; Ignore metro
20-
.*/node_modules/metro/.*
18+
[untyped]
19+
.*/node_modules/@react-native-community/cli/.*/.*
2120

2221
[include]
2322

@@ -31,39 +30,46 @@ emoji=true
3130
esproposal.optional_chaining=enable
3231
esproposal.nullish_coalescing=enable
3332

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

4937
munge_underscores=true
5038

51-
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'
52-
53-
module.file_ext=.js
54-
module.file_ext=.jsx
55-
module.file_ext=.json
56-
module.file_ext=.native.js
39+
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
40+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
41+
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'
5742

5843
suppress_type=$FlowIssue
5944
suppress_type=$FlowFixMe
6045
suppress_type=$FlowFixMeProps
6146
suppress_type=$FlowFixMeState
6247

63-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
64-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
65-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
48+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
49+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
6650
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
6751

52+
[lints]
53+
sketchy-null-number=warn
54+
sketchy-null-mixed=warn
55+
sketchy-number=warn
56+
untyped-type-import=warn
57+
nonstrict-import=warn
58+
deprecated-type=warn
59+
unsafe-getters-setters=warn
60+
inexact-spread=warn
61+
unnecessary-invariant=warn
62+
signature-verification-failure=warn
63+
deprecated-utility=error
64+
65+
[strict]
66+
deprecated-type
67+
nonstrict-import
68+
sketchy-null
69+
unclear-type
70+
unsafe-getters-setters
71+
untyped-import
72+
untyped-type-import
73+
6874
[version]
69-
^0.92.0
75+
^0.105.0

example/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
project.xcworkspace
2423

2524
# Android/IntelliJ
2625
#
@@ -40,6 +39,7 @@ yarn-error.log
4039
buck-out/
4140
\.buckd/
4241
*.keystore
42+
!debug.keystore
4343

4444
# fastlane
4545
#
@@ -54,3 +54,6 @@ buck-out/
5454

5555
# Bundle artifact
5656
*.jsbundle
57+
58+
# CocoaPods
59+
/ios/Pods/

example/android/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>android</name>
4+
<comment>Project android created by Buildship.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16+
</natures>
17+
</projectDescription>

0 commit comments

Comments
 (0)