Skip to content

Commit

Permalink
React native upgrade 0.62.2 rebased (#1586)
Browse files Browse the repository at this point in the history
* all files changed

* init Pods

* pods working

* app running

* fixed native and metro problems

* fix pods deployment target

* android running but with RN errors

* viewpager working

* fixed our custom webview

* Fix RCTAnalytics

* lint [IMPORTANT]

* fix warnings & gesture handler

* update scritps and readme

* fix most tests

* tests working

* fix TouchableHighlight tests

* rebased

* return to correct pod platform version

* Upgrade to RN 0.62.2

* Fix detox

* fix format

* fix metro server start

* fix bitcode error

* fix e2e release ios

* returning to previous deployment target

* detox bump

* fix yarn clean

* Create react-native-scrollable-tab-view+1.0.0.patch

* Back to 11.0 deployment target and fix sentry properties

* Allow more memory for daemon

* Fixed end of file warnings

* remove extra space

* Fix for e2e tests

* Ignore VirtualizedLists warning
  • Loading branch information
andrepimenta committed May 23, 2020
1 parent 786bb58 commit e0df5aa
Show file tree
Hide file tree
Showing 111 changed files with 4,605 additions and 4,942 deletions.
138 changes: 138 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
module.exports = {
root: true,
parser: 'babel-eslint',
extends: ['@react-native-community', 'eslint:recommended', 'plugin:import/warnings', 'plugin:react/recommended'],
globals: {
process: true,
beforeAll: true,
afterAll: true,
describe: true,
expect: true,
it: true,
jasmine: true,
jest: true,
spyOn: true,
element: true,
by: true,
beforeEach: true,
device: true,
waitFor: true,
__DEV__: true
},
rules: {
'no-catch-shadow': 0,
'no-console': ['warn', { allow: ['warn', 'error'] }],
quotes: [
'error',
'single',
{
avoidEscape: true,
allowTemplateLiterals: true
}
],
'comma-dangle': 0,
curly: 0,
'no-shadow': 0,
'no-bitwise': 0,
'class-methods-use-this': 0,
'eol-last': 1,
'import/no-named-as-default': 0,
'no-invalid-this': 0,
'no-new': 0,
'react/jsx-handler-names': 0,
'react/no-did-mount-set-state': 0,
'react/prefer-stateless-function': 0,
'require-atomic-updates': 0,
'array-callback-return': 2,
'arrow-body-style': 2,
'dot-notation': 2,
eqeqeq: 2,
'import/no-amd': 2,
'import/no-commonjs': 2,
'import/no-duplicates': 2,
'import/no-extraneous-dependencies': 2,
'import/no-mutable-exports': 2,
'import/no-namespace': 2,
'import/no-nodejs-modules': 2,
'import/prefer-default-export': 2,
'no-alert': 2,
'no-constant-condition': [
2,
{
checkLoops: false
}
],
'no-duplicate-imports': 2,
'no-empty-function': 2,
'no-else-return': 2,
'no-eval': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-global-assign': 2,
'no-implicit-globals': 2,
'no-implied-eval': 2,
'no-lonely-if': 2,
'no-loop-func': 2,
'no-new-func': 2,
'no-new-wrappers': 2,
'no-proto': 2,
'no-script-url': 2,
'no-self-compare': 2,
'no-throw-literal': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [
2,
{
defaultAssignment: false
}
],
'no-unsafe-negation': 2,
'no-unused-expressions': [
2,
{
allowTernary: true,
allowShortCircuit: true
}
],
'no-use-before-define': [2, 'nofunc'],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-concat': 2,
'no-useless-constructor': 2,
'no-useless-rename': 2,
'no-var': 2,
'no-with': 2,
'object-shorthand': 2,
'operator-assignment': 2,
'prefer-arrow-callback': 2,
'prefer-const': 2,
'prefer-rest-params': 2,
'prefer-spread': 2,
'import/no-unresolved': 2,
'eslint-comments/no-unlimited-disable': 0,
'eslint-comments/no-unused-disable': 0,
'react-native/no-color-literals': 2,
'react-native/no-inline-styles': 2,
'react-native/no-unused-styles': 2,
'react-native/split-platform-components': 2,
'react/jsx-boolean-value': 2,
'react/jsx-key': 1,
'react/jsx-no-bind': 1,
'react/jsx-pascal-case': 2,
'react/jsx-wrap-multilines': 2,
'react/no-danger': 2,
'react/no-did-update-set-state': 2,
'react/no-find-dom-node': 2,
'react/no-multi-comp': [
2,
{
ignoreStateless: true
}
],
'react/no-render-return-value': 2,
'react/no-string-refs': 2,
'react/no-unused-prop-types': 2,
'react/prefer-es6-class': 2,
radix: 0
}
};
76 changes: 40 additions & 36 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,70 @@
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*
; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js
; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
node_modules/warning/.*

; Ignore polyfills
.*/Libraries/polyfills/.*
; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js

; Ignore metro
.*/node_modules/metro/.*
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/

[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

module.system=haste
module.system.haste.use_name_reducers=true
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip .ios suffix
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=.*/__tests__/.*
module.system.haste.paths.blacklist=.*/__mocks__/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js

munge_underscores=true

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'

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
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'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
inexact-spread=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error

[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.86.0
^0.113.0
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.pbxproj -text
# specific for windows script files
*.bat text eol=crlf
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ yarn-error.log
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
*/fastlane/report.xml
Expand Down Expand Up @@ -69,3 +70,6 @@ coverage

# editor
.vscode

# CocoaPods
/ios/Pods/
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ The code is built using React-Native and running code locally requires a Mac or
- [macOS](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-1)
- [Linux](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-2)

- Install [cocoapods](https://guides.cocoapods.org/using/getting-started.html) by running:

```bash
sudo gem install cocoapods
```

- _MetaMask Only:_ Rename the `.*.env.example` files (remove the `.example`) in the root of the project and fill in the appropriate values for each key. Get the values from another MetaMask Mobile developer.

- Clone this repo and install our dependencies:
Expand All @@ -31,6 +37,7 @@ The code is built using React-Native and running code locally requires a Mac or
git clone ...
cd metamask-mobile
yarn install # this will run a lengthy postinstall flow
cd ios && pod install && cd .. # install pods for iOS
```

- Then, in one terminal, run:
Expand Down
Loading

0 comments on commit e0df5aa

Please sign in to comment.