Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit ed80468

Browse files
committed
RN 0.43.4 -> 0.50.4, just cherry-pick from branch RnUpgrade
1 parent cbafeae commit ed80468

File tree

16 files changed

+880
-486
lines changed

16 files changed

+880
-486
lines changed

.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["react-native"]
3-
}
2+
"presets": ["react-native"]
3+
}

.flowconfig

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,37 @@
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
1414
.*/Libraries/react-native/React.js
15-
.*/Libraries/react-native/ReactNative.js
15+
16+
; Ignore polyfills
17+
.*/Libraries/polyfills/.*
1618

1719
[include]
1820

1921
[libs]
2022
node_modules/react-native/Libraries/react-native/react-native-interface.js
21-
node_modules/react-native/flow
22-
flow/
23+
node_modules/react-native/flow/
2324

2425
[options]
2526
emoji=true
2627

2728
module.system=haste
2829

29-
experimental.strict_type_args=true
30-
3130
munge_underscores=true
3231

3332
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'
3433

3534
suppress_type=$FlowIssue
3635
suppress_type=$FlowFixMe
36+
suppress_type=$FlowFixMeProps
37+
suppress_type=$FlowFixMeState
3738
suppress_type=$FixMe
3839

39-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
40+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
41+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
4142
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4243
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
4344

4445
unsafe.enable_getters_and_setters=true
4546

4647
[version]
47-
^0.40.0
48+
^0.56.0

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ buck-out/
5050
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
5151
# screenshots whenever they are needed.
5252
# For more information about the recommended setup visit:
53-
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
53+
# https://docs.fastlane.tools/best-practices/source-control/
5454

55-
fastlane/report.xml
56-
fastlane/Preview.html
57-
fastlane/screenshots
55+
*/fastlane/report.xml
56+
*/fastlane/Preview.html
57+
*/fastlane/screenshots
5858

5959
# other
6060
e2e/output/
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import 'react-native';
22
import React from 'react';
3-
import Index from '../index.ios.js';
3+
import App from '../src';
44

55
// Note: test renderer must be required after react-native.
66
import renderer from 'react-test-renderer';
77

88
it('renders correctly', () => {
99
const tree = renderer.create(
10-
<Index />
10+
<App />
1111
);
1212
});

__tests__/index.android.js

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

android/app/build.gradle

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ import com.android.build.OutputFile
3333
* // bundleInPaidRelease: true,
3434
* // bundleInBeta: true,
3535
*
36+
* // whether to disable dev mode in custom build variants (by default only disabled in release)
37+
* // for example: to disable dev mode in the staging build type (if configured)
38+
* devDisabledInStaging: true,
39+
* // The configuration property can be in the following formats
40+
* // 'devDisabledIn${productFlavor}${buildType}'
41+
* // 'devDisabledIn${buildType}'
42+
*
3643
* // the root of your project, i.e. where "package.json" lives
3744
* root: "../../",
3845
*
@@ -58,13 +65,17 @@ import com.android.build.OutputFile
5865
* inputExcludes: ["android/**", "ios/**"],
5966
*
6067
* // override which node gets called and with what additional arguments
61-
* nodeExecutableAndArgs: ["node"]
68+
* nodeExecutableAndArgs: ["node"],
6269
*
6370
* // supply additional arguments to the packager
6471
* extraPackagerArgs: []
6572
* ]
6673
*/
6774

75+
project.ext.react = [
76+
entryFile: "index.native.js"
77+
]
78+
6879
apply from: "../../node_modules/react-native/react.gradle"
6980
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
7081

android/app/proguard-rules.pro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050

5151
-dontwarn com.facebook.react.**
5252

53+
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
54+
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
55+
-dontwarn android.text.StaticLayout
56+
5357
# okhttp
5458

5559
-keepattributes Signature

android/app/src/main/java/com/noder/MainApplication.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ protected List<ReactPackage> getPackages() {
4141
new BarcodeScannerPackage()
4242
);
4343
}
44+
45+
@Override
46+
protected String getJSMainModuleName() {
47+
return "index.native";
48+
}
4449
};
4550

4651
@Override

index.ios.js

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import React from 'react'
2-
import {AppRegistry} from 'react-native'
1+
import { AppRegistry } from 'react-native'
32
import Noder from './src'
43

54
AppRegistry.registerComponent('noder', () => Noder)

0 commit comments

Comments
 (0)