diff --git a/.flowconfig b/.flowconfig index c64d6b408b06ef..20740aa788eed9 100644 --- a/.flowconfig +++ b/.flowconfig @@ -74,4 +74,4 @@ untyped-import untyped-type-import [version] -^0.196.3 +^0.198.1 diff --git a/.flowconfig.android b/.flowconfig.android index b205f24463a4dc..1ca85590453923 100644 --- a/.flowconfig.android +++ b/.flowconfig.android @@ -74,4 +74,4 @@ untyped-import untyped-type-import [version] -^0.196.3 +^0.198.1 diff --git a/IntegrationTests/IntegrationTestHarnessTest.js b/IntegrationTests/IntegrationTestHarnessTest.js index 3d76dc7c0681ee..2c4f8bd70c25de 100644 --- a/IntegrationTests/IntegrationTestHarnessTest.js +++ b/IntegrationTests/IntegrationTestHarnessTest.js @@ -61,6 +61,7 @@ class IntegrationTestHarnessTest extends React.Component { * 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...'} diff --git a/Libraries/Animated/nodes/AnimatedInterpolation.js b/Libraries/Animated/nodes/AnimatedInterpolation.js index 3f972893d3a7ae..8f504c5388faae 100644 --- a/Libraries/Animated/nodes/AnimatedInterpolation.js +++ b/Libraries/Animated/nodes/AnimatedInterpolation.js @@ -313,6 +313,7 @@ function checkInfiniteRange( * 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, ); } diff --git a/Libraries/BatchedBridge/NativeModules.js b/Libraries/BatchedBridge/NativeModules.js index 0ea6b7c5c4a83e..26961d7f830d0c 100644 --- a/Libraries/BatchedBridge/NativeModules.js +++ b/Libraries/BatchedBridge/NativeModules.js @@ -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') { diff --git a/Libraries/Blob/URL.js b/Libraries/Blob/URL.js index 52e63b589f9865..8763926eb22a2e 100644 --- a/Libraries/Blob/URL.js +++ b/Libraries/Blob/URL.js @@ -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}/`; diff --git a/package.json b/package.json index 7800fb820a33a1..ad814a8706278c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/rn-tester/js/examples/Layout/LayoutEventsExample.js b/packages/rn-tester/js/examples/Layout/LayoutEventsExample.js index 4b23f887145cfc..016b0f6193ef9d 100644 --- a/packages/rn-tester/js/examples/Layout/LayoutEventsExample.js +++ b/packages/rn-tester/js/examples/Layout/LayoutEventsExample.js @@ -111,6 +111,7 @@ class LayoutEventExample extends React.Component { * 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' } diff --git a/packages/rn-tester/js/utils/RNTesterNavigationReducer.js b/packages/rn-tester/js/utils/RNTesterNavigationReducer.js index 95f6a9694241be..ff08d7b9312814 100644 --- a/packages/rn-tester/js/utils/RNTesterNavigationReducer.js +++ b/packages/rn-tester/js/utils/RNTesterNavigationReducer.js @@ -44,6 +44,7 @@ const getUpdatedBookmarks = ({ k => k !== key, ); } else { + // $FlowFixMe[incompatible-call] updatedBookmarks[exampleType].push(key); } @@ -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); @@ -104,6 +106,7 @@ export const RNTesterNavigationReducer = ( activeModuleKey: key, activeModuleTitle: title, activeModuleExampleKey: null, + // $FlowFixMe[incompatible-return] recentlyUsed: getUpdatedRecentlyUsed({ exampleType: exampleType, key: key, @@ -120,6 +123,7 @@ export const RNTesterNavigationReducer = ( case RNTesterNavigationActionsType.BOOKMARK_PRESS: return { ...state, + // $FlowFixMe[incompatible-return] bookmarks: getUpdatedBookmarks({ exampleType: exampleType, key: key, diff --git a/repo-config/package.json b/repo-config/package.json index 8a46c0031b52c5..9647225b95c017 100644 --- a/repo-config/package.json +++ b/repo-config/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index c17407e8f6e2e3..46a404e6d46ed8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"