diff --git a/.flowconfig b/.flowconfig index 7b6a007cf..fc9fe6762 100644 --- a/.flowconfig +++ b/.flowconfig @@ -46,12 +46,12 @@ suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-8]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-8]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError unsafe.enable_getters_and_setters=true [version] -^0.58.0 +^0.59.0 diff --git a/Libraries/Animated/src/Easing.js b/Libraries/Animated/src/Easing.js index 7b396ea4c..ddd86557c 100644 --- a/Libraries/Animated/src/Easing.js +++ b/Libraries/Animated/src/Easing.js @@ -62,6 +62,10 @@ class Easing { /** * A stepping function, returns 1 for any positive value of `n`. */ + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static step0(n) { return n > 0 ? 1 : 0; } @@ -69,6 +73,10 @@ class Easing { /** * A stepping function, returns 1 if `n` is greater than or equal to 1. */ + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static step1(n) { return n >= 1 ? 1 : 0; } @@ -79,6 +87,10 @@ class Easing { * * http://cubic-bezier.com/#0,0,1,1 */ + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static linear(t) { return t; } @@ -102,6 +114,10 @@ class Easing { * * http://easings.net/#easeInQuad */ + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static quad(t) { return t * t; } @@ -112,6 +128,10 @@ class Easing { * * http://easings.net/#easeInCubic */ + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static cubic(t) { return t * t * t; } @@ -122,7 +142,16 @@ class Easing { * n = 4: http://easings.net/#easeInQuart * n = 5: http://easings.net/#easeInQuint */ + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static poly(n) { + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an + * error caught by Flow 0.59 which was not caught before. Most likely, this + * error is because an exported function parameter is missing an + * annotation. Without an annotation, these parameters are uncovered by + * Flow. */ return (t) => Math.pow(t, n); } @@ -131,6 +160,10 @@ class Easing { * * http://easings.net/#easeInSine */ + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static sin(t) { return 1 - Math.cos(t * Math.PI / 2); } @@ -140,6 +173,10 @@ class Easing { * * http://easings.net/#easeInCirc */ + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static circle(t) { return 1 - Math.sqrt(1 - t * t); } @@ -149,6 +186,10 @@ class Easing { * * http://easings.net/#easeInExpo */ + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static exp(t) { return Math.pow(2, 10 * (t - 1)); } diff --git a/Libraries/CameraRoll/CameraRoll.js b/Libraries/CameraRoll/CameraRoll.js index 66d8bd3eb..b9da61a56 100644 --- a/Libraries/CameraRoll/CameraRoll.js +++ b/Libraries/CameraRoll/CameraRoll.js @@ -255,6 +255,10 @@ class CameraRoll { * } * ``` */ + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static getPhotos(params) { if (__DEV__) { checkPropTypes( diff --git a/Libraries/Experimental/WindowedListView.js b/Libraries/Experimental/WindowedListView.js index 05e16ee7b..afbff25a4 100644 --- a/Libraries/Experimental/WindowedListView.js +++ b/Libraries/Experimental/WindowedListView.js @@ -176,6 +176,11 @@ class WindowedListView extends React.Component { maxNumToRender: 30, numToRenderAhead: 10, viewablePercentThreshold: 50, + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an + * error caught by Flow 0.59 which was not caught before. Most likely, this + * error is because an exported function parameter is missing an + * annotation. Without an annotation, these parameters are uncovered by + * Flow. */ renderScrollComponent: (props) => , disableIncrementalRendering: false, recomputeRowsBatchingPeriod: 10, // This should capture most events that happen within a frame diff --git a/Libraries/Lists/ListView/__mocks__/ListViewMock.js b/Libraries/Lists/ListView/__mocks__/ListViewMock.js index 2c27303d7..732dc5e1c 100644 --- a/Libraries/Lists/ListView/__mocks__/ListViewMock.js +++ b/Libraries/Lists/ListView/__mocks__/ListViewMock.js @@ -19,6 +19,11 @@ const StaticRenderer = require('StaticRenderer'); class ListViewMock extends React.Component<$FlowFixMeProps> { static latestRef: ?ListViewMock; static defaultProps = { + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an + * error caught by Flow 0.59 which was not caught before. Most likely, this + * error is because an exported function parameter is missing an + * annotation. Without an annotation, these parameters are uncovered by + * Flow. */ renderScrollComponent: props => , }; componentDidMount() { diff --git a/Libraries/Share/Share.js b/Libraries/Share/Share.js index 457cf4a96..44d743321 100644 --- a/Libraries/Share/Share.js +++ b/Libraries/Share/Share.js @@ -111,13 +111,13 @@ class Share { /** * The content was successfully shared. */ - static get sharedAction() { return 'sharedAction'; } + static get sharedAction(): string { return 'sharedAction'; } /** * The dialog has been dismissed. * @platform ios */ - static get dismissedAction() { return 'dismissedAction'; } + static get dismissedAction(): string { return 'dismissedAction'; } } diff --git a/Libraries/StyleSheet/StyleSheetValidation.js b/Libraries/StyleSheet/StyleSheetValidation.js index c2ee260c8..dadf735dd 100644 --- a/Libraries/StyleSheet/StyleSheetValidation.js +++ b/Libraries/StyleSheet/StyleSheetValidation.js @@ -24,6 +24,10 @@ var invariant = require('fbjs/lib/invariant'); const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; class StyleSheetValidation { + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static validateStyleProp(prop, style, caller) { if (!__DEV__) { return; @@ -59,6 +63,10 @@ class StyleSheetValidation { } } + /* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error + * caught by Flow 0.59 which was not caught before. Most likely, this error + * is because an exported function parameter is missing an annotation. + * Without an annotation, these parameters are uncovered by Flow. */ static validateStyle(name, styles) { if (!__DEV__) { return; diff --git a/local-cli/templates/HelloWorld/_flowconfig b/local-cli/templates/HelloWorld/_flowconfig index d834b9370..9a069e497 100644 --- a/local-cli/templates/HelloWorld/_flowconfig +++ b/local-cli/templates/HelloWorld/_flowconfig @@ -37,12 +37,12 @@ suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-8]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-8]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError unsafe.enable_getters_and_setters=true [version] -^0.58.0 +^0.59.0 diff --git a/package.json b/package.json index 364ce0fa0..22e3f8ad3 100644 --- a/package.json +++ b/package.json @@ -208,7 +208,7 @@ "eslint-plugin-flowtype": "^2.33.0", "eslint-plugin-prettier": "2.1.1", "eslint-plugin-react": "^7.2.1", - "flow-bin": "^0.58.0", + "flow-bin": "^0.59.0", "jest": "21.3.0-beta.8", "prettier": "1.7.0", "react": "16.0.0",