diff --git a/.flowconfig b/.flowconfig index 64a50fee..cac9d598 100644 --- a/.flowconfig +++ b/.flowconfig @@ -2,17 +2,36 @@ ; We fork some components by platform .*/*[.]android.js +; Ignore "BUCK" generated dirs +/\.buckd/ + +; Ignore unexpected extra "@providesModule" +.*/node_modules/.*/node_modules/fbjs/.* + ; 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 +node_modules/react-native/Libraries/react-native/React.js + +; Ignore polyfills +node_modules/react-native/Libraries/polyfills/.* + +; These should not be required directly +; require from fbjs/lib instead: require('fbjs/lib/warning') +node_modules/warning/.* + +; Flow doesn't support platforms +.*/Libraries/Utilities/HMRLoadingView.js + +[untyped] +.*/node_modules/@react-native-community/cli/.*/.* +.*/node_modules/react-native/Libraries/Lists/SectionList.js [include] [libs] node_modules/react-native/Libraries/react-native/react-native-interface.js node_modules/react-native/flow/ -node_modules/react-native/flow-github/ flow-typed [options] @@ -21,6 +40,10 @@ emoji=true esproposal.optional_chaining=enable esproposal.nullish_coalescing=enable +module.file_ext=.js +module.file_ext=.json +module.file_ext=.ios.js + module.system=haste module.system.haste.use_name_reducers=true # get basename @@ -33,45 +56,43 @@ 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=/node_modules/react-native/Libraries/Animated/src/polyfills/.* module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.* +module.system.haste.paths.whitelist=/node_modules/react-native/RNTester/.* +module.system.haste.paths.whitelist=/node_modules/react-native/IntegrationTests/.* +module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/react-native/react-native-implementation.js +module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.* 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 - suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError -include_warnings=true +[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 -[untyped] -; bugs in react-native typings -.*/Libraries/Components/Navigation/NavigatorIOS.ios.js -.*/Libraries/Components/View/ViewPropTypes.js -.*/Libraries/Components/ActivityIndicator/ActivityIndicator.js -.*/Libraries/Components/Slider/Slider.js -.*/Libraries/Components/Touchable/TouchableHighlight.js -.*/Libraries/Components/Touchable/TouchableOpacity.js -.*/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js -.*/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js -.*/Libraries/Image/Image.ios.js -.*/Libraries/Text/Text.js -.*/Libraries/LayoutAnimation/LayoutAnimation.js -.*/Libraries/Lists/VirtualizedSectionList.js -.*/Libraries/StyleSheet/processTransform.js -.*/Libraries/StyleSheet/StyleSheetValidation.js -.*/Libraries/Text/TextAncestor.js -.*/Libraries/YellowBox/UI/YellowBoxList.js +[strict] +deprecated-type +nonstrict-import +sketchy-null +unclear-type +unsafe-getters-setters +untyped-import +untyped-type-import diff --git a/package.json b/package.json index e7a00d1f..ad226ceb 100644 --- a/package.json +++ b/package.json @@ -27,16 +27,16 @@ "conventional-changelog-cli": "^2.0.11", "dedent": "^0.7.0", "eslint": "^5.15.2", - "flow-bin": "^0.102.0", + "flow-bin": "^0.98.0", "flow-copy-source": "^2.0.6", "jest": "^24.7.1", "metro-react-native-babel-preset": "^0.52.0", - "react": "^16.8.3", - "react-native": "^0.59.8", - "react-test-renderer": "^16.8.3", - "release-it": "^12.1.0", - "strip-ansi": "^5.0.0", - "typescript": "^3.1.1" + "react": "16.8.6", + "react-native": "0.60.3", + "react-test-renderer": "16.8.6", + "release-it": "^12.3.3", + "strip-ansi": "^5.2.0", + "typescript": "^3.5.3" }, "dependencies": { "pretty-format": "^24.0.0" diff --git a/src/__tests__/__snapshots__/debug.test.js.snap b/src/__tests__/__snapshots__/debug.test.js.snap index 8bef21dc..a6bc7d29 100644 --- a/src/__tests__/__snapshots__/debug.test.js.snap +++ b/src/__tests__/__snapshots__/debug.test.js.snap @@ -14,7 +14,9 @@ exports[`debug 1`] = ` exports[`debug.deep 1`] = ` " Press me - + `; exports[`shallow rendering React elements 1`] = ` diff --git a/src/__tests__/debug.test.js b/src/__tests__/debug.test.js index ca7513c9..d5aedbdc 100644 --- a/src/__tests__/debug.test.js +++ b/src/__tests__/debug.test.js @@ -36,12 +36,12 @@ test('debug', () => { const component =