From 93e58b2c961a1587557bfe5543196e4634cec385 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Tue, 5 Nov 2019 17:34:14 -0800 Subject: [PATCH] Suppressions for 0.111 Summary: still some generated files in www that need to land before we can release 0.111 here. drop-conflicts Changelog: [Internal] (Note: this ignores all push blocking failures!) Reviewed By: dsainati1 Differential Revision: D18278838 fbshipit-source-id: b20c3fefb3aab7c5fb614b33d846c7548184f49a --- Libraries/Animated/src/AnimatedImplementation.js | 9 +++++++++ Libraries/Components/Touchable/Touchable.js | 3 +++ .../Touchable/TouchableNativeFeedback.android.js | 3 +++ Libraries/Core/setUpDeveloperTools.js | 1 - Libraries/Core/setUpReactDevTools.js | 1 - Libraries/Lists/FlatList.js | 3 +++ Libraries/Lists/VirtualizedList.js | 15 +++++++++++++++ Libraries/Modal/Modal.js | 3 +++ .../PermissionsAndroid/PermissionsAndroid.js | 3 +++ Libraries/ReactNative/PaperUIManager.js | 3 +++ .../Utilities/registerGeneratedViewConfig.js | 9 +++++++++ RNTester/js/examples/FlatList/FlatListExample.js | 3 +++ .../TurboModule/SampleTurboModuleExample.js | 6 ++++++ .../src/cli/combine/combine-js-to-schema.js | 3 +++ 14 files changed, 63 insertions(+), 2 deletions(-) diff --git a/Libraries/Animated/src/AnimatedImplementation.js b/Libraries/Animated/src/AnimatedImplementation.js index 103d10ece60..9339044ce76 100644 --- a/Libraries/Animated/src/AnimatedImplementation.js +++ b/Libraries/Animated/src/AnimatedImplementation.js @@ -169,6 +169,9 @@ const spring = function( _startNativeLoop: function(iterations?: number): void { const singleConfig = {...config, iterations}; + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.111 was deployed. To see the error, + * delete this comment and run Flow. */ start(value, singleConfig); }, @@ -223,6 +226,9 @@ const timing = function( _startNativeLoop: function(iterations?: number): void { const singleConfig = {...config, iterations}; + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.111 was deployed. To see the error, + * delete this comment and run Flow. */ start(value, singleConfig); }, @@ -265,6 +271,9 @@ const decay = function( _startNativeLoop: function(iterations?: number): void { const singleConfig = {...config, iterations}; + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.111 was deployed. To see the error, + * delete this comment and run Flow. */ start(value, singleConfig); }, diff --git a/Libraries/Components/Touchable/Touchable.js b/Libraries/Components/Touchable/Touchable.js index 2aeb51ca539..d80153a7d15 100644 --- a/Libraries/Components/Touchable/Touchable.js +++ b/Libraries/Components/Touchable/Touchable.js @@ -950,6 +950,9 @@ const Touchable = { pointerEvents="none" style={[ styles.debug, + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.111 was deployed. To see the error, + * delete this comment and run Flow. */ { borderColor: hexColor.slice(0, -2) + '55', // More opaque backgroundColor: hexColor.slice(0, -2) + '0F', // Less opaque diff --git a/Libraries/Components/Touchable/TouchableNativeFeedback.android.js b/Libraries/Components/Touchable/TouchableNativeFeedback.android.js index 3fc301ec3c8..ae07343a264 100644 --- a/Libraries/Components/Touchable/TouchableNativeFeedback.android.js +++ b/Libraries/Components/Touchable/TouchableNativeFeedback.android.js @@ -346,6 +346,9 @@ const TouchableNativeFeedbackImpl = createReactClass({ : 'nativeBackgroundAndroid'; const childProps = { ...child.props, + /* $FlowFixMe(>=0.111.0 site=react_native_android_fb) This comment + * suppresses an error found when Flow v0.111 was deployed. To see the + * error, delete this comment and run Flow. */ [drawableProp]: this.props.background, accessible: this.props.accessible !== false, accessibilityLabel: this.props.accessibilityLabel, diff --git a/Libraries/Core/setUpDeveloperTools.js b/Libraries/Core/setUpDeveloperTools.js index fe8ea0ac550..4b0e9815ca9 100644 --- a/Libraries/Core/setUpDeveloperTools.js +++ b/Libraries/Core/setUpDeveloperTools.js @@ -63,7 +63,6 @@ if (__DEV__) { 'debug', ].forEach(level => { const originalFunction = console[level]; - // $FlowFixMe Overwrite console methods console[level] = function(...args) { HMRClient.log(level, args); originalFunction.apply(console, args); diff --git a/Libraries/Core/setUpReactDevTools.js b/Libraries/Core/setUpReactDevTools.js index df9cdf95cb6..084b2c7f577 100644 --- a/Libraries/Core/setUpReactDevTools.js +++ b/Libraries/Core/setUpReactDevTools.js @@ -11,7 +11,6 @@ 'use strict'; if (__DEV__) { - // $FlowFixMe Module is untyped const reactDevTools = require('react-devtools-core'); const connectToDevTools = () => { // not when debugging in chrome diff --git a/Libraries/Lists/FlatList.js b/Libraries/Lists/FlatList.js index 6d3c86debdb..a55deaaa030 100644 --- a/Libraries/Lists/FlatList.js +++ b/Libraries/Lists/FlatList.js @@ -559,6 +559,9 @@ class FlatList extends React.PureComponent, void> { }; return { + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.111 was deployed. To see the error, delete + * this comment and run Flow. */ [virtualizedListRenderKey]: (info: RenderItemProps) => { if (numColumns > 1) { const {item, index} = info; diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 0f116cd9f97..b62c81ad371 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -946,6 +946,9 @@ class VirtualizedList extends React.PureComponent { initBlock.offset - (this.props.initialScrollIndex ? 0 : initBlock.length); cells.push( + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment + * suppresses an error found when Flow v0.111 was deployed. To + * see the error, delete this comment and run Flow. */ , ); this._pushCells( @@ -960,6 +963,9 @@ class VirtualizedList extends React.PureComponent { this._getFrameMetricsApprox(first).offset - (stickyBlock.offset + stickyBlock.length); cells.push( + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment + * suppresses an error found when Flow v0.111 was deployed. To + * see the error, delete this comment and run Flow. */ , ); insertedStickySpacer = true; @@ -973,6 +979,9 @@ class VirtualizedList extends React.PureComponent { this._getFrameMetricsApprox(first).offset - (initBlock.offset + initBlock.length); cells.push( + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment + * suppresses an error found when Flow v0.111 was deployed. To see + * the error, delete this comment and run Flow. */ , ); } @@ -1007,6 +1016,9 @@ class VirtualizedList extends React.PureComponent { endFrame.length - (lastFrame.offset + lastFrame.length); cells.push( + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.111 was deployed. To see the error, + * delete this comment and run Flow. */ , ); } @@ -1211,6 +1223,9 @@ class VirtualizedList extends React.PureComponent { invariant( typeof props.refreshing === 'boolean', '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' + + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.111 was deployed. To see the error, + * delete this comment and run Flow. */ JSON.stringify(props.refreshing) + '`', ); diff --git a/Libraries/Modal/Modal.js b/Libraries/Modal/Modal.js index c442309fffb..8cc55ffe572 100644 --- a/Libraries/Modal/Modal.js +++ b/Libraries/Modal/Modal.js @@ -271,6 +271,9 @@ const styles = StyleSheet.create({ position: 'absolute', }, container: { + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.111 was deployed. To see the error, delete this + * comment and run Flow. */ [side]: 0, top: 0, flex: 1, diff --git a/Libraries/PermissionsAndroid/PermissionsAndroid.js b/Libraries/PermissionsAndroid/PermissionsAndroid.js index 6d1e60a8fa0..29c744181b8 100644 --- a/Libraries/PermissionsAndroid/PermissionsAndroid.js +++ b/Libraries/PermissionsAndroid/PermissionsAndroid.js @@ -216,6 +216,9 @@ class PermissionsAndroid { ...rationale, }; NativeDialogManagerAndroid.showAlert( + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment + * suppresses an error found when Flow v0.111 was deployed. To see + * the error, delete this comment and run Flow. */ options, () => reject(new Error('Error showing rationale')), () => diff --git a/Libraries/ReactNative/PaperUIManager.js b/Libraries/ReactNative/PaperUIManager.js index f93dec1ea55..146af3d2028 100644 --- a/Libraries/ReactNative/PaperUIManager.js +++ b/Libraries/ReactNative/PaperUIManager.js @@ -33,6 +33,9 @@ function getConstants(): Object { } const UIManagerJS = { + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.111 was deployed. To see the error, delete this + * comment and run Flow. */ ...NativeUIManager, getConstants(): Object { return getConstants(); diff --git a/Libraries/Utilities/registerGeneratedViewConfig.js b/Libraries/Utilities/registerGeneratedViewConfig.js index 45f92adb3ce..cad4622fb26 100644 --- a/Libraries/Utilities/registerGeneratedViewConfig.js +++ b/Libraries/Utilities/registerGeneratedViewConfig.js @@ -48,14 +48,23 @@ function registerGeneratedViewConfig( Commands: {}, bubblingEventTypes: { ...ReactNativeViewViewConfig.bubblingEventTypes, + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.111 was deployed. To see the error, delete + * this comment and run Flow. */ ...(viewConfig.bubblingEventTypes || {}), }, directEventTypes: { ...ReactNativeViewViewConfig.directEventTypes, + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.111 was deployed. To see the error, delete + * this comment and run Flow. */ ...(viewConfig.directEventTypes || {}), }, validAttributes: { ...ReactNativeViewViewConfig.validAttributes, + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.111 was deployed. To see the error, delete + * this comment and run Flow. */ ...(viewConfig.validAttributes || {}), }, }; diff --git a/RNTester/js/examples/FlatList/FlatListExample.js b/RNTester/js/examples/FlatList/FlatListExample.js index e241652f764..a633d4be928 100644 --- a/RNTester/js/examples/FlatList/FlatListExample.js +++ b/RNTester/js/examples/FlatList/FlatListExample.js @@ -210,6 +210,9 @@ class FlatListExample extends React.PureComponent { return { renderItem: undefined, + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.111 was deployed. To see the error, delete + * this comment and run Flow. */ [flatListPropKey]: ({item, separators}) => { return ( { _setResult(name, result) { this.setState(({testResults}) => ({ testResults: { + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.111 was deployed. To see the error, + * delete this comment and run Flow. */ ...testResults, + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.111 was deployed. To see the error, + * delete this comment and run Flow. */ [name]: {value: result, type: typeof result}, }, })); diff --git a/packages/react-native-codegen/src/cli/combine/combine-js-to-schema.js b/packages/react-native-codegen/src/cli/combine/combine-js-to-schema.js index c971b4ab975..e249a6d615d 100644 --- a/packages/react-native-codegen/src/cli/combine/combine-js-to-schema.js +++ b/packages/react-native-codegen/src/cli/combine/combine-js-to-schema.js @@ -26,6 +26,9 @@ function combineSchemas(files: Array): SchemaType { const schema = FlowParser.parseFile(filename); if (schema && schema.modules) { + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.111 was deployed. To see the error, + * delete this comment and run Flow. */ merged.modules = {...merged.modules, ...schema.modules}; } }