Skip to content

Commit 0f71cf2

Browse files
Merge remote-tracking branch 'upstream/master'
2 parents e2fa879 + 69abd4a commit 0f71cf2

Some content is hidden

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

65 files changed

+8398
-790
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*.gz
1717
*.iso
1818
*.jar
19-
!Example/android/gradle/wrapper/gradle-wrapper.jar
19+
!ExampleOld/android/gradle/wrapper/gradle-wrapper.jar
2020
*.rar
2121
*.tar
2222
*.zip

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: 51 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,75 @@
11
[ignore]
2-
3-
# We fork some components by platform.
2+
; We fork some components by platform
43
.*/*[.]android.js
54

6-
# Ignore templates with `@flow` in header
7-
.*/local-cli/generator.*
8-
9-
# Ignore malformed json
10-
.*/node_modules/y18n/test/.*\.json
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
117

12-
# Ignore the website subdir
13-
<PROJECT_ROOT>/website/.*
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
1410

15-
# Ignore BUCK generated dirs
16-
<PROJECT_ROOT>/\.buckd/
11+
; These should not be required directly
12+
; require from fbjs/lib instead: require('fbjs/lib/warning')
13+
node_modules/warning/.*
1714

18-
# Ignore unexpected extra @providesModule
19-
.*/node_modules/commoner/test/source/widget/share.js
15+
; Flow doesn't support platforms
16+
.*/Libraries/Utilities/LoadingView.js
2017

21-
# Ignore duplicate module providers
22-
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
23-
.*/Libraries/react-native/React.js
24-
.*/Libraries/react-native/ReactNative.js
25-
.*/node_modules/jest-runtime/build/__tests__/.*
18+
[untyped]
19+
.*/node_modules/@react-native-community/cli/.*/.*
2620

2721
[include]
2822

2923
[libs]
3024
node_modules/react-native/Libraries/react-native/react-native-interface.js
31-
node_modules/react-native/flow
32-
flow/
25+
node_modules/react-native/flow/
3326

3427
[options]
35-
module.system=haste
28+
emoji=true
3629

37-
esproposal.class_static_fields=enable
38-
esproposal.class_instance_fields=enable
30+
esproposal.optional_chaining=enable
31+
esproposal.nullish_coalescing=enable
3932

40-
experimental.strict_type_args=true
33+
module.file_ext=.js
34+
module.file_ext=.json
35+
module.file_ext=.ios.js
4136

4237
munge_underscores=true
4338

44-
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
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\)$' -> 'RelativeImageStub'
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'
4642

4743
suppress_type=$FlowIssue
4844
suppress_type=$FlowFixMe
49-
suppress_type=$FixMe
50-
51-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-2]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
52-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-2]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
53-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
54-
55-
unsafe.enable_getters_and_setters=true
45+
suppress_type=$FlowFixMeProps
46+
suppress_type=$FlowFixMeState
47+
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]+
50+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
51+
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
5673

5774
[version]
58-
^0.32.0
75+
^0.105.0

Example/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

Example/.gitignore

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,40 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
project.xcworkspace
2423

25-
# Android/IJ
24+
# Android/IntelliJ
2625
#
27-
*.iml
26+
build/
2827
.idea
2928
.gradle
3029
local.properties
30+
*.iml
3131

3232
# node.js
3333
#
3434
node_modules/
3535
npm-debug.log
36+
yarn-error.log
3637

3738
# BUCK
3839
buck-out/
3940
\.buckd/
40-
android/app/libs
41-
android/keystores/debug.keystore
41+
*.keystore
42+
!debug.keystore
43+
44+
# fastlane
45+
#
46+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47+
# screenshots whenever they are needed.
48+
# For more information about the recommended setup visit:
49+
# https://docs.fastlane.tools/best-practices/source-control/
50+
51+
*/fastlane/report.xml
52+
*/fastlane/Preview.html
53+
*/fastlane/screenshots
54+
55+
# Bundle artifact
56+
*.jsbundle
57+
58+
# CocoaPods
59+
/ios/Pods/

Example/.prettierrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
bracketSpacing: false,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
trailingComma: 'all',
6+
};
Lines changed: 6 additions & 4 deletions
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)