diff --git a/.flowconfig b/.flowconfig index d7022150..7d344735 100644 --- a/.flowconfig +++ b/.flowconfig @@ -1,11 +1,10 @@ [version] -^0.98.0 +^0.109.0 [ignore] /.*/__tests__/.* /packages/.*/dist/.* /packages/examples/.* -/packages/react-native-web/src/vendor/.* /packages/website/.* .*/node_modules/babel-plugin-transform-react-remove-prop-types/* diff --git a/package.json b/package.json index c0e7ce20..05a71ea1 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "eslint-config-prettier": "^6.4.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-react": "^7.16.0", - "flow-bin": "0.98.0", + "flow-bin": "^0.109.0", "glob": "^7.1.2", "husky": "^3.0.8", "inline-style-prefixer": "^5.0.3", diff --git a/packages/react-native-web/src/exports/Touchable/index.js b/packages/react-native-web/src/exports/Touchable/index.js index d974595b..3ca72e1a 100644 --- a/packages/react-native-web/src/exports/Touchable/index.js +++ b/packages/react-native-web/src/exports/Touchable/index.js @@ -683,8 +683,10 @@ const TouchableMixin = { this.state.touchable.positionOnActivate && Position.release(this.state.touchable.positionOnActivate); this.state.touchable.dimensionsOnActivate && + // $FlowFixMe BoundingDimensions.release(this.state.touchable.dimensionsOnActivate); this.state.touchable.positionOnActivate = Position.getPooled(globalX, globalY); + // $FlowFixMe this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(w, h); }, diff --git a/packages/react-native-web/src/vendor/react-native/Animated/AnimatedImplementation.js b/packages/react-native-web/src/vendor/react-native/Animated/AnimatedImplementation.js index 8bd2ae19..9cd14043 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/AnimatedImplementation.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/AnimatedImplementation.js @@ -698,4 +698,4 @@ const AnimatedImplementation = { __PropsOnlyForTests: AnimatedProps, }; -export default AnimatedImplementation +export default AnimatedImplementation; diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedInterpolation.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedInterpolation.js index 1b0f58d8..217c8f28 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedInterpolation.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedInterpolation.js @@ -348,6 +348,7 @@ class AnimatedInterpolation extends AnimatedWithChildren { } __transformDataType(range: Array) { + // $FlowFixMe return range.map(NativeAnimatedHelper.transformDataType); } diff --git a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValueXY.js b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValueXY.js index 485842dd..11d29364 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValueXY.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/nodes/AnimatedValueXY.js @@ -27,6 +27,7 @@ let _uniqueId = 1; class AnimatedValueXY extends AnimatedWithChildren { x: AnimatedValue; y: AnimatedValue; + // $FlowFixMe _listeners: {[key: string]: {x: string, y: string}}; constructor( @@ -134,6 +135,7 @@ class AnimatedValueXY extends AnimatedWithChildren { * * See http://facebook.github.io/react-native/docs/animatedvaluexy.html#addlistener */ + // $FlowFixMe addListener(callback: ValueXYListenerCallback): string { const id = String(_uniqueId++); const jointCallback = ({value: number}) => { diff --git a/packages/react-native-web/src/vendor/react-native/FlatList/index.js b/packages/react-native-web/src/vendor/react-native/FlatList/index.js index 726edb0f..78755fee 100644 --- a/packages/react-native-web/src/vendor/react-native/FlatList/index.js +++ b/packages/react-native-web/src/vendor/react-native/FlatList/index.js @@ -491,6 +491,7 @@ class FlatList extends React.PureComponent, void> { _listRef: ?React.ElementRef; _virtualizedListPairs: Array = []; + // $FlowFixMe _captureRef = ref => { this._listRef = ref; }; diff --git a/packages/react-native-web/src/vendor/react-native/SectionList/index.js b/packages/react-native-web/src/vendor/react-native/SectionList/index.js index 39ebafb8..17cd2350 100644 --- a/packages/react-native-web/src/vendor/react-native/SectionList/index.js +++ b/packages/react-native-web/src/vendor/react-native/SectionList/index.js @@ -316,7 +316,9 @@ class SectionList> extends React.PureComponent< } _wrapperListRef: ?React.ElementRef; + // $FlowFixMe _captureRef = ref => { + // $FlowFixMe this._wrapperListRef = ref; }; } diff --git a/packages/react-native-web/src/vendor/react-native/ViewabilityHelper/index.js b/packages/react-native-web/src/vendor/react-native/ViewabilityHelper/index.js index d11c8b76..a2bfdcb0 100644 --- a/packages/react-native-web/src/vendor/react-native/ViewabilityHelper/index.js +++ b/packages/react-native-web/src/vendor/react-native/ViewabilityHelper/index.js @@ -232,8 +232,11 @@ class ViewabilityHelper { } _onUpdateSync( + // $FlowFixMe viewableIndicesToCheck, + // $FlowFixMe onViewableItemsChanged, + // $FlowFixMe createViewToken, ) { // Filter out indices that have gone out of view since this call was scheduled. diff --git a/packages/react-native-web/src/vendor/react-native/VirtualizedList/index.js b/packages/react-native-web/src/vendor/react-native/VirtualizedList/index.js index e92eb1e7..fd475c0e 100644 --- a/packages/react-native-web/src/vendor/react-native/VirtualizedList/index.js +++ b/packages/react-native-web/src/vendor/react-native/VirtualizedList/index.js @@ -1037,6 +1037,7 @@ class VirtualizedList extends React.PureComponent { _updateCellsToRenderBatcher: Batchinator; _viewabilityTuples: Array = []; + // $FlowFixMe _captureScrollRef = ref => { this._scrollRef = ref; }; @@ -1049,6 +1050,7 @@ class VirtualizedList extends React.PureComponent { ); } + // $FlowFixMe _defaultRenderScrollComponent = props => { const onRefresh = props.onRefresh; if (this._isNestedWithSameOrientation()) { @@ -1084,6 +1086,7 @@ class VirtualizedList extends React.PureComponent { } }; + // $FlowFixMe _onCellLayout(e, cellKey, index) { const layout = e.nativeEvent.layout; const next = { @@ -1190,14 +1193,17 @@ class VirtualizedList extends React.PureComponent { this._maybeCallOnEndReached(); }; + // $FlowFixMe _onLayoutEmpty = e => { this.props.onLayout && this.props.onLayout(e); }; + // $FlowFixMe _onLayoutFooter = e => { this._footerLength = this._selectLength(e.nativeEvent.layout); }; + // $FlowFixMe _onLayoutHeader = e => { this._headerLength = this._selectLength(e.nativeEvent.layout); }; @@ -1460,6 +1466,7 @@ class VirtualizedList extends React.PureComponent { } } + // $FlowFixMe _onScrollBeginDrag = (e): void => { this._nestedChildLists.forEach(childList => { childList.ref && childList.ref._onScrollBeginDrag(e); @@ -1471,6 +1478,7 @@ class VirtualizedList extends React.PureComponent { this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e); }; + // $FlowFixMe _onScrollEndDrag = (e): void => { const {velocity} = e.nativeEvent; if (velocity) { @@ -1480,6 +1488,7 @@ class VirtualizedList extends React.PureComponent { this.props.onScrollEndDrag && this.props.onScrollEndDrag(e); }; + // $FlowFixMe _onMomentumScrollEnd = (e): void => { this._scrollMetrics.velocity = 0; this._computeBlankness(); diff --git a/packages/react-native-web/src/vendor/react-native/VirtualizedSectionList/index.js b/packages/react-native-web/src/vendor/react-native/VirtualizedSectionList/index.js index de257221..e7d3cfe6 100644 --- a/packages/react-native-web/src/vendor/react-native/VirtualizedSectionList/index.js +++ b/packages/react-native-web/src/vendor/react-native/VirtualizedSectionList/index.js @@ -379,6 +379,7 @@ class VirtualizedSectionList< _cellRefs = {}; _listRef: VirtualizedList; + // $FlowFixMe _captureRef = ref => { /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment * suppresses an error when upgrading Flow's support for React. To see the diff --git a/yarn.lock b/yarn.lock index a1fd330c..126bf7b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6028,10 +6028,10 @@ flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" -flow-bin@0.98.0: - version "0.98.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.98.0.tgz#3361a03682326a83a5f0a864749f4f7f0d826bce" - integrity sha512-vuiYjBVt82eYF+dEk9Zqa8hTSDvbhl/czxzFRLZm9/XHbJnYNMTwFoNFYAQT9IQ6ACNBIbwSTIfxroieuKja7g== +flow-bin@^0.109.0: + version "0.109.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.109.0.tgz#dcdcb7402dd85b58200392d8716ccf14e5a8c24c" + integrity sha512-tpcMTpAGIRivYhFV3KJq+zHI2HzcXo8MoGe9pXS4G/UZuey2Faq/e8/gdph2WF0erRlML5hmwfwiq7v9c25c7w== flush-write-stream@^1.0.0: version "1.0.3"