Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 4ab8022

Browse files
Update CodePushDemoApp (#2169)
* Update CodePushDemoApp
1 parent d2f5d0e commit 4ab8022

Some content is hidden

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

63 files changed

+8772
-1798
lines changed

Examples/CodePushDemoApp/.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files
2+
[*.bat]
3+
end_of_line = crlf

Examples/CodePushDemoApp/.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+
};

Examples/CodePushDemoApp/.flowconfig

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,61 @@
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+
; Flow doesn't support platforms
12+
.*/Libraries/Utilities/LoadingView.js
1513

16-
; Ignore polyfills
17-
.*/Libraries/polyfills/.*
14+
[untyped]
15+
.*/node_modules/@react-native-community/cli/.*/.*
1816

1917
[include]
2018

2119
[libs]
22-
node_modules/react-native/Libraries/react-native/react-native-interface.js
20+
node_modules/react-native/interface.js
2321
node_modules/react-native/flow/
2422

2523
[options]
2624
emoji=true
2725

28-
module.system=haste
26+
exact_by_default=true
27+
28+
format.bracket_spacing=false
29+
30+
module.file_ext=.js
31+
module.file_ext=.json
32+
module.file_ext=.ios.js
2933

3034
munge_underscores=true
3135

32-
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'
36+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
37+
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'
3338

3439
suppress_type=$FlowIssue
3540
suppress_type=$FlowFixMe
3641
suppress_type=$FlowFixMeProps
3742
suppress_type=$FlowFixMeState
38-
suppress_type=$FixMe
3943

40-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
41-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
42-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
43-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
44+
[lints]
45+
sketchy-null-number=warn
46+
sketchy-null-mixed=warn
47+
sketchy-number=warn
48+
untyped-type-import=warn
49+
nonstrict-import=warn
50+
deprecated-type=warn
51+
unsafe-getters-setters=warn
52+
unnecessary-invariant=warn
53+
signature-verification-failure=warn
4454

45-
unsafe.enable_getters_and_setters=true
55+
[strict]
56+
deprecated-type
57+
nonstrict-import
58+
sketchy-null
59+
unclear-type
60+
unsafe-getters-setters
61+
untyped-import
62+
untyped-type-import
4663

4764
[version]
48-
^0.53.0
65+
^0.158.0
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
*.pbxproj -text
1+
# Windows files should use crlf line endings
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
*.bat text eol=crlf

Examples/CodePushDemoApp/.gitignore

Lines changed: 8 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
#
@@ -29,6 +28,7 @@ build/
2928
.gradle
3029
local.properties
3130
*.iml
31+
*.hprof
3232

3333
# node.js
3434
#
@@ -40,6 +40,7 @@ yarn-error.log
4040
buck-out/
4141
\.buckd/
4242
*.keystore
43+
!debug.keystore
4344

4445
# fastlane
4546
#
@@ -51,3 +52,9 @@ buck-out/
5152
*/fastlane/report.xml
5253
*/fastlane/Preview.html
5354
*/fastlane/screenshots
55+
56+
# Bundle artifact
57+
*.jsbundle
58+
59+
# CocoaPods
60+
/ios/Pods/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
bracketSpacing: false,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
trailingComma: 'all',
6+
arrowParens: 'avoid',
7+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @format
3+
*/
4+
5+
import 'react-native';
6+
import React from 'react';
7+
import App from '../App';
8+
9+
// Note: test renderer must be required after react-native.
10+
import renderer from 'react-test-renderer';
11+
12+
it('renders correctly', () => {
13+
renderer.create(<App />);
14+
});

Examples/CodePushDemoApp/__tests__/App.js

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

Examples/CodePushDemoApp/android/.project

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

0 commit comments

Comments
 (0)