From 35d2dfcabf18fcebb9f25df5acec2abf688a6e8f Mon Sep 17 00:00:00 2001 From: George Zahariev Date: Wed, 6 Mar 2019 14:53:58 -0800 Subject: [PATCH] Deploy 0.94 to xplat Summary: Update Flow version in xplat (https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js) allow-large-files bypass-lint Reviewed By: nmote Differential Revision: D14317820 fbshipit-source-id: 07ec22c0745321db036f4e10a502009a4b640652 --- .flowconfig | 2 +- .flowconfig.android | 2 +- IntegrationTests/SimpleSnapshotTest.js | 3 --- .../websocket_integration_test_server.js | 3 --- .../Touchable/TouchableNativeFeedback.android.js | 9 --------- Libraries/Core/Devtools/parseErrorStack.js | 3 --- Libraries/Core/Devtools/setupDevtools.js | 3 --- Libraries/Core/Timers/JSTimers.js | 6 ------ Libraries/Experimental/IncrementalExample.js | 3 --- Libraries/Geolocation/Geolocation.js | 13 +++++-------- Libraries/Interaction/JSEventLoopWatchdog.js | 3 --- Libraries/Lists/FillRateHelper.js | 6 ------ Libraries/Lists/VirtualizedList.js | 3 --- Libraries/Network/XMLHttpRequest.js | 6 ------ Libraries/Promise.js | 6 ------ Libraries/ReactNative/AppRegistry.js | 3 --- Libraries/Utilities/binaryToBase64.js | 3 --- Libraries/WebSocket/WebSocket.js | 3 --- Libraries/promiseRejectionIsError.js | 3 --- Libraries/vendor/emitter/mixInEventEmitter.js | 3 --- RNTester/js/http_test_server.js | 3 --- RNTester/js/websocket_test_server.js | 3 --- jest/preprocessor.js | 6 ------ package.json | 2 +- template/_flowconfig | 2 +- yarn.lock | 8 ++++---- 26 files changed, 13 insertions(+), 97 deletions(-) diff --git a/.flowconfig b/.flowconfig index 9a8ca64d8..9c5e95b20 100644 --- a/.flowconfig +++ b/.flowconfig @@ -101,4 +101,4 @@ untyped-import untyped-type-import [version] -^0.93.0 +^0.94.0 diff --git a/.flowconfig.android b/.flowconfig.android index 992ba7e52..074ee5e22 100644 --- a/.flowconfig.android +++ b/.flowconfig.android @@ -101,4 +101,4 @@ untyped-import untyped-type-import [version] -^0.93.0 +^0.94.0 diff --git a/IntegrationTests/SimpleSnapshotTest.js b/IntegrationTests/SimpleSnapshotTest.js index fef837737..6ebf24fd2 100644 --- a/IntegrationTests/SimpleSnapshotTest.js +++ b/IntegrationTests/SimpleSnapshotTest.js @@ -12,9 +12,6 @@ const React = require('react'); const ReactNative = require('react-native'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const requestAnimationFrame = require('fbjs/lib/requestAnimationFrame'); const {StyleSheet, View} = ReactNative; diff --git a/IntegrationTests/websocket_integration_test_server.js b/IntegrationTests/websocket_integration_test_server.js index b3f3292da..6d4c2d277 100755 --- a/IntegrationTests/websocket_integration_test_server.js +++ b/IntegrationTests/websocket_integration_test_server.js @@ -13,9 +13,6 @@ /* eslint-env node */ -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const WebSocket = require('ws'); console.log(`\ diff --git a/Libraries/Components/Touchable/TouchableNativeFeedback.android.js b/Libraries/Components/Touchable/TouchableNativeFeedback.android.js index 46e7d2d9c..77b6e84ea 100644 --- a/Libraries/Components/Touchable/TouchableNativeFeedback.android.js +++ b/Libraries/Components/Touchable/TouchableNativeFeedback.android.js @@ -212,18 +212,9 @@ const TouchableNativeFeedback = createReactClass({ touchableHandleActivePressIn: function(e: PressEvent) { this.props.onPressIn && this.props.onPressIn(e); this._dispatchPressedStateChange(true); - /* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment - * suppresses an error found when Flow v0.89 was deployed. To see the - * error, delete this comment and run Flow. */ if (this.pressInLocation) { this._dispatchHotspotUpdate( - /* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment - * suppresses an error found when Flow v0.89 was deployed. To see the - * error, delete this comment and run Flow. */ this.pressInLocation.locationX, - /* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment - * suppresses an error found when Flow v0.89 was deployed. To see the - * error, delete this comment and run Flow. */ this.pressInLocation.locationY, ); } diff --git a/Libraries/Core/Devtools/parseErrorStack.js b/Libraries/Core/Devtools/parseErrorStack.js index ff308d1dd..a82663035 100644 --- a/Libraries/Core/Devtools/parseErrorStack.js +++ b/Libraries/Core/Devtools/parseErrorStack.js @@ -27,9 +27,6 @@ function parseErrorStack(e: ExtendedError): Array { return []; } - /* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an - * error found when Flow v0.54 was deployed. To see the error delete this - * comment and run Flow. */ const stacktraceParser = require('stacktrace-parser'); const stack = Array.isArray(e.stack) ? e.stack diff --git a/Libraries/Core/Devtools/setupDevtools.js b/Libraries/Core/Devtools/setupDevtools.js index 35b2a6ba5..d2b2a77db 100644 --- a/Libraries/Core/Devtools/setupDevtools.js +++ b/Libraries/Core/Devtools/setupDevtools.js @@ -17,9 +17,6 @@ let register = function() { if (__DEV__) { const AppState = require('AppState'); const WebSocket = require('WebSocket'); - /* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an - * error found when Flow v0.54 was deployed. To see the error delete this - * comment and run Flow. */ const reactDevTools = require('react-devtools-core'); const getDevServer = require('getDevServer'); diff --git a/Libraries/Core/Timers/JSTimers.js b/Libraries/Core/Timers/JSTimers.js index f91dc6035..32d667693 100644 --- a/Libraries/Core/Timers/JSTimers.js +++ b/Libraries/Core/Timers/JSTimers.js @@ -21,9 +21,6 @@ import type {ExtendedError} from 'parseErrorStack'; let _performanceNow = null; function performanceNow() { if (!_performanceNow) { - /* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an - * error found when Flow v0.54 was deployed. To see the error delete this - * comment and run Flow. */ _performanceNow = require('fbjs/lib/performanceNow'); } return _performanceNow(); @@ -102,9 +99,6 @@ function _allocateCallback(func: Function, type: JSTimerType): number { * recurring (setInterval). */ function _callTimer(timerID: number, frameTime: number, didTimeout: ?boolean) { - /* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an - * error found when Flow v0.54 was deployed. To see the error delete this - * comment and run Flow. */ require('fbjs/lib/warning')( timerID <= GUID, 'Tried to call timer with ID %s but no such timer exists.', diff --git a/Libraries/Experimental/IncrementalExample.js b/Libraries/Experimental/IncrementalExample.js index e63f59a99..1ae119649 100644 --- a/Libraries/Experimental/IncrementalExample.js +++ b/Libraries/Experimental/IncrementalExample.js @@ -27,9 +27,6 @@ const IncrementalPresenter = require('IncrementalPresenter'); const JSEventLoopWatchdog = require('JSEventLoopWatchdog'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const performanceNow = require('fbjs/lib/performanceNow'); InteractionManager.setDeadline(1000); diff --git a/Libraries/Geolocation/Geolocation.js b/Libraries/Geolocation/Geolocation.js index 943dc09f7..7cb2e9d03 100644 --- a/Libraries/Geolocation/Geolocation.js +++ b/Libraries/Geolocation/Geolocation.js @@ -15,9 +15,6 @@ const RCTLocationObserver = require('NativeModules').LocationObserver; const invariant = require('invariant'); const logError = require('logError'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const warning = require('fbjs/lib/warning'); const LocationEventEmitter = new NativeEventEmitter(RCTLocationObserver); @@ -48,11 +45,11 @@ type GeoOptions = { */ const Geolocation = { /* - * Sets configuration options that will be used in all location requests. - * - * See https://facebook.github.io/react-native/docs/geolocation.html#setrnconfiguration - * - */ + * Sets configuration options that will be used in all location requests. + * + * See https://facebook.github.io/react-native/docs/geolocation.html#setrnconfiguration + * + */ setRNConfiguration: function(config: GeoConfiguration) { if (RCTLocationObserver.setConfiguration) { RCTLocationObserver.setConfiguration(config); diff --git a/Libraries/Interaction/JSEventLoopWatchdog.js b/Libraries/Interaction/JSEventLoopWatchdog.js index 81919e657..0b9949f69 100644 --- a/Libraries/Interaction/JSEventLoopWatchdog.js +++ b/Libraries/Interaction/JSEventLoopWatchdog.js @@ -11,9 +11,6 @@ 'use strict'; const infoLog = require('infoLog'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const performanceNow = require('fbjs/lib/performanceNow'); type Handler = { diff --git a/Libraries/Lists/FillRateHelper.js b/Libraries/Lists/FillRateHelper.js index 92d04911e..8e47c55e2 100644 --- a/Libraries/Lists/FillRateHelper.js +++ b/Libraries/Lists/FillRateHelper.js @@ -10,13 +10,7 @@ 'use strict'; -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const performanceNow = require('fbjs/lib/performanceNow'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const warning = require('fbjs/lib/warning'); export type FillRateInfo = Info; diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index a97cb7128..9e9dbe16b 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -24,9 +24,6 @@ const ViewabilityHelper = require('ViewabilityHelper'); const flattenStyle = require('flattenStyle'); const infoLog = require('infoLog'); const invariant = require('invariant'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const warning = require('fbjs/lib/warning'); const {computeWindowedRenderLimits} = require('VirtualizeUtils'); diff --git a/Libraries/Network/XMLHttpRequest.js b/Libraries/Network/XMLHttpRequest.js index 2b6059f83..387626485 100644 --- a/Libraries/Network/XMLHttpRequest.js +++ b/Libraries/Network/XMLHttpRequest.js @@ -13,14 +13,8 @@ const EventTarget = require('event-target-shim'); const RCTNetworking = require('RCTNetworking'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const base64 = require('base64-js'); const invariant = require('invariant'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const warning = require('fbjs/lib/warning'); const BlobManager = require('BlobManager'); diff --git a/Libraries/Promise.js b/Libraries/Promise.js index 960834cd5..987b25611 100644 --- a/Libraries/Promise.js +++ b/Libraries/Promise.js @@ -18,9 +18,6 @@ Promise.prototype.finally = function(onSettled) { }; if (__DEV__) { - /* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an - * error found when Flow v0.54 was deployed. To see the error delete this - * comment and run Flow. */ require('promise/setimmediate/rejection-tracking').enable({ allRejections: true, onUnhandled: (id, error = {}) => { @@ -32,9 +29,6 @@ if (__DEV__) { message = Error.prototype.toString.call(error); stack = error.stack; } else { - /* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses - * an error found when Flow v0.54 was deployed. To see the error delete - * this comment and run Flow. */ message = require('pretty-format')(error); } diff --git a/Libraries/ReactNative/AppRegistry.js b/Libraries/ReactNative/AppRegistry.js index c401dec04..aaef5ac18 100644 --- a/Libraries/ReactNative/AppRegistry.js +++ b/Libraries/ReactNative/AppRegistry.js @@ -26,9 +26,6 @@ type TaskProvider = () => Task; type TaskCanceller = () => void; type TaskCancelProvider = () => TaskCanceller; -/* $FlowFixMe(>=0.90.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.90 was deployed. To see the error, delete this - * comment and run Flow. */ export type ComponentProvider = () => React$ComponentType; export type ComponentProviderInstrumentationHook = ( component: ComponentProvider, diff --git a/Libraries/Utilities/binaryToBase64.js b/Libraries/Utilities/binaryToBase64.js index 1c16a966c..430fd46be 100644 --- a/Libraries/Utilities/binaryToBase64.js +++ b/Libraries/Utilities/binaryToBase64.js @@ -10,9 +10,6 @@ 'use strict'; -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const base64 = require('base64-js'); function binaryToBase64(data: ArrayBuffer | $ArrayBufferView) { diff --git a/Libraries/WebSocket/WebSocket.js b/Libraries/WebSocket/WebSocket.js index 52cbbf6c2..8dcfef3f8 100644 --- a/Libraries/WebSocket/WebSocket.js +++ b/Libraries/WebSocket/WebSocket.js @@ -18,9 +18,6 @@ const NativeModules = require('NativeModules'); const Platform = require('Platform'); const WebSocketEvent = require('WebSocketEvent'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const base64 = require('base64-js'); const binaryToBase64 = require('binaryToBase64'); const invariant = require('invariant'); diff --git a/Libraries/promiseRejectionIsError.js b/Libraries/promiseRejectionIsError.js index d77dc13f7..c0baddd41 100644 --- a/Libraries/promiseRejectionIsError.js +++ b/Libraries/promiseRejectionIsError.js @@ -11,9 +11,6 @@ 'use strict'; require('Promise'); // make sure the default rejection handler is installed -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const rejectionTracking = require('promise/setimmediate/rejection-tracking'); module.exports = () => { diff --git a/Libraries/vendor/emitter/mixInEventEmitter.js b/Libraries/vendor/emitter/mixInEventEmitter.js index c30827ce0..d7edfe1d3 100644 --- a/Libraries/vendor/emitter/mixInEventEmitter.js +++ b/Libraries/vendor/emitter/mixInEventEmitter.js @@ -15,9 +15,6 @@ const EventEmitterWithHolding = require('EventEmitterWithHolding'); const EventHolder = require('EventHolder'); const invariant = require('invariant'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const keyOf = require('fbjs/lib/keyOf'); import type EmitterSubscription from 'EmitterSubscription'; diff --git a/RNTester/js/http_test_server.js b/RNTester/js/http_test_server.js index bd25e24cd..667177aa9 100755 --- a/RNTester/js/http_test_server.js +++ b/RNTester/js/http_test_server.js @@ -18,9 +18,6 @@ Test server for WebSocketExample This will set a cookie named "wstest" on the response of any incoming request. `); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const connect = require('connect'); const http = require('http'); diff --git a/RNTester/js/websocket_test_server.js b/RNTester/js/websocket_test_server.js index 32541bab5..da945e3ab 100755 --- a/RNTester/js/websocket_test_server.js +++ b/RNTester/js/websocket_test_server.js @@ -12,9 +12,6 @@ /* eslint-env node */ -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const WebSocket = require('ws'); const fs = require('fs'); diff --git a/jest/preprocessor.js b/jest/preprocessor.js index ef6909140..79af17267 100644 --- a/jest/preprocessor.js +++ b/jest/preprocessor.js @@ -13,13 +13,7 @@ 'use strict'; const {transformSync: babelTransformSync} = require('@babel/core'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const babelRegisterOnly = require('metro-babel-register'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const createCacheKeyFunction = require('fbjs-scripts/jest/createCacheKeyFunction'); const generate = require('@babel/generator').default; diff --git a/package.json b/package.json index be67df5ee..9092a0c38 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "eslint-plugin-react-hooks": "^1.0.1", "eslint-plugin-react-native": "3.5.0", "eslint-plugin-relay": "0.0.28", - "flow-bin": "^0.93.0", + "flow-bin": "^0.94.0", "jest": "24.1.0", "jest-junit": "6.3.0", "jscodeshift": "^0.6.2", diff --git a/template/_flowconfig b/template/_flowconfig index 82adc4930..7e9e9133d 100644 --- a/template/_flowconfig +++ b/template/_flowconfig @@ -66,4 +66,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError [version] -^0.93.0 +^0.94.0 diff --git a/yarn.lock b/yarn.lock index eb1e1f781..0d5d4b6b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2863,10 +2863,10 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.93.0: - version "0.93.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.93.0.tgz#9192a08d88db2a8da0ff55e42420f44539791430" - integrity sha512-p8yq4ocOlpyJgOEBEj0v0GzCP25c9WP0ilFQ8hXSbrTR7RPKuR+Whr+OitlVyp8ocdX0j1MrIwQ8x28dacy1pg== +flow-bin@^0.94.0: + version "0.94.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.94.0.tgz#b5d58fe7559705b73a18229f97edfc3ab6ffffcb" + integrity sha512-DYF7r9CJ/AksfmmB4+q+TyLMoeQPRnqtF1Pk7KY3zgfkB/nVuA3nXyzqgsIPIvnMSiFEXQcFK4z+iPxSLckZhQ== flow-parser@0.*: version "0.89.0"