diff --git a/.flowconfig b/.flowconfig index 3bd607320..1a8855278 100644 --- a/.flowconfig +++ b/.flowconfig @@ -48,11 +48,11 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-4]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-4]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy unsafe.enable_getters_and_setters=true [version] -^0.33.0 +^0.34.0 diff --git a/Libraries/Network/XMLHttpRequest.js b/Libraries/Network/XMLHttpRequest.js index a57ac3a9c..acb97f06a 100644 --- a/Libraries/Network/XMLHttpRequest.js +++ b/Libraries/Network/XMLHttpRequest.js @@ -22,25 +22,30 @@ type ResponseType = '' | 'arraybuffer' | 'blob' | 'document' | 'json' | 'text'; type Response = ?Object | string; type XHRInterceptor = { - requestSent: ( + requestSent( id: number, url: string, method: string, - headers: Object) => void, - responseReceived: ( + headers: Object + ): void, + responseReceived( id: number, url: string, status: number, - headers: Object) => void, - dataReceived: ( + headers: Object + ): void, + dataReceived( id: number, - data: string) => void, - loadingFinished: ( + data: string + ): void, + loadingFinished( id: number, - encodedDataLength: number) => void, - loadingFailed: ( + encodedDataLength: number + ): void, + loadingFailed( id: number, - error: string) => void, + error: string + ): void, }; const UNSENT = 0; diff --git a/Libraries/ReactNative/YellowBox.js b/Libraries/ReactNative/YellowBox.js index 2177924d8..cbf2e01ce 100644 --- a/Libraries/ReactNative/YellowBox.js +++ b/Libraries/ReactNative/YellowBox.js @@ -57,7 +57,7 @@ const _warningMap: Map = new Map(); if (__DEV__) { const {error, warn} = console; - console.error = function() { + (console: any).error = function() { error.apply(console, arguments); // Show yellow box for the `warning` module. if (typeof arguments[0] === 'string' && @@ -65,7 +65,7 @@ if (__DEV__) { updateWarningMap.apply(null, arguments); } }; - console.warn = function() { + (console: any).warn = function() { warn.apply(console, arguments); updateWarningMap.apply(null, arguments); }; diff --git a/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js b/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js index 8882f1131..0c0d2865b 100644 --- a/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js +++ b/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js @@ -31,8 +31,11 @@ type AttributeDiffer = (prevProp: mixed, nextProp: mixed) => boolean; type AttributePreprocessor = (nextProp: mixed) => mixed; type CustomAttributeConfiguration = + // $FlowFixMe(>=0.34.0) { diff: AttributeDiffer, process: AttributePreprocessor } | + // $FlowFixMe(>=0.34.0) { diff: AttributeDiffer } | + // $FlowFixMe(>=0.34.0) { process: AttributePreprocessor }; type AttributeConfiguration = diff --git a/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js b/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js index 93839caed..e981a69fb 100644 --- a/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js +++ b/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js @@ -73,6 +73,7 @@ function ChildReconciler(shouldClone) { return clone; } const child = createFiberFromElement(element, priority); + // $FlowFixMe(>=0.34.0) previousSibling.sibling = child; child.return = returnFiber; return child; diff --git a/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js b/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js index a73390955..66d9c4010 100644 --- a/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js +++ b/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js @@ -245,6 +245,7 @@ exports.createFiberFromElement = function(element : ReactElement<*>, priorityLev return fiber; }; +// $FlowFixMe(>=0.34.0) function createFiberFromElementType(type : mixed, key : null | string) { let fiber; if (typeof type === 'function') { diff --git a/Libraries/Text/TextStylePropTypes.js b/Libraries/Text/TextStylePropTypes.js index 5058d01c7..d87479d81 100644 --- a/Libraries/Text/TextStylePropTypes.js +++ b/Libraries/Text/TextStylePropTypes.js @@ -18,14 +18,18 @@ var ViewStylePropTypes = require('ViewStylePropTypes'); // TODO: use spread instead of Object.assign/create after #6560135 is fixed var TextStylePropTypes = Object.assign(Object.create(ViewStylePropTypes), { color: ColorPropType, + // $FlowFixMe(>=0.34.0) fontFamily: ReactPropTypes.string, + // $FlowFixMe(>=0.34.0) fontSize: ReactPropTypes.number, + // $FlowFixMe(>=0.34.0) fontStyle: ReactPropTypes.oneOf(['normal', 'italic']), /** * Specifies font weight. The values 'normal' and 'bold' are supported for * most fonts. Not all fonts have a variant for each of the numeric values, * in that case the closest one is chosen. */ + // $FlowFixMe(>=0.34.0) fontWeight: ReactPropTypes.oneOf( ['normal' /*default*/, 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'] @@ -33,6 +37,7 @@ var TextStylePropTypes = Object.assign(Object.create(ViewStylePropTypes), { /** * @platform ios */ + // $FlowFixMe(>=0.34.0) fontVariant: ReactPropTypes.arrayOf( ReactPropTypes.oneOf([ 'small-caps', @@ -42,35 +47,43 @@ var TextStylePropTypes = Object.assign(Object.create(ViewStylePropTypes), { 'proportional-nums', ]) ), + // $FlowFixMe(>=0.34.0) textShadowOffset: ReactPropTypes.shape( {width: ReactPropTypes.number, height: ReactPropTypes.number} ), + // $FlowFixMe(>=0.34.0) textShadowRadius: ReactPropTypes.number, textShadowColor: ColorPropType, /** * @platform ios */ + // $FlowFixMe(>=0.34.0) letterSpacing: ReactPropTypes.number, + // $FlowFixMe(>=0.34.0) lineHeight: ReactPropTypes.number, /** * Specifies text alignment. The value 'justify' is only supported on iOS and * fallbacks to `left` on Android. */ + // $FlowFixMe(>=0.34.0) textAlign: ReactPropTypes.oneOf( ['auto' /*default*/, 'left', 'right', 'center', 'justify'] ), /** * @platform android */ + // $FlowFixMe(>=0.34.0) textAlignVertical: ReactPropTypes.oneOf( ['auto' /*default*/, 'top', 'bottom', 'center'] ), + // $FlowFixMe(>=0.34.0) textDecorationLine: ReactPropTypes.oneOf( ['none' /*default*/, 'underline', 'line-through', 'underline line-through'] ), /** * @platform ios */ + // $FlowFixMe(>=0.34.0) textDecorationStyle: ReactPropTypes.oneOf( ['solid' /*default*/, 'double', 'dotted','dashed'] ), @@ -81,6 +94,7 @@ var TextStylePropTypes = Object.assign(Object.create(ViewStylePropTypes), { /** * @platform ios */ + // $FlowFixMe(>=0.34.0) writingDirection: ReactPropTypes.oneOf( ['auto' /*default*/, 'ltr', 'rtl'] ), diff --git a/package.json b/package.json index f4a0e5fe9..63fb74dfe 100644 --- a/package.json +++ b/package.json @@ -162,6 +162,7 @@ "event-target-shim": "^1.0.5", "fbjs": "^0.8.5", "fbjs-scripts": "^0.7.0", + "flow-bin": "^0.34.0", "fs-extra": "^0.26.2", "glob": "^5.0.15", "graceful-fs": "^4.1.3", @@ -218,7 +219,7 @@ "eslint-plugin-babel": "^3.3.0", "eslint-plugin-flowtype": "^2.20.0", "eslint-plugin-react": "^6.4.1", - "flow-bin": "^0.33.0", + "flow-bin": "^0.34.0", "graphql": "0.6.2", "jest": "16.0.1", "jest-repl": "16.0.0",