From d477f80113945c704543b8643e31f44aecba0dda Mon Sep 17 00:00:00 2001 From: Hans Halverson Date: Sat, 6 Mar 2021 11:34:58 -0800 Subject: [PATCH] Deploy Flow v0.146.0 Summary: Changelog: [Internal] Reviewed By: mroch Differential Revision: D26835439 fbshipit-source-id: 2607c3185485c8bd2c7e868dd2e3e0c06866f1f9 --- .flowconfig | 2 +- .flowconfig.android | 2 +- Libraries/Core/Timers/JSTimers.js | 3 +++ Libraries/EventEmitter/NativeEventEmitter.js | 1 + Libraries/Image/Image.ios.js | 5 +++++ Libraries/Lists/VirtualizedList.js | 2 ++ package.json | 2 +- packages/normalize-color/base.js | 10 ++++++++++ .../js/examples/TextInput/TextInputSharedExamples.js | 2 ++ repo-config/package.json | 2 +- template/_flowconfig | 2 +- yarn.lock | 8 ++++---- 12 files changed, 32 insertions(+), 9 deletions(-) diff --git a/.flowconfig b/.flowconfig index 3efecf280b..7063acecf2 100644 --- a/.flowconfig +++ b/.flowconfig @@ -70,4 +70,4 @@ untyped-import untyped-type-import [version] -^0.145.0 +^0.146.0 diff --git a/.flowconfig.android b/.flowconfig.android index 27654ff3ec..c5be19ff12 100644 --- a/.flowconfig.android +++ b/.flowconfig.android @@ -70,4 +70,4 @@ untyped-import untyped-type-import [version] -^0.145.0 +^0.146.0 diff --git a/Libraries/Core/Timers/JSTimers.js b/Libraries/Core/Timers/JSTimers.js index c69c91b243..7faca412b8 100644 --- a/Libraries/Core/Timers/JSTimers.js +++ b/Libraries/Core/Timers/JSTimers.js @@ -351,6 +351,7 @@ const JSTimers = { } if (errors) { + // $FlowFixMe[incompatible-use] const errorCount = errors.length; if (errorCount > 1) { // Throw all the other errors in a setTimeout, which will throw each @@ -359,11 +360,13 @@ const JSTimers = { JSTimers.setTimeout( (error => { throw error; + // $FlowFixMe[incompatible-use] }).bind(null, errors[ii]), 0, ); } } + // $FlowFixMe[incompatible-use] throw errors[0]; } }, diff --git a/Libraries/EventEmitter/NativeEventEmitter.js b/Libraries/EventEmitter/NativeEventEmitter.js index 381d8cfa17..41d728262f 100644 --- a/Libraries/EventEmitter/NativeEventEmitter.js +++ b/Libraries/EventEmitter/NativeEventEmitter.js @@ -66,6 +66,7 @@ export default class NativeEventEmitter remove: () => { if (subscription != null) { this._nativeModule?.removeListeners(1); + // $FlowFixMe[incompatible-use] subscription.remove(); subscription = null; } diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index 8f8c63547d..3ac71f8b13 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -125,7 +125,11 @@ let Image = (props: ImagePropsType, forwardedRef) => { } } + // $FlowFixMe[incompatible-use] + // $FlowFixMe[incompatible-type] const resizeMode = props.resizeMode || style.resizeMode || 'cover'; + // $FlowFixMe[prop-missing] + // $FlowFixMe[incompatible-use] const tintColor = style.tintColor; if (props.src != null) { @@ -148,6 +152,7 @@ let Image = (props: ImagePropsType, forwardedRef) => { {...props} ref={forwardedRef} style={style} + // $FlowFixMe[incompatible-type] resizeMode={resizeMode} tintColor={tintColor} source={sources} diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 0201fc4ee5..7daac9f077 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -701,6 +701,7 @@ class VirtualizedList extends React.PureComponent { } else if (this.props.onViewableItemsChanged) { this._viewabilityTuples.push({ viewabilityHelper: new ViewabilityHelper(this.props.viewabilityConfig), + // $FlowFixMe[incompatible-call] onViewableItemsChanged: this.props.onViewableItemsChanged, }); } @@ -1744,6 +1745,7 @@ class VirtualizedList extends React.PureComponent { } } if (someChildHasMore) { + // $FlowFixMe[incompatible-use] newState.last = ii; break; } diff --git a/package.json b/package.json index b736a49fe7..0d03cc3ef9 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "ws": "^6.1.4" }, "devDependencies": { - "flow-bin": "^0.145.0", + "flow-bin": "^0.146.0", "react": "17.0.1" }, "detox": { diff --git a/packages/normalize-color/base.js b/packages/normalize-color/base.js index 295fd2c7c3..b8e88e9420 100644 --- a/packages/normalize-color/base.js +++ b/packages/normalize-color/base.js @@ -40,7 +40,9 @@ function normalizeColorBase(color: ?string | number): null | number { return ( // b ((parse255(match[1]) << 24) | // r + // $FlowFixMe[incompatible-use] (parse255(match[2]) << 16) | // g + // $FlowFixMe[incompatible-use] (parse255(match[3]) << 8) | 0x000000ff) >>> // a 0 @@ -51,8 +53,11 @@ function normalizeColorBase(color: ?string | number): null | number { return ( // b ((parse255(match[1]) << 24) | // r + // $FlowFixMe[incompatible-use] (parse255(match[2]) << 16) | // g + // $FlowFixMe[incompatible-use] (parse255(match[3]) << 8) | + // $FlowFixMe[incompatible-use] parse1(match[4])) >>> // a 0 ); @@ -98,7 +103,9 @@ function normalizeColorBase(color: ?string | number): null | number { return ( (hslToRgb( parse360(match[1]), // h + // $FlowFixMe[incompatible-use] parsePercentage(match[2]), // s + // $FlowFixMe[incompatible-use] parsePercentage(match[3]), // l ) | 0x000000ff) >>> // a @@ -110,9 +117,12 @@ function normalizeColorBase(color: ?string | number): null | number { return ( (hslToRgb( parse360(match[1]), // h + // $FlowFixMe[incompatible-use] parsePercentage(match[2]), // s + // $FlowFixMe[incompatible-use] parsePercentage(match[3]), // l ) | + // $FlowFixMe[incompatible-use] parse1(match[4])) >>> // a 0 ); diff --git a/packages/rn-tester/js/examples/TextInput/TextInputSharedExamples.js b/packages/rn-tester/js/examples/TextInput/TextInputSharedExamples.js index 670589027c..32549b615e 100644 --- a/packages/rn-tester/js/examples/TextInput/TextInputSharedExamples.js +++ b/packages/rn-tester/js/examples/TextInput/TextInputSharedExamples.js @@ -327,7 +327,9 @@ class TokenizedTextExample extends React.Component< index = 1; } parts.push(_text.substr(0, index)); + // $FlowFixMe[incompatible-use] parts.push(token[0]); + // $FlowFixMe[incompatible-use] index = index + token[0].length; _text = _text.slice(index); } diff --git a/repo-config/package.json b/repo-config/package.json index f1265c9b84..7f4e9cc809 100644 --- a/repo-config/package.json +++ b/repo-config/package.json @@ -33,7 +33,7 @@ "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-native": "3.10.0", "eslint-plugin-relay": "1.8.1", - "flow-bin": "^0.145.0", + "flow-bin": "^0.146.0", "jest": "^26.5.2", "jest-junit": "^10.0.0", "jscodeshift": "^0.11.0", diff --git a/template/_flowconfig b/template/_flowconfig index 0507bfb99b..2b4788ac8b 100644 --- a/template/_flowconfig +++ b/template/_flowconfig @@ -63,4 +63,4 @@ untyped-import untyped-type-import [version] -^0.145.0 +^0.146.0 diff --git a/yarn.lock b/yarn.lock index faa4b3f6f5..b8f33403fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3032,10 +3032,10 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== -flow-bin@^0.145.0: - version "0.145.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.145.0.tgz#922f7c3568caaa5eb64621ec536deb56b24d1795" - integrity sha512-+9fi9BMxRBtSWC1x0hWggWTb8Vih+AC7wyvLAX5wR1m6u2lF2HLtixXqy2GX8bWgaynSEJR5lmPxYYC4wMI8cA== +flow-bin@^0.146.0: + version "0.146.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.146.0.tgz#fafa002663a0e13bf3c08c3972dd93d68289ccc6" + integrity sha512-TP8eCwltqc7fo6ad5klgsrZ2veZIK2qM1vHf1A/cnXTStPh8hLAz1cOXmlQIFZR/7fjSMI39TS3CgF6M/HUhAw== flow-parser@0.*, flow-parser@^0.121.0: version "0.121.0"