From 0fde81c816ca19d9bd70b06986105c955628cd1d Mon Sep 17 00:00:00 2001 From: Ian Childs Date: Wed, 6 Jul 2016 09:28:47 -0700 Subject: [PATCH] Reverted commit D3518381 Reviewed By: gabelevi Differential Revision: D3518381 fbshipit-source-id: 645c25191d5e7cff7689bd4dc583c478eba46496 --- .flowconfig | 14 +++----------- .../NavigationTransitioner-AnimatedView-example.js | 2 +- Examples/UIExplorer/WebSocketExample.js | 9 +-------- Libraries/BugReporting/dumpReactTree.js | 1 - Libraries/CameraRoll/CameraRoll.js | 1 - .../NavigationCardStackStyleInterpolator.js | 12 ++++++------ .../NavigationHeaderStyleInterpolator.js | 8 ++++---- .../NavigationPagerStyleInterpolator.js | 2 +- Libraries/Experimental/WindowedListView.js | 2 -- Libraries/StyleSheet/StyleSheetTypes.js | 2 +- package.json | 2 +- 11 files changed, 18 insertions(+), 37 deletions(-) diff --git a/.flowconfig b/.flowconfig index 24a6c3ff7..0bbb11213 100644 --- a/.flowconfig +++ b/.flowconfig @@ -9,14 +9,6 @@ # Ignore malformed json .*/node_modules/y18n/test/.*\.json -# Ignore unexpected extra @providesModule -.*/node_modules/commoner/test/source/widget/share.js - -# Ignore duplicate module providers -/Libraries/react-native/React.js -/Libraries/react-native/ReactNative.js -/node_modules/jest-runtime/build/__tests__/.* - [include] [libs] @@ -40,9 +32,9 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-8]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-8]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy [version] -^0.28.0 +^0.27.0 diff --git a/Examples/UIExplorer/NavigationExperimental/NavigationTransitioner-AnimatedView-example.js b/Examples/UIExplorer/NavigationExperimental/NavigationTransitioner-AnimatedView-example.js index db1b088f5..31cafcb91 100644 --- a/Examples/UIExplorer/NavigationExperimental/NavigationTransitioner-AnimatedView-example.js +++ b/Examples/UIExplorer/NavigationExperimental/NavigationTransitioner-AnimatedView-example.js @@ -222,7 +222,7 @@ class ExampleScene extends Component { const width = layout.initWidth; const translateX = position.interpolate({ inputRange, - outputRange: ([width, 0, -10]: Array), + outputRange: [width, 0, -10], }); return { diff --git a/Examples/UIExplorer/WebSocketExample.js b/Examples/UIExplorer/WebSocketExample.js index d3400fdbc..c43079162 100644 --- a/Examples/UIExplorer/WebSocketExample.js +++ b/Examples/UIExplorer/WebSocketExample.js @@ -1,11 +1,4 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * * The examples provided by Facebook are for non-commercial testing and * evaluation purposes only. * @@ -88,7 +81,7 @@ function showValue(value) { if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && value instanceof ArrayBuffer) { - return `ArrayBuffer {${String(Array.from(new Uint8Array(value)))}}`; + return `ArrayBuffer {${Array.from(new Uint8Array(value))}}`; } return value; } diff --git a/Libraries/BugReporting/dumpReactTree.js b/Libraries/BugReporting/dumpReactTree.js index 06c734e3a..89a7d874c 100644 --- a/Libraries/BugReporting/dumpReactTree.js +++ b/Libraries/BugReporting/dumpReactTree.js @@ -101,7 +101,6 @@ function convertObject(object: Object, depth: number) { if (!first) { output += ', '; } - // $FlowFixMe(>=0.28.0) output += `${key}: ${convertValue(object[key], depth + 1)}`; first = false; } diff --git a/Libraries/CameraRoll/CameraRoll.js b/Libraries/CameraRoll/CameraRoll.js index 3d4a8b376..7ef596275 100644 --- a/Libraries/CameraRoll/CameraRoll.js +++ b/Libraries/CameraRoll/CameraRoll.js @@ -143,7 +143,6 @@ class CameraRoll { invariant( type === 'photo' || type === 'video' || type === undefined, - // $FlowFixMe(>=0.28.0) `The second argument to saveToCameraRoll must be 'photo' or 'video'. You passed ${type}` ); diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackStyleInterpolator.js b/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackStyleInterpolator.js index 77fa010e5..fb5a7f4dd 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackStyleInterpolator.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackStyleInterpolator.js @@ -90,18 +90,18 @@ function forHorizontal(props: NavigationSceneRendererProps): Object { const opacity = position.interpolate({ inputRange, - outputRange: ([1, 1, 0.3]: Array), + outputRange: [1, 1, 0.3], }); const scale = position.interpolate({ inputRange, - outputRange: ([1, 1, 0.95]: Array), + outputRange: [1, 1, 0.95], }); const translateY = 0; const translateX = position.interpolate({ inputRange, - outputRange: ([width, 0, -10]: Array), + outputRange: [width, 0, -10], }); return { @@ -131,18 +131,18 @@ function forVertical(props: NavigationSceneRendererProps): Object { const opacity = position.interpolate({ inputRange, - outputRange: ([1, 1, 0.3]: Array), + outputRange: [1, 1, 0.3], }); const scale = position.interpolate({ inputRange, - outputRange: ([1, 1, 0.95]: Array), + outputRange: [1, 1, 0.95], }); const translateX = 0; const translateY = position.interpolate({ inputRange, - outputRange: ([height, 0, -10]: Array), + outputRange: [height, 0, -10], }); return { diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderStyleInterpolator.js b/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderStyleInterpolator.js index fcc37c7a5..f6a0dbf51 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderStyleInterpolator.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderStyleInterpolator.js @@ -54,7 +54,7 @@ function forLeft(props: NavigationSceneRendererProps): Object { return { opacity: position.interpolate({ inputRange: [ index - 1, index, index + 1 ], - outputRange: ([ 0, 1, 0 ]: Array), + outputRange: [ 0, 1, 0 ], }), }; } @@ -65,13 +65,13 @@ function forCenter(props: NavigationSceneRendererProps): Object { return { opacity:position.interpolate({ inputRange: [ index - 1, index, index + 1 ], - outputRange: ([ 0, 1, 0 ]: Array), + outputRange: [ 0, 1, 0 ], }), transform: [ { translateX: position.interpolate({ inputRange: [ index - 1, index + 1 ], - outputRange: ([ 200, -200 ]: Array), + outputRange: [ 200, -200 ], }), } ], @@ -84,7 +84,7 @@ function forRight(props: NavigationSceneRendererProps): Object { return { opacity: position.interpolate({ inputRange: [ index - 1, index, index + 1 ], - outputRange: ([ 0, 1, 0 ]: Array), + outputRange: [ 0, 1, 0 ], }), }; } diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationPagerStyleInterpolator.js b/Libraries/CustomComponents/NavigationExperimental/NavigationPagerStyleInterpolator.js index 87a211b1a..78a9987ca 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationPagerStyleInterpolator.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationPagerStyleInterpolator.js @@ -91,7 +91,7 @@ function forHorizontal(props: NavigationSceneRendererProps): Object { const width = layout.initWidth; const translateX = position.interpolate({ inputRange, - outputRange: ([width, 0, -width]: Array), + outputRange: [width, 0, -width], }); return { diff --git a/Libraries/Experimental/WindowedListView.js b/Libraries/Experimental/WindowedListView.js index 2cef3471c..bec56ecbe 100644 --- a/Libraries/Experimental/WindowedListView.js +++ b/Libraries/Experimental/WindowedListView.js @@ -626,7 +626,6 @@ class CellRenderer extends React.Component { if (this.props.asyncRowPerfEventName) { this._perfUpdateID = g_perf_update_id++; this._asyncCookie = Systrace.beginAsyncEvent(this.props.asyncRowPerfEventName + this._perfUpdateID); - // $FlowFixMe(>=0.28.0) infoLog(`perf_asynctest_${this.props.asyncRowPerfEventName}_start ${this._perfUpdateID} ${Date.now()}`); } if (this.props.includeInLayout) { @@ -663,7 +662,6 @@ class CellRenderer extends React.Component { // Note this doesn't include the native render time but is more accurate than also including the JS render // time of anything that has been queued up. Systrace.endAsyncEvent(this.props.asyncRowPerfEventName + this._perfUpdateID, this._asyncCookie); - // $FlowFixMe(>=0.28.0) infoLog(`perf_asynctest_${this.props.asyncRowPerfEventName}_end ${this._perfUpdateID} ${Date.now()}`); } } diff --git a/Libraries/StyleSheet/StyleSheetTypes.js b/Libraries/StyleSheet/StyleSheetTypes.js index 515d3e614..779e64772 100644 --- a/Libraries/StyleSheet/StyleSheetTypes.js +++ b/Libraries/StyleSheet/StyleSheetTypes.js @@ -12,4 +12,4 @@ 'use strict'; type Atom = number | bool | Object | Array; -export type StyleObj = Atom; +export type StyleObj = Atom | Array; diff --git a/package.json b/package.json index 59f40476e..2961e17c4 100644 --- a/package.json +++ b/package.json @@ -196,7 +196,7 @@ "eslint-plugin-babel": "^3.2.0", "eslint-plugin-flow-vars": "^0.2.1", "eslint-plugin-react": "^4.2.1", - "flow-bin": "^0.28.0", + "flow-bin": "^0.27.0", "jest": "^13.1.0", "jest-repl": "^13.1.0", "jest-runtime": "^13.1.0",