Skip to content

Commit

Permalink
Upgrade to Flow 0.198.1
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D42666047

fbshipit-source-id: d0cc4d048151f3aa1d1033f6096125080dbf2cbd
  • Loading branch information
mroch authored and facebook-github-bot committed Jan 23, 2023
1 parent 3367b6a commit 9960327
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ untyped-import
untyped-type-import

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

[version]
^0.196.3
^0.198.1
1 change: 1 addition & 0 deletions IntegrationTests/IntegrationTestHarnessTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class IntegrationTestHarnessTest extends React.Component<Props, State> {
* native_oss) This comment suppresses an error found when Flow v0.54
* was deployed. To see the error delete this comment and run Flow.
*/
// $FlowFixMe[unsafe-addition]
this.constructor.displayName + ': '
}
{this.state.done ? 'Done' : 'Testing...'}
Expand Down
1 change: 1 addition & 0 deletions Libraries/Animated/nodes/AnimatedInterpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ function checkInfiniteRange<OutputT: number | string>(
* doesn't cleanly convert to a string, like undefined, null, and object,
* etc. If you really mean this implicit string conversion, you can do
* something like String(myThing) */
// $FlowFixMe[unsafe-addition]
name + 'cannot be ]-infinity;+infinity[ ' + arr,
);
}
Expand Down
1 change: 1 addition & 0 deletions Libraries/BatchedBridge/NativeModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ function genMethod(moduleID: number, methodID: number, type: MethodType) {
const onSuccess: ?(mixed) => void = hasSuccessCallback ? lastArg : null;
// $FlowFixMe[incompatible-type]
const onFail: ?(mixed) => void = hasErrorCallback ? secondLastArg : null;
// $FlowFixMe[unsafe-addition]
const callbackCount = hasSuccessCallback + hasErrorCallback;
const newArgs = args.slice(0, args.length - callbackCount);
if (type === 'sync') {
Expand Down
1 change: 1 addition & 0 deletions Libraries/Blob/URL.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if (
) {
const constants = NativeBlobModule.getConstants();
// $FlowFixMe[incompatible-type] asserted above
// $FlowFixMe[unsafe-addition]
BLOB_URL_PREFIX = constants.BLOB_URI_SCHEME + ':';
if (typeof constants.BLOB_URI_HOST === 'string') {
BLOB_URL_PREFIX += `//${constants.BLOB_URI_HOST}/`;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"ws": "^6.2.2"
},
"devDependencies": {
"flow-bin": "^0.196.3",
"flow-bin": "^0.198.1",
"hermes-eslint": "0.8.0",
"mock-fs": "^5.1.4",
"react": "18.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class LayoutEventExample extends React.Component<Props, State> {
* This comment suppresses an error found when Flow v0.95 was
* deployed. To see the error, delete this comment and run Flow.
*/
// $FlowFixMe[unsafe-addition]
JSON.stringify(this.state.viewLayout, null, ' ') + '\n\n'
}
</Text>
Expand Down
4 changes: 4 additions & 0 deletions packages/rn-tester/js/utils/RNTesterNavigationReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const getUpdatedBookmarks = ({
k => k !== key,
);
} else {
// $FlowFixMe[incompatible-call]
updatedBookmarks[exampleType].push(key);
}

Expand Down Expand Up @@ -73,6 +74,7 @@ const getUpdatedRecentlyUsed = ({
if (existingKeys.includes(key)) {
existingKeys = existingKeys.filter(k => k !== key);
}
// $FlowFixMe[incompatible-call]
existingKeys.unshift(key);

updatedRecentlyUsed[exampleType] = existingKeys.slice(0, 5);
Expand Down Expand Up @@ -104,6 +106,7 @@ export const RNTesterNavigationReducer = (
activeModuleKey: key,
activeModuleTitle: title,
activeModuleExampleKey: null,
// $FlowFixMe[incompatible-return]
recentlyUsed: getUpdatedRecentlyUsed({
exampleType: exampleType,
key: key,
Expand All @@ -120,6 +123,7 @@ export const RNTesterNavigationReducer = (
case RNTesterNavigationActionsType.BOOKMARK_PRESS:
return {
...state,
// $FlowFixMe[incompatible-return]
bookmarks: getUpdatedBookmarks({
exampleType: exampleType,
key: key,
Expand Down
2 changes: 1 addition & 1 deletion repo-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-relay": "^1.8.3",
"flow-bin": "^0.196.3",
"flow-bin": "^0.198.1",
"inquirer": "^7.1.0",
"jest": "^29.2.1",
"jest-junit": "^10.0.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4399,10 +4399,10 @@ flatted@^3.1.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561"
integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==

flow-bin@^0.196.3:
version "0.196.3"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.196.3.tgz#b6df48986a2629f2c6a26fb79d73fc07c8056af0"
integrity sha512-pmvjlksi1CvkSnDHpcfhDFj/KC3hwSgE2OpzvugW57dfgqfHzqX1UfZIcScGWM5AmP/IeOsQCW383k3zIbEnrA==
flow-bin@^0.198.1:
version "0.198.1"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.198.1.tgz#5fdad4d572bdc76f9ab24890c335e1f7addcecd4"
integrity sha512-9jWC1GJgV5QyeBxvT0GtTQtaw55imDRIh//C5WaS/dijl7IP34CrNY2NgBSwzif516SktkG8KylQWJaslZI2QA==

flow-parser@0.*, flow-parser@^0.185.0:
version "0.185.0"
Expand Down

0 comments on commit 9960327

Please sign in to comment.