Skip to content

Commit

Permalink
Flow 0.59 xplat/js deploy
Browse files Browse the repository at this point in the history
Reviewed By: avikchaudhuri

Differential Revision: D6300238

fbshipit-source-id: a6839fa2a9bbc50c3832a3f5b1cac2a6d2bd96b7
  • Loading branch information
Caleb Meredith authored and facebook-github-bot committed Nov 11, 2017
1 parent 7fb3a92 commit eb0d647
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .flowconfig
Expand Up @@ -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
41 changes: 41 additions & 0 deletions Libraries/Animated/src/Easing.js
Expand Up @@ -62,13 +62,21 @@ 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;
}

/**
* 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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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);
}

Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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));
}
Expand Down
4 changes: 4 additions & 0 deletions Libraries/CameraRoll/CameraRoll.js
Expand Up @@ -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(
Expand Down
5 changes: 5 additions & 0 deletions Libraries/Experimental/WindowedListView.js
Expand Up @@ -176,6 +176,11 @@ class WindowedListView extends React.Component<Props, State> {
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) => <ScrollView {...props} />,
disableIncrementalRendering: false,
recomputeRowsBatchingPeriod: 10, // This should capture most events that happen within a frame
Expand Down
5 changes: 5 additions & 0 deletions Libraries/Lists/ListView/__mocks__/ListViewMock.js
Expand Up @@ -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 => <ScrollView {...props} />,
};
componentDidMount() {
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Share/Share.js
Expand Up @@ -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'; }

}

Expand Down
8 changes: 8 additions & 0 deletions Libraries/StyleSheet/StyleSheetValidation.js
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions local-cli/templates/HelloWorld/_flowconfig
Expand Up @@ -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
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down

0 comments on commit eb0d647

Please sign in to comment.