Summary:
upgrades flow version

allow-large-files
bypass-lint

Reviewed By: nmote

Differential Revision: D14095305

fbshipit-source-id: 000b3b2e085f673bc443fc8bc1b3aae1b42df0e9
This commit is contained in:
Daniel Sainati 2019-02-15 12:01:04 -08:00 коммит произвёл Facebook Github Bot
Родитель cbf65f2cf4
Коммит 8da1f1149f
13 изменённых файлов: 8 добавлений и 141 удалений

Просмотреть файл

@ -98,4 +98,4 @@ untyped-import
untyped-type-import
[version]
^0.92.0
^0.93.0

Просмотреть файл

@ -98,4 +98,4 @@ untyped-import
untyped-type-import
[version]
^0.92.0
^0.93.0

Просмотреть файл

@ -1161,9 +1161,6 @@ const TextInput = createReactClass({
props.autoCapitalize = UIManager.getViewManagerConfig(
'AndroidTextInput',
).Constants.AutoCapitalizationType[props.autoCapitalize || 'sentences'];
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
let children = this.props.children;
let childCount = 0;
React.Children.forEach(children, () => ++childCount);

Просмотреть файл

@ -89,9 +89,6 @@ const TouchableBounce = ((createReactClass({
getInitialState: function(): State {
return {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
...this.touchableGetInitialState(),
scale: new Animated.Value(1),
};
@ -187,31 +184,13 @@ const TouchableBounce = ((createReactClass({
nativeID={this.props.nativeID}
testID={this.props.testID}
hitSlop={this.props.hitSlop}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
onResponderTerminationRequest={
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
this.touchableHandleResponderTerminationRequest
}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderGrant={this.touchableHandleResponderGrant}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderMove={this.touchableHandleResponderMove}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderRelease={this.touchableHandleResponderRelease}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderTerminate={this.touchableHandleResponderTerminate}>
{this.props.children}
{Touchable.renderDebugView({

Просмотреть файл

@ -203,15 +203,9 @@ const TouchableHighlight = ((createReactClass({
getDefaultProps: () => DEFAULT_PROPS,
getInitialState: function() {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this._isMounted = false;
if (this.props.testOnly_pressed) {
return {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
...this.touchableGetInitialState(),
extraChildStyle: {
opacity: this.props.activeOpacity,
@ -222,9 +216,6 @@ const TouchableHighlight = ((createReactClass({
};
} else {
return {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
...this.touchableGetInitialState(),
extraChildStyle: null,
extraUnderlayStyle: null,
@ -233,21 +224,12 @@ const TouchableHighlight = ((createReactClass({
},
componentDidMount: function() {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this._isMounted = true;
ensurePositiveDelayProps(this.props);
},
componentWillUnmount: function() {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this._isMounted = false;
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
clearTimeout(this._hideTimeout);
},
@ -265,22 +247,13 @@ const TouchableHighlight = ((createReactClass({
* defined on your component.
*/
touchableHandleActivePressIn: function(e: PressEvent) {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
clearTimeout(this._hideTimeout);
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this._hideTimeout = null;
this._showUnderlay();
this.props.onPressIn && this.props.onPressIn(e);
},
touchableHandleActivePressOut: function(e: PressEvent) {
/* $FlowFixMe(>=0.89.0 site=react_native_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._hideTimeout) {
this._hideUnderlay();
}
@ -302,15 +275,9 @@ const TouchableHighlight = ((createReactClass({
},
touchableHandlePress: function(e: PressEvent) {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
clearTimeout(this._hideTimeout);
if (!Platform.isTV) {
this._showUnderlay();
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
this._hideTimeout = setTimeout(
this._hideUnderlay,
this.props.delayPressOut,
@ -344,9 +311,6 @@ const TouchableHighlight = ((createReactClass({
},
_showUnderlay: function() {
/* $FlowFixMe(>=0.89.0 site=react_native_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._isMounted || !this._hasPressHandler()) {
return;
}
@ -362,13 +326,7 @@ const TouchableHighlight = ((createReactClass({
},
_hideUnderlay: function() {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
clearTimeout(this._hideTimeout);
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this._hideTimeout = null;
if (this.props.testOnly_pressed) {
return;
@ -409,31 +367,13 @@ const TouchableHighlight = ((createReactClass({
isTVSelectable={true}
tvParallaxProperties={this.props.tvParallaxProperties}
hasTVPreferredFocus={this.props.hasTVPreferredFocus}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
onResponderTerminationRequest={
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
this.touchableHandleResponderTerminationRequest
}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderGrant={this.touchableHandleResponderGrant}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderMove={this.touchableHandleResponderMove}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderRelease={this.touchableHandleResponderRelease}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderTerminate={this.touchableHandleResponderTerminate}
nativeID={this.props.nativeID}
testID={this.props.testID}>

Просмотреть файл

@ -162,13 +162,7 @@ const TouchableOpacity = ((createReactClass({
getInitialState: function() {
return {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
...this.touchableGetInitialState(),
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
anim: new Animated.Value(this._getChildStyleOpacityWithDefault()),
};
},
@ -266,9 +260,6 @@ const TouchableOpacity = ((createReactClass({
},
_opacityInactive: function(duration: number) {
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
this.setOpacityTo(this._getChildStyleOpacityWithDefault(), duration);
},
@ -293,31 +284,13 @@ const TouchableOpacity = ((createReactClass({
hasTVPreferredFocus={this.props.hasTVPreferredFocus}
tvParallaxProperties={this.props.tvParallaxProperties}
hitSlop={this.props.hitSlop}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
onResponderTerminationRequest={
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
this.touchableHandleResponderTerminationRequest
}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderGrant={this.touchableHandleResponderGrant}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderMove={this.touchableHandleResponderMove}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderRelease={this.touchableHandleResponderRelease}
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
onResponderTerminate={this.touchableHandleResponderTerminate}>
{this.props.children}
{Touchable.renderDebugView({

Просмотреть файл

@ -290,9 +290,6 @@ const JSTimers = {
* @param {function} func Callback to be invoked before the end of the
* current JavaScript execution loop.
*/
/* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an
* error found when Flow v0.79 was deployed. To see the error delete this
* comment and run Flow. */
setImmediate: function(func: Function, ...args: any) {
const id = _allocateCallback(
() => func.apply(undefined, args),
@ -305,9 +302,6 @@ const JSTimers = {
/**
* @param {function} func Callback to be invoked every frame.
*/
/* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an
* error found when Flow v0.79 was deployed. To see the error delete this
* comment and run Flow. */
requestAnimationFrame: function(func: Function) {
const id = _allocateCallback(func, 'requestAnimationFrame');
Timing.createTimer(id, 1, Date.now(), /* recurring */ false);
@ -319,9 +313,6 @@ const JSTimers = {
* with time remaining in frame.
* @param {?object} options
*/
/* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an
* error found when Flow v0.79 was deployed. To see the error delete this
* comment and run Flow. */
requestIdleCallback: function(func: Function, options: ?Object) {
if (requestIdleCallbacks.length === 0) {
Timing.setSendIdleEvents(true);

Просмотреть файл

@ -21,7 +21,6 @@ class InternalListViewType<Props> extends React.Component<Props> {
flashScrollIndicators() {}
getScrollResponder(): any {}
getScrollableNode(): any {}
// $FlowFixMe
getMetrics(): Object {}
scrollTo(...args: Array<mixed>) {}
scrollToEnd(options?: ?{animated?: ?boolean}) {}

Просмотреть файл

@ -290,9 +290,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this._scrollRef.scrollTo(
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
this.props.horizontal ? {x: offset, animated} : {y: offset, animated},
);
}
@ -341,9 +338,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this._scrollRef.scrollTo(
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
horizontal ? {x: offset, animated} : {y: offset, animated},
);
}
@ -382,9 +376,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
* suppresses an error when upgrading Flow's support for React. To see the
* error delete this comment and run Flow. */
this._scrollRef.scrollTo(
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for React.
* To see the error delete this comment and run Flow. */
this.props.horizontal ? {x: offset, animated} : {y: offset, animated},
);
}

Просмотреть файл

@ -17,9 +17,6 @@ const {ScrollView, StyleSheet, Text, TouchableOpacity} = ReactNative;
const NUM_ITEMS = 20;
class ScrollViewSimpleExample extends React.Component<{}> {
/* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.85 was deployed. To see the error, delete this comment
* and run Flow. */
makeItems = (nItems: number, styles): Array<any> => {
const items = [];
for (let i = 0; i < nItems; i++) {

Просмотреть файл

@ -200,7 +200,7 @@
"eslint-plugin-react": "7.8.2",
"eslint-plugin-react-hooks": "^1.0.1",
"eslint-plugin-react-native": "3.5.0",
"flow-bin": "^0.92.0",
"flow-bin": "^0.93.0",
"jest": "24.0.0-alpha.6",
"jest-junit": "6.3.0",
"jscodeshift": "^0.6.2",

Просмотреть файл

@ -66,4 +66,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
[version]
^0.92.0
^0.93.0

Просмотреть файл

@ -2801,10 +2801,10 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2"
write "^0.2.1"
flow-bin@^0.92.0:
version "0.92.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.92.0.tgz#f5bf3e808b17b480e067ac673829ca715a168bea"
integrity sha512-3ErXSAXZZlLV5/QPlaUDCWlDUXop1SiH32ifXL3SEiBwsmGbudCLim+HFVZfkegrn1nB4TcNSkMWtW8SnMPyAQ==
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-parser@0.*:
version "0.89.0"