From a8ece43a50c2e517aeaa9221edb4f7400d0e45a9 Mon Sep 17 00:00:00 2001 From: Marshall Roch Date: Thu, 15 Sep 2022 12:24:13 -0700 Subject: [PATCH] upgrade to flow 0.187.0 Summary: Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D39542847 fbshipit-source-id: 2eeb8740dd0a142b7e411fbee4765a8f38685c76 --- .flowconfig | 2 +- .flowconfig.android | 2 +- Libraries/BatchedBridge/NativeModules.js | 1 + Libraries/Image/resolveAssetSource.js | 2 ++ Libraries/Pressability/Pressability.js | 1 + Libraries/ReactNative/getCachedComponentWithDebugName.js | 1 + Libraries/Utilities/differ/deepDiffer.js | 1 + package.json | 2 +- repo-config/package.json | 2 +- template/_flowconfig | 2 +- yarn.lock | 8 ++++---- 11 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.flowconfig b/.flowconfig index c7c1c4d19621e2..fde48607350081 100644 --- a/.flowconfig +++ b/.flowconfig @@ -74,4 +74,4 @@ untyped-import untyped-type-import [version] -^0.186.0 +^0.187.0 diff --git a/.flowconfig.android b/.flowconfig.android index a3572186109c56..5c2927b6fa2f3a 100644 --- a/.flowconfig.android +++ b/.flowconfig.android @@ -74,4 +74,4 @@ untyped-import untyped-type-import [version] -^0.186.0 +^0.187.0 diff --git a/Libraries/BatchedBridge/NativeModules.js b/Libraries/BatchedBridge/NativeModules.js index 30259e79b9fdec..0ea6b7c5c4a83e 100644 --- a/Libraries/BatchedBridge/NativeModules.js +++ b/Libraries/BatchedBridge/NativeModules.js @@ -155,6 +155,7 @@ function genMethod(moduleID: number, methodID: number, type: MethodType) { } }; } + // $FlowFixMe[prop-missing] fn.type = type; return fn; } diff --git a/Libraries/Image/resolveAssetSource.js b/Libraries/Image/resolveAssetSource.js index 40ea0f0f9e9a90..81db0a5622903e 100644 --- a/Libraries/Image/resolveAssetSource.js +++ b/Libraries/Image/resolveAssetSource.js @@ -106,5 +106,7 @@ function resolveAssetSource(source: any): ?ResolvedAssetSource { } module.exports = resolveAssetSource; +// $FlowFixMe[prop-missing] module.exports.pickScale = pickScale; +// $FlowFixMe[prop-missing] module.exports.setCustomSourceTransformer = setCustomSourceTransformer; diff --git a/Libraries/Pressability/Pressability.js b/Libraries/Pressability/Pressability.js index 5c8f2b8af5cfa8..450593f12756e1 100644 --- a/Libraries/Pressability/Pressability.js +++ b/Libraries/Pressability/Pressability.js @@ -549,6 +549,7 @@ export default class Pressability { if (process.env.NODE_ENV === 'test') { // We are setting this in order to find this node in ReactNativeTestTools + // $FlowFixMe[prop-missing] responderEventHandlers.onStartShouldSetResponder.testOnly_pressabilityConfig = () => this._config; } diff --git a/Libraries/ReactNative/getCachedComponentWithDebugName.js b/Libraries/ReactNative/getCachedComponentWithDebugName.js index c2020c9ede249c..eaa6f01def0442 100644 --- a/Libraries/ReactNative/getCachedComponentWithDebugName.js +++ b/Libraries/ReactNative/getCachedComponentWithDebugName.js @@ -26,6 +26,7 @@ export default function getCachedComponentWithDisplayName( ComponentWithDisplayName = ({ children, }: $TEMPORARY$object<{children: Node}>) => children; + // $FlowFixMe[prop-missing] ComponentWithDisplayName.displayName = displayName; cache.set(displayName, ComponentWithDisplayName); } diff --git a/Libraries/Utilities/differ/deepDiffer.js b/Libraries/Utilities/differ/deepDiffer.js index c186b6c38dd4b8..e46fd6cad93c39 100644 --- a/Libraries/Utilities/differ/deepDiffer.js +++ b/Libraries/Utilities/differ/deepDiffer.js @@ -98,4 +98,5 @@ const deepDiffer = function ( }; module.exports = deepDiffer; +// $FlowFixMe[prop-missing] module.exports.unstable_setLogListeners = unstable_setLogListeners; diff --git a/package.json b/package.json index fa25ab9a7fe79e..31048428246916 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ "ws": "^6.1.4" }, "devDependencies": { - "flow-bin": "^0.186.0", + "flow-bin": "^0.187.0", "hermes-eslint": "0.8.0", "react": "18.2.0", "react-test-renderer": "^18.2.0" diff --git a/repo-config/package.json b/repo-config/package.json index 3c2a9e7ccec983..3de138876ac296 100644 --- a/repo-config/package.json +++ b/repo-config/package.json @@ -32,7 +32,7 @@ "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0", "eslint-plugin-relay": "^1.8.3", - "flow-bin": "^0.186.0", + "flow-bin": "^0.187.0", "inquirer": "^7.1.0", "jest": "^27.5.1", "jest-junit": "^10.0.0", diff --git a/template/_flowconfig b/template/_flowconfig index 230bbb2232af39..6b709b4f3455e2 100644 --- a/template/_flowconfig +++ b/template/_flowconfig @@ -63,4 +63,4 @@ untyped-import untyped-type-import [version] -^0.186.0 +^0.187.0 diff --git a/yarn.lock b/yarn.lock index 36f938a37cade5..2cf6688e509407 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4253,10 +4253,10 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== -flow-bin@^0.186.0: - version "0.186.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.186.0.tgz#b60b720dea977516db8e77fdd3911f66e86c6378" - integrity sha512-p5g03TsAipO6Wu22rpphRZQ9EYuhVWANN698MRLWRyP7ZtkEyCpFHDfmzRHM4Ym/tbCQCMdLJ9JX/GmuiDsB2w== +flow-bin@^0.187.0: + version "0.187.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.187.0.tgz#3a2a0331f926b9ce285d726108f8a9af9158e13e" + integrity sha512-f0c3e7D33+xYT7comdqPtckBeSxlaQq+NtckDarGM0LU3ofgDQfMzt0XlyWjL9/8y3QzwwaUdM0JJbI7hTiscA== flow-parser@0.*: version "0.163.0"