Skip to content

Commit 63f9901

Browse files
Caleb Meredithfacebook-github-bot
authored andcommitted
Fix React Native open source
Reviewed By: hramos, TheSavior Differential Revision: D5728356 fbshipit-source-id: fb751d67c16ba9273de93d9b6d5acd65b1555dca
1 parent 2d0fe10 commit 63f9901

27 files changed

+257
-300
lines changed

IntegrationTests/IntegrationTestsApp.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ class IntegrationTestsApp extends React.Component<{}, $FlowFixMeState> {
5757
if (this.state.test) {
5858
return (
5959
<ScrollView>
60-
{/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses
61-
* an error when upgrading Flow's support for React. Common errors
62-
* found when upgrading Flow's React support are documented at
63-
* https://fburl.com/eq7bs81w */}
60+
{/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
61+
* comment suppresses an error when upgrading Flow's support for
62+
* React. To see the error delete this comment and run Flow. */}
6463
<this.state.test />
6564
</ScrollView>
6665
);

Libraries/Animated/src/AnimatedEvent.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ class AnimatedEvent {
144144
recMapping.setValue(recEvt);
145145
} else if (typeof recMapping === 'object') {
146146
for (const mappingKey in recMapping) {
147-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment
148-
* suppresses an error found when Flow v0.53 was deployed. To see
149-
* the error delete this comment and run Flow. */
147+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
148+
* comment suppresses an error when upgrading Flow's support for
149+
* React. To see the error delete this comment and run Flow. */
150150
traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey);
151151
}
152152
}

Libraries/Components/ActivityIndicator/ActivityIndicator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ type DefaultProps = {
3737
/**
3838
* Displays a circular loading indicator.
3939
*/
40-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an error
41-
* found when Flow v0.53 was deployed. To see the error delete this comment and
42-
* run Flow. */
40+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
41+
* suppresses an error when upgrading Flow's support for React. To see the
42+
* error delete this comment and run Flow. */
4343
const ActivityIndicator = createReactClass({
4444
displayName: 'ActivityIndicator',
4545
mixins: [NativeMethodsMixin],

Libraries/Components/CheckBox/CheckBox.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,9 @@ let CheckBox = createReactClass({
9797
<RCTCheckBox
9898
{...props}
9999
ref={ref => {
100-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
101-
* error when upgrading Flow's support for React. Common errors found
102-
* when upgrading Flow's React support are documented at
103-
* https://fburl.com/eq7bs81w */
100+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
101+
* comment suppresses an error when upgrading Flow's support for
102+
* React. To see the error delete this comment and run Flow. */
104103
this._rctCheckBox = ref;
105104
}}
106105
onChange={this._onChange}

Libraries/Components/ScrollView/ScrollView.js

Lines changed: 46 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,9 @@ const ScrollView = createReactClass({
548548
},
549549

550550
_getKeyForIndex: function(index, childArray) {
551-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
552-
* error found when Flow v0.53 was deployed. To see the error delete this
553-
* comment and run Flow. */
551+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
552+
* suppresses an error when upgrading Flow's support for React. To see the
553+
* error delete this comment and run Flow. */
554554
const child = childArray[index];
555555
return child && child.key;
556556
},
@@ -580,9 +580,9 @@ const ScrollView = createReactClass({
580580
if (!this.props.stickyHeaderIndices) {
581581
return;
582582
}
583-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
584-
* error found when Flow v0.53 was deployed. To see the error delete this
585-
* comment and run Flow. */
583+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
584+
* suppresses an error when upgrading Flow's support for React. To see the
585+
* error delete this comment and run Flow. */
586586
const childArray = React.Children.toArray(this.props.children);
587587
if (key !== this._getKeyForIndex(index, childArray)) {
588588
// ignore stale layout update
@@ -592,13 +592,13 @@ const ScrollView = createReactClass({
592592
const layoutY = event.nativeEvent.layout.y;
593593
this._headerLayoutYs.set(key, layoutY);
594594

595-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
596-
* error found when Flow v0.53 was deployed. To see the error delete this
597-
* comment and run Flow. */
595+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
596+
* suppresses an error when upgrading Flow's support for React. To see the
597+
* error delete this comment and run Flow. */
598598
const indexOfIndex = this.props.stickyHeaderIndices.indexOf(index);
599-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
600-
* error found when Flow v0.53 was deployed. To see the error delete this
601-
* comment and run Flow. */
599+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
600+
* suppresses an error when upgrading Flow's support for React. To see the
601+
* error delete this comment and run Flow. */
602602
const previousHeaderIndex = this.props.stickyHeaderIndices[indexOfIndex - 1];
603603
if (previousHeaderIndex != null) {
604604
const previousHeader = this._stickyHeaderRefs.get(
@@ -697,33 +697,34 @@ const ScrollView = createReactClass({
697697

698698
const {stickyHeaderIndices} = this.props;
699699
const hasStickyHeaders = stickyHeaderIndices && stickyHeaderIndices.length > 0;
700-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
701-
* error found when Flow v0.53 was deployed. To see the error delete this
702-
* comment and run Flow. */
700+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
701+
* suppresses an error when upgrading Flow's support for React. To see the
702+
* error delete this comment and run Flow. */
703703
const childArray = hasStickyHeaders && React.Children.toArray(this.props.children);
704704
const children = hasStickyHeaders ?
705-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
706-
* error found when Flow v0.53 was deployed. To see the error delete this
707-
* comment and run Flow. */
705+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
706+
* comment suppresses an error when upgrading Flow's support for React.
707+
* To see the error delete this comment and run Flow. */
708708
childArray.map((child, index) => {
709-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
710-
* error found when Flow v0.53 was deployed. To see the error delete
711-
* this comment and run Flow. */
709+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
710+
* comment suppresses an error when upgrading Flow's support for React.
711+
* To see the error delete this comment and run Flow. */
712712
const indexOfIndex = child ? stickyHeaderIndices.indexOf(index) : -1;
713713
if (indexOfIndex > -1) {
714714
const key = child.key;
715-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses
716-
* an error found when Flow v0.53 was deployed. To see the error
717-
* delete this comment and run Flow. */
715+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
716+
* comment suppresses an error when upgrading Flow's support for
717+
* React. To see the error delete this comment and run Flow. */
718718
const nextIndex = stickyHeaderIndices[indexOfIndex + 1];
719719
return (
720720
<ScrollViewStickyHeader
721721
key={key}
722722
ref={(ref) => this._setStickyHeaderRef(key, ref)}
723723
nextHeaderLayoutY={
724-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment
725-
* suppresses an error found when Flow v0.53 was deployed. To
726-
* see the error delete this comment and run Flow. */
724+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss)
725+
* This comment suppresses an error when upgrading Flow's
726+
* support for React. To see the error delete this comment and
727+
* run Flow. */
727728
this._headerLayoutYs.get(this._getKeyForIndex(nextIndex, childArray))
728729
}
729730
onLayout={(event) => this._onStickyHeaderLayout(index, event, key)}
@@ -735,17 +736,16 @@ const ScrollView = createReactClass({
735736
return child;
736737
}
737738
}) :
738-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
739-
* error found when Flow v0.53 was deployed. To see the error delete this
740-
* comment and run Flow. */
739+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
740+
* comment suppresses an error when upgrading Flow's support for React.
741+
* To see the error delete this comment and run Flow. */
741742
this.props.children;
742743
const contentContainer =
743744
<ScrollContentContainerViewClass
744745
{...contentSizeChangeProps}
745-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
746-
* error when upgrading Flow's support for React. Common errors found
747-
* when upgrading Flow's React support are documented at
748-
* https://fburl.com/eq7bs81w */
746+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
747+
* comment suppresses an error when upgrading Flow's support for React.
748+
* To see the error delete this comment and run Flow. */
749749
ref={this._setInnerViewRef}
750750
style={contentContainerStyle}
751751
removeClippedSubviews={
@@ -786,9 +786,9 @@ const ScrollView = createReactClass({
786786
onResponderGrant: this.scrollResponderHandleResponderGrant,
787787
onResponderReject: this.scrollResponderHandleResponderReject,
788788
onResponderRelease: this.scrollResponderHandleResponderRelease,
789-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
790-
* error found when Flow v0.53 was deployed. To see the error delete this
791-
* comment and run Flow. */
789+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
790+
* comment suppresses an error when upgrading Flow's support for React.
791+
* To see the error delete this comment and run Flow. */
792792
onResponderTerminate: this.scrollResponderHandleTerminate,
793793
onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest,
794794
onScroll: this._handleScroll,
@@ -818,10 +818,9 @@ const ScrollView = createReactClass({
818818
// On iOS the RefreshControl is a child of the ScrollView.
819819
// tvOS lacks native support for RefreshControl, so don't include it in that case
820820
return (
821-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses
822-
* an error when upgrading Flow's support for React. Common errors
823-
* found when upgrading Flow's React support are documented at
824-
* https://fburl.com/eq7bs81w */
821+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
822+
* comment suppresses an error when upgrading Flow's support for
823+
* React. To see the error delete this comment and run Flow. */
825824
<ScrollViewClass {...props} ref={this._setScrollViewRef}>
826825
{Platform.isTVOS ? null : refreshControl}
827826
{contentContainer}
@@ -837,21 +836,19 @@ const ScrollView = createReactClass({
837836
return React.cloneElement(
838837
refreshControl,
839838
{style: props.style},
840-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses
841-
* an error when upgrading Flow's support for React. Common errors
842-
* found when upgrading Flow's React support are documented at
843-
* https://fburl.com/eq7bs81w */
839+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
840+
* comment suppresses an error when upgrading Flow's support for
841+
* React. To see the error delete this comment and run Flow. */
844842
<ScrollViewClass {...props} style={baseStyle} ref={this._setScrollViewRef}>
845843
{contentContainer}
846844
</ScrollViewClass>
847845
);
848846
}
849847
}
850848
return (
851-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
852-
* error when upgrading Flow's support for React. Common errors found
853-
* when upgrading Flow's React support are documented at
854-
* https://fburl.com/eq7bs81w */
849+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
850+
* comment suppresses an error when upgrading Flow's support for React.
851+
* To see the error delete this comment and run Flow. */
855852
<ScrollViewClass {...props} ref={this._setScrollViewRef}>
856853
{contentContainer}
857854
</ScrollViewClass>

Libraries/Components/Switch/Switch.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ var Switch = createReactClass({
9393
this._rctSwitch.setNativeProps({value: this.props.value});
9494
}
9595
//Change the props after the native props are set in case the props change removes the component
96-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
97-
* error found when Flow v0.53 was deployed. To see the error delete this
98-
* comment and run Flow. */
96+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
97+
* suppresses an error when upgrading Flow's support for React. To see the
98+
* error delete this comment and run Flow. */
9999
this.props.onChange && this.props.onChange(event);
100100
this.props.onValueChange && this.props.onValueChange(event.nativeEvent.value);
101101
},
@@ -115,10 +115,9 @@ var Switch = createReactClass({
115115
return (
116116
<RCTSwitch
117117
{...props}
118-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
119-
* error when upgrading Flow's support for React. Common errors found
120-
* when upgrading Flow's React support are documented at
121-
* https://fburl.com/eq7bs81w */
118+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
119+
* comment suppresses an error when upgrading Flow's support for React.
120+
* To see the error delete this comment and run Flow. */
122121
ref={(ref) => { this._rctSwitch = ref; }}
123122
onChange={this._onChange}
124123
/>

Libraries/Components/TextInput/TextInput.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,9 @@ const TextInput = createReactClass({
734734
}
735735
props.autoCapitalize =
736736
UIManager.AndroidTextInput.Constants.AutoCapitalizationType[this.props.autoCapitalize];
737-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
738-
* error found when Flow v0.53 was deployed. To see the error delete this
739-
* comment and run Flow. */
737+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
738+
* suppresses an error when upgrading Flow's support for React. To see the
739+
* error delete this comment and run Flow. */
740740
var children = this.props.children;
741741
var childCount = 0;
742742
React.Children.forEach(children, () => ++childCount);
@@ -897,9 +897,9 @@ const TextInput = createReactClass({
897897
},
898898

899899
_onTextInput: function(event: Event) {
900-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
901-
* error found when Flow v0.53 was deployed. To see the error delete this
902-
* comment and run Flow. */
900+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
901+
* suppresses an error when upgrading Flow's support for React. To see the
902+
* error delete this comment and run Flow. */
903903
this.props.onTextInput && this.props.onTextInput(event);
904904
},
905905

Libraries/Components/Touchable/TouchableBounce.js

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -139,36 +139,30 @@ var TouchableBounce = createReactClass({
139139
render: function(): React.Element<any> {
140140
return (
141141
<Animated.View
142-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
143-
* error when upgrading Flow's support for React. Common errors found
144-
* when upgrading Flow's React support are documented at
145-
* https://fburl.com/eq7bs81w */
142+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
143+
* comment suppresses an error when upgrading Flow's support for React.
144+
* To see the error delete this comment and run Flow. */
146145
style={[{transform: [{scale: this.state.scale}]}, this.props.style]}
147146
accessible={this.props.accessible !== false}
148-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
149-
* error when upgrading Flow's support for React. Common errors found
150-
* when upgrading Flow's React support are documented at
151-
* https://fburl.com/eq7bs81w */
147+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
148+
* comment suppresses an error when upgrading Flow's support for React.
149+
* To see the error delete this comment and run Flow. */
152150
accessibilityLabel={this.props.accessibilityLabel}
153-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
154-
* error when upgrading Flow's support for React. Common errors found
155-
* when upgrading Flow's React support are documented at
156-
* https://fburl.com/eq7bs81w */
151+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
152+
* comment suppresses an error when upgrading Flow's support for React.
153+
* To see the error delete this comment and run Flow. */
157154
accessibilityComponentType={this.props.accessibilityComponentType}
158-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
159-
* error when upgrading Flow's support for React. Common errors found
160-
* when upgrading Flow's React support are documented at
161-
* https://fburl.com/eq7bs81w */
155+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
156+
* comment suppresses an error when upgrading Flow's support for React.
157+
* To see the error delete this comment and run Flow. */
162158
accessibilityTraits={this.props.accessibilityTraits}
163-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
164-
* error when upgrading Flow's support for React. Common errors found
165-
* when upgrading Flow's React support are documented at
166-
* https://fburl.com/eq7bs81w */
159+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
160+
* comment suppresses an error when upgrading Flow's support for React.
161+
* To see the error delete this comment and run Flow. */
167162
nativeID={this.props.nativeID}
168-
/* $FlowFixMe(>=0.53.0 site=react_native_fb) This comment suppresses an
169-
* error when upgrading Flow's support for React. Common errors found
170-
* when upgrading Flow's React support are documented at
171-
* https://fburl.com/eq7bs81w */
163+
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
164+
* comment suppresses an error when upgrading Flow's support for React.
165+
* To see the error delete this comment and run Flow. */
172166
testID={this.props.testID}
173167
hitSlop={this.props.hitSlop}
174168
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}

0 commit comments

Comments
 (0)