Skip to content

Commit

Permalink
Deploy v0.89
Browse files Browse the repository at this point in the history
Reviewed By: jbrown215

Differential Revision: D13457087

fbshipit-source-id: 9f01371ae3515990c5595f1eb2361174050066b8
  • Loading branch information
gabelevi authored and facebook-github-bot committed Dec 14, 2018
1 parent ac30f64 commit 24f8d4d
Show file tree
Hide file tree
Showing 26 changed files with 247 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ untyped-import
untyped-type-import

[version]
^0.88.0
^0.89.0
2 changes: 1 addition & 1 deletion .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ untyped-import
untyped-type-import

[version]
^0.88.0
^0.89.0
7 changes: 6 additions & 1 deletion Libraries/Components/ActivityIndicator/ActivityIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ const ActivityIndicator = (
);
};

// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const ActivityIndicatorWithRef = React.forwardRef(ActivityIndicator);
ActivityIndicatorWithRef.displayName = 'ActivityIndicator';

/* $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. */
ActivityIndicatorWithRef.defaultProps = {
animating: true,
color: Platform.OS === 'ios' ? GRAY : null,
Expand All @@ -136,4 +138,7 @@ const styles = StyleSheet.create({
},
});

/* $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. */
module.exports = (ActivityIndicatorWithRef: Class<NativeComponent<Props>>);
4 changes: 3 additions & 1 deletion Libraries/Components/CheckBox/CheckBox.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,11 @@ const styles = StyleSheet.create({
*/
type CheckBoxType = Class<NativeComponent<Props>>;

// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const CheckBoxWithRef = React.forwardRef(function CheckBoxWithRef(props, ref) {
return <CheckBox {...props} forwardedRef={ref} />;
});

/* $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. */
module.exports = (CheckBoxWithRef: CheckBoxType);
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,20 @@ const ProgressBarAndroid = (
return <AndroidProgressBar {...props} ref={forwardedRef} />;
};

// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const ProgressBarAndroidToExport = React.forwardRef(ProgressBarAndroid);

/* $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. */
ProgressBarAndroidToExport.defaultProps = {
styleAttr: 'Normal',
indeterminate: true,
animating: 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. */
module.exports = (ProgressBarAndroidToExport: Class<
NativeComponent<ProgressBarAndroidProps>,
>);
4 changes: 3 additions & 1 deletion Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ const styles = StyleSheet.create({
},
});

// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const ProgressViewIOSWithRef = React.forwardRef(ProgressViewIOS);

/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
module.exports = (ProgressViewIOSWithRef: NativeProgressViewIOS);
4 changes: 2 additions & 2 deletions Libraries/Components/ScrollView/ScrollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ export type Props = $ReadOnly<{|
* - `false`, deprecated, use 'never' instead
* - `true`, deprecated, use 'always' instead
*/
/* $FlowFixMe(>=0.86.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.86 was deployed. To see the error, delete this comment
/* $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. */
keyboardShouldPersistTaps?: ?('always' | 'never' | 'handled' | false | true),
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ const styles = StyleSheet.create({
},
});

// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const SegmentedControlIOSWithRef = React.forwardRef(
(
props: SegmentedControlIOSProps,
Expand All @@ -137,4 +136,7 @@ const SegmentedControlIOSWithRef = React.forwardRef(
},
);

/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
module.exports = (SegmentedControlIOSWithRef: NativeSegmentedControlIOS);
7 changes: 6 additions & 1 deletion Libraries/Components/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,11 @@ const Slider = (
);
};

// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const SliderWithRef = React.forwardRef(Slider);

/* $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. */
SliderWithRef.defaultProps = {
disabled: false,
value: 0,
Expand All @@ -274,4 +276,7 @@ if (Platform.OS === 'ios') {
});
}

/* $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. */
module.exports = (SliderWithRef: Class<ReactNative.NativeComponent<Props>>);
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ class ToolbarAndroid extends React.Component<Props> {
}
}

// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
const ToolbarAndroidToExport = React.forwardRef(
(
props: ToolbarAndroidProps,
Expand All @@ -246,6 +245,9 @@ const ToolbarAndroidToExport = React.forwardRef(
},
);

/* $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. */
module.exports = (ToolbarAndroidToExport: Class<
NativeComponent<ToolbarAndroidProps>,
>);
24 changes: 24 additions & 0 deletions Libraries/Components/Touchable/TouchableBounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ const TouchableBounce = ((createReactClass({
mixins: [Touchable.Mixin.withoutDefaultFocusAndBlur, NativeMethodsMixin],

propTypes: {
/* $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. */
...TouchableWithoutFeedback.propTypes,
// The function passed takes a callback to start the animation which should
// be run after this onPress handler is done. You can use this (for example)
Expand Down Expand Up @@ -86,6 +89,9 @@ 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),
};
Expand Down Expand Up @@ -181,13 +187,31 @@ 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({
Expand Down
63 changes: 63 additions & 0 deletions Libraries/Components/Touchable/TouchableHighlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ type Props = $ReadOnly<{|
const TouchableHighlight = ((createReactClass({
displayName: 'TouchableHighlight',
propTypes: {
/* $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. */
...TouchableWithoutFeedback.propTypes,
/**
* Determines what the opacity of the wrapped view should be when touch is
Expand Down Expand Up @@ -200,9 +203,15 @@ 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,
Expand All @@ -213,6 +222,9 @@ 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,
Expand All @@ -221,12 +233,21 @@ 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);
},

Expand All @@ -244,13 +265,22 @@ 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();
}
Expand All @@ -272,9 +302,15 @@ 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,
Expand Down Expand Up @@ -308,6 +344,9 @@ 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;
}
Expand All @@ -323,7 +362,13 @@ 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;
Expand Down Expand Up @@ -364,13 +409,31 @@ 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}>
Expand Down
Loading

0 comments on commit 24f8d4d

Please sign in to comment.