Skip to content

Commit 174fb14

Browse files
madhavarshneyvkjr
authored andcommitted
Merge React Native 0.57.8 (#422)
* Merge React Native 0.57 - auto-resolved changes * Merge React Native 0.57 - manually resolved conflicts * Merge React Native 0.57 - removed files deleted from upstream * Merge React Native 0.57.8
1 parent 564b9dc commit 174fb14

File tree

1,157 files changed

+49634
-39438
lines changed

Some content is hidden

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

1,157 files changed

+49634
-39438
lines changed

.buckconfig

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11

22
[android]
3-
target = android-26
4-
5-
[download]
6-
max_number_of_retries = 3
3+
target = android-27
74

85
[download]
96
max_number_of_retries = 3

.eslintrc

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"setTimeout": false,
5353
"window": false,
5454
"XMLHttpRequest": false,
55-
"pit": false
55+
"pit": false,
56+
"jasmine": true
5657
},
5758

5859
"rules": {
@@ -143,7 +144,7 @@
143144
"no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block
144145
"no-undefined": 0, // disallow use of undefined variable (off by default)
145146
"no-undef-init": 1, // disallow use of undefined when initializing variables
146-
"no-unused-vars": [1, {"vars": "all", "args": "none"}], // disallow declaration of variables that are not used in the code
147+
"no-unused-vars": [1, {"vars": "all", "args": "none", ignoreRestSiblings: true}], // disallow declaration of variables that are not used in the code
147148
"no-use-before-define": 0, // disallow use of variables before they are defined
148149

149150
// Node.js

.flowconfig

+31-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
; Ignore metro
2626
.*/node_modules/metro/.*
27+
.*/node_modules/metro-config/.*
2728

2829
; These should not be required directly
2930
; require from fbjs/lib instead: require('fbjs/lib/invariant')
@@ -40,6 +41,9 @@ flow-github/
4041
[options]
4142
emoji=true
4243

44+
esproposal.optional_chaining=enable
45+
esproposal.nullish_coalescing=enable
46+
4347
module.system=haste
4448
module.system.haste.use_name_reducers=true
4549
# keep the following in sync with server/haste/hasteImpl.js
@@ -53,7 +57,6 @@ module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
5357
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
5458
module.system.haste.paths.blacklist=.*/__tests__/.*
5559
module.system.haste.paths.blacklist=.*/__mocks__/.*
56-
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Animated/src/polyfills/.*
5760
module.system.haste.paths.whitelist=<PROJECT_ROOT>/Libraries/.*
5861
module.system.haste.paths.whitelist=<PROJECT_ROOT>/RNTester/.*
5962
module.system.haste.paths.whitelist=<PROJECT_ROOT>/IntegrationTests/.*
@@ -68,10 +71,34 @@ suppress_type=$FlowFixMe
6871
suppress_type=$FlowFixMeProps
6972
suppress_type=$FlowFixMeState
7073

71-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)
72-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
74+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_ios\\)?_oss|react_native\\(_ios\\)?_fb][a-z,_]*\\)?)\\)
75+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_ios\\)?_oss|react_native\\(_ios\\)?_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
7376
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
7477
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
7578

79+
[lints]
80+
all=warn
81+
unnecessary-optional-chain=off
82+
83+
# There is an ESLint rule for this
84+
unclear-type=off
85+
86+
sketchy-null=off
87+
sketchy-null-number=warn
88+
sketchy-null-mixed=warn
89+
90+
# This is noisy for now. We *do* still want to warn on importing types
91+
# from untyped files, which is covered by untyped-type-import
92+
untyped-import=off
93+
94+
[strict]
95+
deprecated-type
96+
nonstrict-import
97+
sketchy-null
98+
unclear-type
99+
unsafe-getters-setters
100+
untyped-import
101+
untyped-type-import
102+
76103
[version]
77-
^0.75.0
104+
^0.78.0

.github.flowconfig.android

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]ios.js
4+
5+
; Ignore templates for 'react-native init'
6+
.*/local-cli/templates/.*
7+
8+
; Ignore the Dangerfile
9+
<PROJECT_ROOT>/bots/dangerfile.js
10+
11+
; Ignore "BUCK" generated dirs
12+
<PROJECT_ROOT>/\.buckd/
13+
14+
; Ignore unexpected extra "@providesModule"
15+
.*/node_modules/.*/node_modules/fbjs/.*
16+
17+
; Ignore duplicate module providers
18+
; For RN Apps installed via npm, "Libraries" folder is inside
19+
; "node_modules/react-native" but in the source repo it is in the root
20+
.*/Libraries/react-native/React.js
21+
22+
; Ignore polyfills
23+
.*/Libraries/polyfills/.*
24+
25+
; Ignore metro
26+
.*/node_modules/metro/.*
27+
28+
; These should not be required directly
29+
; require from fbjs/lib instead: require('fbjs/lib/invariant')
30+
.*/node_modules/invariant/.*
31+
.*/node_modules/warning/.*
32+
33+
[include]
34+
35+
[libs]
36+
Libraries/react-native/react-native-interface.js
37+
flow/
38+
flow-github/
39+
40+
[options]
41+
emoji=true
42+
43+
esproposal.optional_chaining=enable
44+
esproposal.nullish_coalescing=enable
45+
46+
module.system=haste
47+
module.system.haste.use_name_reducers=true
48+
# keep the following in sync with server/haste/hasteImpl.js
49+
# get basename
50+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
51+
# strip .js or .js.flow suffix
52+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
53+
# strip .android suffix
54+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
55+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
56+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
57+
module.system.haste.paths.blacklist=.*/__tests__/.*
58+
module.system.haste.paths.blacklist=.*/__mocks__/.*
59+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/Libraries/.*
60+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/RNTester/.*
61+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/IntegrationTests/.*
62+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Animated/src/polyfills/.*
63+
64+
munge_underscores=true
65+
66+
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'
67+
68+
suppress_type=$FlowIssue
69+
suppress_type=$FlowFixMe
70+
suppress_type=$FlowFixMeProps
71+
suppress_type=$FlowFixMeState
72+
73+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_android\\)?_oss|react_native\\(_android\\)?_fb][a-z,_]*\\)?)\\)
74+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_android\\)?_oss|react_native\\(_android\\)?_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
75+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
76+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
77+
78+
[lints]
79+
all=warn
80+
unnecessary-optional-chain=off
81+
82+
# There is an ESLint rule for this
83+
unclear-type=off
84+
85+
sketchy-null=off
86+
sketchy-null-number=warn
87+
sketchy-null-mixed=warn
88+
89+
# This is noisy for now. We *do* still want to warn on importing types
90+
# from untyped files, which is covered by untyped-type-import
91+
untyped-import=off
92+
93+
[strict]
94+
deprecated-type
95+
nonstrict-import
96+
sketchy-null
97+
unclear-type
98+
unsafe-getters-setters
99+
untyped-import
100+
untyped-type-import
101+
102+
[version]
103+
^0.78.0

.github/ISSUE_TEMPLATE.md

+2-121
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,3 @@
1-
<!--
2-
PLEASE DON'T DELETE THIS TEMPLATE UNTIL YOU HAVE READ THE FIRST SECTION.
3-
-->
1+
GitHub Issues in the `facebook/react-native` repository are used exclusively for tracking bugs in React Native.
42

5-
### Is this a bug report?
6-
7-
(write your answer here)
8-
9-
<!--
10-
If you answered "Yes":
11-
12-
We expect that it will take you about 30 minutes to produce a high-quality bug report.
13-
While this may seem like a lot, putting care into issues helps us fix them faster.
14-
For bug reports, it is REQUIRED to fill the rest of this template, or the issue will be closed.
15-
16-
If you answered "No":
17-
18-
We use GitHub Issues exclusively for tracking bugs in React Native. If you're looking for help,
19-
the Community page at http://facebook.github.io/react-native/help.html list various resources
20-
that should help you get started.
21-
22-
Now scroll below!
23-
-->
24-
25-
### Have you read the [Contributing Guidelines](https://facebook.github.io/react-native/docs/contributing.html)?
26-
27-
(Write your answer here.)
28-
29-
### Environment
30-
31-
<!--
32-
In your terminal run `react-native info` and paste its contents here. Next, specify your target platform, like this:
33-
34-
Environment:
35-
OS: macOS Sierra 10.12.6
36-
Node: 8.4.0
37-
Yarn: 0.27.5
38-
npm: 5.4.0
39-
Watchman: 4.7.0
40-
Xcode: Xcode 8.3.3 Build version 8E3004b
41-
Android Studio: 2.3 AI-162.4069837
42-
43-
Packages: (wanted => installed)
44-
react-native: 0.48.1 => 0.48.1
45-
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
46-
47-
Target Platform: iOS (10.3)
48-
49-
***Make sure you are on v0.48.0 or greater of react-native, otherwise you may get this error:
50-
51-
Unrecognized command 'info'
52-
Run react-native --help to see list of all available commands
53-
-->
54-
55-
### Steps to Reproduce
56-
57-
<!--
58-
How would you describe your issue to someone who doesn’t know you or your project?
59-
Try to write a sequence of steps that anybody can repeat to see the issue.
60-
Be specific! If the bug cannot be reproduced, your issue may be closed.
61-
-->
62-
63-
(Write your steps here:)
64-
65-
1.
66-
2.
67-
3.
68-
69-
### Expected Behavior
70-
71-
<!--
72-
How did you expect your project to behave?
73-
It’s fine if you’re not sure your understanding is correct.
74-
Just write down what you thought would happen.
75-
-->
76-
77-
(Write what you thought would happen.)
78-
79-
### Actual Behavior
80-
81-
<!--
82-
Did something go wrong?
83-
Is something broken, or not behaving as you expected?
84-
Describe this section in detail, and attach screenshots if possible.
85-
Don't just say "it doesn't work"!
86-
-->
87-
88-
(Write what happened. Add screenshots!)
89-
90-
### Reproducible Demo
91-
92-
<!--
93-
Please share a project that reproduces the issue.
94-
There are two ways to do it:
95-
96-
* Create a new app using https://snack.expo.io/ and try to reproduce the issue in it.
97-
This is useful if you roughly know where the problem is, or can’t share the real code.
98-
99-
* Or, copy your app and remove things until you’re left with the minimal reproducible demo.
100-
This is useful for finding the root cause. You may then optionally create a Snack.
101-
102-
This is a good guide to creating bug demos: https://stackoverflow.com/help/mcve
103-
Once you’re done, copy and paste the link to the Snack or a public GitHub repository below:
104-
-->
105-
106-
(Paste the link to an example project and exact instructions to reproduce the issue.)
107-
108-
<!--
109-
What happens if you skip this step?
110-
111-
Someone will read your bug report, and maybe will be able to help you,
112-
but it’s unlikely that it will get much attention from the team. Eventually,
113-
the issue will likely get closed in favor of issues that have reproducible demos.
114-
115-
Please remember that:
116-
117-
* Issues without reproducible demos have a very low priority.
118-
* The person fixing the bug would have to do that anyway. Please be respectful of their time.
119-
* You might figure out the issues yourself as you work on extracting it.
120-
121-
Thanks for helping us help you!
122-
-->
3+
Please take a look at the issue templates at https://github.com/facebook/react-native/issues/new/choose before submitting a new issue. Following one of the issue templates will ensure maintainers can route your request efficiently. Thanks!

.github/ISSUE_TEMPLATE/bug_report.md

+6-16
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
---
2-
name: "\U0001F41B Bug Report"
2+
name: 🐛 Bug Report
33
about: Report a reproducible bug or regression in the core React Native library.
4-
54
---
65

76
<!-- Requirements: please go through this checklist before opening a new issue -->
87
- [ ] Review the documentation: https://facebook.github.io/react-native
98
- [ ] Search for existing issues: https://github.com/facebook/react-native/issues
10-
- [ ] Use the latest React Native version: https://github.com/facebook/react-native/releases
11-
- [ ] Run `react-native info` in your terminal and paste its contents under "Environment"
12-
- [ ] Let us know how to reproduce the issue. Include a code sample, share a project, or
13-
share an app that reproduces the issue using https://snack.expo.io/
9+
- [ ] Use the latest React Native release: https://github.com/facebook/react-native/releases
1410

1511
## Environment
16-
<!-- Required. -->
12+
Run `react-native info` in your terminal and paste its contents here.
1713

1814
## Description
19-
<!-- Describe your issue in detail. -->
20-
21-
## Steps to Reproduce
22-
<!-- Required. -->
23-
24-
## Expected Behavior
25-
<!-- Write what you thought would happen. -->
15+
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
2616

27-
## Actual Behavior
28-
<!-- Write what happened. Include screenshots if needed. If this is a regression, let us know. -->
17+
## Reproducible Demo
18+
Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve

.github/ISSUE_TEMPLATE/discussion.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
---
2-
name: "\U0001F5E3 Start a Discussion"
3-
about: Use https://discuss.reactjs.org/ to propose changes or discuss feature requests.
2+
name: 🗣 Start a Discussion
3+
about: Use https://github.com/react-native-community/discussions-and-proposals to propose changes or discuss feature requests.
4+
---
5+
6+
Please use https://github.com/react-native-community/discussions-and-proposals to propose changes or discuss feature requests.
7+
8+
We kindly ask that issues of this type are kept in that dedicated repo, to ensure bug reports and regressions are given the priority they require.
9+
10+
Maintainers may flag an issue for Stack Overflow or kindly ask you to move the discussion to https://github.com/react-native-community/discussions-and-proposals at their own discretion.
411

512
---
613

7-
## For Discussion
14+
# For Discussion
815

916
<!-- Describe your issue in detail. -->
17+

.github/ISSUE_TEMPLATE/documentation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: "\U0001F4D6 Documentation Issue"
2+
name: 📖 Documentation Issue
33
about: Report issues with the docs at https://github.com/facebook/react-native-website/issues.
44

55
---

.github/ISSUE_TEMPLATE/question.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: "\U0001F4AC Question"
3-
about: If you need help with your React Native app, the right place to go depends
4-
on the type of help that you need.
2+
name: 💬 Question
3+
about: If you need help with your React Native app, the right place to go depends on the type of help that you need.
54

65
---
76

0 commit comments

Comments
 (0)