Skip to content

Commit aa9bc07

Browse files
author
Jiri Kolarik
authored
Merge pull request #31 from adecrown/master
Upgraded RN to 0.60.4 and moment-range to latest and fixed Issue 23 and 27
2 parents 6ce8391 + bb3da1e commit aa9bc07

Some content is hidden

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

58 files changed

+6017
-3550
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
/node_modules
2+
.idea
3+
.DS_Store
4+
yarn.lock

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export default class ReactNativeDatesDemo extends Component {
7474
startDate={this.state.startDate}
7575
endDate={this.state.endDate}
7676
focusedInput={this.state.focus}
77+
focusedMonth={ moment('05/09/2030','DD/MM/YYYY')}
7778
range
7879
/>
7980

example/.babelrc

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

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: 65 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,89 @@
1111
; Ignore duplicate module providers
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
14-
.*/Libraries/react-native/React.js
15-
.*/Libraries/react-native/ReactNative.js
14+
node_modules/react-native/Libraries/react-native/React.js
15+
16+
; Ignore polyfills
17+
node_modules/react-native/Libraries/polyfills/.*
18+
19+
; These should not be required directly
20+
; require from fbjs/lib instead: require('fbjs/lib/warning')
21+
node_modules/warning/.*
22+
23+
; Flow doesn't support platforms
24+
.*/Libraries/Utilities/HMRLoadingView.js
25+
26+
[untyped]
27+
.*/node_modules/@react-native-community/cli/.*/.*
1628

1729
[include]
1830

1931
[libs]
2032
node_modules/react-native/Libraries/react-native/react-native-interface.js
21-
node_modules/react-native/flow
22-
flow/
33+
node_modules/react-native/flow/
2334

2435
[options]
2536
emoji=true
2637

27-
module.system=haste
38+
esproposal.optional_chaining=enable
39+
esproposal.nullish_coalescing=enable
40+
41+
module.file_ext=.js
42+
module.file_ext=.json
43+
module.file_ext=.ios.js
2844

29-
experimental.strict_type_args=true
45+
module.system=haste
46+
module.system.haste.use_name_reducers=true
47+
# get basename
48+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
49+
# strip .js or .js.flow suffix
50+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
51+
# strip .ios suffix
52+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
53+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
54+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
55+
module.system.haste.paths.blacklist=.*/__tests__/.*
56+
module.system.haste.paths.blacklist=.*/__mocks__/.*
57+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
58+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
59+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
60+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
61+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
3062

3163
munge_underscores=true
3264

3365
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'
3466

3567
suppress_type=$FlowIssue
3668
suppress_type=$FlowFixMe
37-
suppress_type=$FixMe
69+
suppress_type=$FlowFixMeProps
70+
suppress_type=$FlowFixMeState
71+
72+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
73+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
74+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
3875

39-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
41-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
76+
[lints]
77+
sketchy-null-number=warn
78+
sketchy-null-mixed=warn
79+
sketchy-number=warn
80+
untyped-type-import=warn
81+
nonstrict-import=warn
82+
deprecated-type=warn
83+
unsafe-getters-setters=warn
84+
inexact-spread=warn
85+
unnecessary-invariant=warn
86+
signature-verification-failure=warn
87+
deprecated-utility=error
4288

43-
unsafe.enable_getters_and_setters=true
89+
[strict]
90+
deprecated-type
91+
nonstrict-import
92+
sketchy-null
93+
unclear-type
94+
unsafe-getters-setters
95+
untyped-import
96+
untyped-type-import
4497

4598
[version]
46-
^0.38.0
99+
^0.98.0

example/.gitignore

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# OSX
22
#
33
.DS_Store
4-
54
# Xcode
65
#
76
build/
@@ -46,8 +45,14 @@ buck-out/
4645
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4746
# screenshots whenever they are needed.
4847
# For more information about the recommended setup visit:
49-
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
48+
# https://docs.fastlane.tools/best-practices/source-control/
49+
50+
*/fastlane/report.xml
51+
*/fastlane/Preview.html
52+
*/fastlane/screenshots
53+
54+
# Bundle artifact
55+
*.jsbundle
5056

51-
fastlane/report.xml
52-
fastlane/Preview.html
53-
fastlane/screenshots
57+
# CocoaPods
58+
/ios/Pods/
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
/**
2+
* @format
3+
*/
4+
15
import 'react-native';
26
import React from 'react';
3-
import Index from '../index.ios.js';
7+
import App from '../App';
48

59
// Note: test renderer must be required after react-native.
610
import renderer from 'react-test-renderer';
711

812
it('renders correctly', () => {
9-
const tree = renderer.create(
10-
<Index />
11-
);
13+
renderer.create(<App />);
1214
});

example/__tests__/index.android.js

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

example/android/app/BUCK

Lines changed: 28 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import re
2-
31
# To learn about Buck see [Docs](https://buckbuild.com/).
42
# To run your application with Buck:
53
# - install Buck
@@ -10,57 +8,48 @@ import re
108
# - `buck install -r android/app` - compile, install and run application
119
#
1210

11+
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12+
1313
lib_deps = []
14-
for jarfile in glob(['libs/*.jar']):
15-
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
16-
lib_deps.append(':' + name)
17-
prebuilt_jar(
18-
name = name,
19-
binary_jar = jarfile,
20-
)
2114

22-
for aarfile in glob(['libs/*.aar']):
23-
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
24-
lib_deps.append(':' + name)
25-
android_prebuilt_aar(
26-
name = name,
27-
aar = aarfile,
28-
)
15+
create_aar_targets(glob(["libs/*.aar"]))
16+
17+
create_jar_targets(glob(["libs/*.jar"]))
2918

3019
android_library(
31-
name = 'all-libs',
32-
exported_deps = lib_deps
20+
name = "all-libs",
21+
exported_deps = lib_deps,
3322
)
3423

3524
android_library(
36-
name = 'app-code',
37-
srcs = glob([
38-
'src/main/java/**/*.java',
39-
]),
40-
deps = [
41-
':all-libs',
42-
':build_config',
43-
':res',
44-
],
25+
name = "app-code",
26+
srcs = glob([
27+
"src/main/java/**/*.java",
28+
]),
29+
deps = [
30+
":all-libs",
31+
":build_config",
32+
":res",
33+
],
4534
)
4635

4736
android_build_config(
48-
name = 'build_config',
49-
package = 'com.example',
37+
name = "build_config",
38+
package = "com.example",
5039
)
5140

5241
android_resource(
53-
name = 'res',
54-
res = 'src/main/res',
55-
package = 'com.example',
42+
name = "res",
43+
package = "com.example",
44+
res = "src/main/res",
5645
)
5746

5847
android_binary(
59-
name = 'app',
60-
package_type = 'debug',
61-
manifest = 'src/main/AndroidManifest.xml',
62-
keystore = '//android/keystores:debug',
63-
deps = [
64-
':app-code',
65-
],
48+
name = "app",
49+
keystore = "//android/keystores:debug",
50+
manifest = "src/main/AndroidManifest.xml",
51+
package_type = "debug",
52+
deps = [
53+
":app-code",
54+
],
6655
)

0 commit comments

Comments
 (0)