Upgrade to Flow v0.88.0

Summary:
allow-large-files

https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js

Reviewed By: samwgoldman

Differential Revision: D13418170

fbshipit-source-id: 91ab0d2788c1061b8c81a39f8a017eedea48abe2
This commit is contained in:
Nat Mote 2018-12-11 19:57:03 -08:00 committed by Facebook Github Bot
parent 448a665286
commit aaa4a38fbc
9 changed files with 21 additions and 27 deletions

View File

@ -97,4 +97,4 @@ untyped-import
untyped-type-import
[version]
^0.87.0
^0.88.0

View File

@ -97,4 +97,4 @@ untyped-import
untyped-type-import
[version]
^0.87.0
^0.88.0

View File

@ -142,8 +142,14 @@ function setInContext(inst, path: Array<string | number>, value: any) {
function setIn(obj: Object, path: Array<string | number>, value: any) {
const last = path.pop();
/* $FlowFixMe(>=0.88.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.88 was deployed. To see the error, delete this comment
* and run Flow. */
const parent = path.reduce((obj_, attr) => (obj_ ? obj_[attr] : null), obj);
if (parent) {
/* $FlowFixMe(>=0.88.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.88 was deployed. To see the error, delete this
* comment and run Flow. */
parent[last] = value;
}
}

View File

@ -221,13 +221,7 @@ const NetInfo = {
removeEventListener(eventName: ChangeEventName, handler: Function): void {
const listener = _isConnectedSubscriptions.get(handler);
NetInfo.removeEventListener(
eventName,
/* $FlowFixMe(>=0.36.0 site=react_native_fb,react_native_oss) Flow error
* detected during the deploy of Flow v0.36.0. To see the error, remove
* this comment and run Flow */
listener,
);
NetInfo.removeEventListener(eventName, listener);
_isConnectedSubscriptions.delete(handler);
},

View File

@ -33,18 +33,12 @@ const UIManagerStatTracker = {
const createViewOrig = UIManager.createView;
UIManager.createView = function(tag, className, rootTag, props) {
incStat('createView', 1);
/* $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 and run Flow. */
incStat('setProp', Object.keys(props || []).length);
createViewOrig(tag, className, rootTag, props);
};
const updateViewOrig = UIManager.updateView;
UIManager.updateView = function(tag, className, props) {
incStat('updateView', 1);
/* $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 and run Flow. */
incStat('setProp', Object.keys(props || []).length);
updateViewOrig(tag, className, props);
};
@ -58,13 +52,7 @@ const UIManagerStatTracker = {
remove,
) {
incStat('manageChildren', 1);
/* $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 and run Flow. */
incStat('move', Object.keys(moveFrom || []).length);
/* $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 and run Flow. */
incStat('remove', Object.keys(remove || []).length);
manageChildrenOrig(tag, moveFrom, moveTo, addTags, addIndices, remove);
};

View File

@ -170,6 +170,9 @@ function _validateTransform(key, value, transformation) {
switch (key) {
case 'matrix':
invariant(
/* $FlowFixMe(>=0.88.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.88 was deployed. To see the error, delete
* this comment and run Flow. */
value.length === 9 || value.length === 16,
'Matrix transform must have a length of 9 (2d) or 16 (3d). ' +
'Provided matrix has a length of %s: %s',
@ -182,6 +185,9 @@ function _validateTransform(key, value, transformation) {
break;
case 'translate':
invariant(
/* $FlowFixMe(>=0.88.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.88 was deployed. To see the error, delete
* this comment and run Flow. */
value.length === 2 || value.length === 3,
'Transform with key translate must be an array of length 2 or 3, found %s: %s',
/* $FlowFixMe(>=0.84.0 site=react_native_fb) This comment suppresses an

View File

@ -227,7 +227,7 @@
"eslint-plugin-prettier": "2.6.0",
"eslint-plugin-react": "7.8.2",
"eslint-plugin-react-native": "3.5.0",
"flow-bin": "^0.87.0",
"flow-bin": "^0.88.0",
"jest": "24.0.0-alpha.6",
"jest-junit": "5.2.0",
"prettier": "1.13.6",

View File

@ -67,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
[version]
^0.87.0
^0.88.0

View File

@ -2778,10 +2778,10 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2"
write "^0.2.1"
flow-bin@^0.87.0:
version "0.87.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.87.0.tgz#fab7f984d8cc767e93fa9eb01cf7d57ed744f19d"
integrity sha512-mnvBXXZkUp4y6A96bR5BHa3q1ioIIN2L10w5osxJqagAakTXFYZwjl0t9cT3y2aCEf1wnK6n91xgYypQS/Dqbw==
flow-bin@^0.88.0:
version "0.88.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.88.0.tgz#e4c7bd93da2331f6ac1733fbe484b1b0c52eb548"
integrity sha512-SnUCuhHP0JZaXQ83w4iTthfTInAg8DIBZCo1xIqDhFmQ6XNEMYMwYhPoMQyELRrkbTpyCYmf4g93y0UQw0dibw==
for-in@^1.0.1, for-in@^1.0.2:
version "1.0.2"