From a1eb6de691c42bc2b925e609bc4b6dc7efacdf6b Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Thu, 13 Feb 2025 13:04:53 -0800 Subject: [PATCH] Pre-suppress errors ahead of 0.261.1 release in xplat Summary: Changelog: [Internal] Reviewed By: panagosg7 Differential Revision: D69610953 fbshipit-source-id: 3eec28d72e26c2f48542523dd610590e298eba69 --- packages/community-cli-plugin/src/utils/version.js | 1 + packages/react-native/Libraries/Animated/nodes/AnimatedObject.js | 1 + .../dom/nodes/internals/ReactNativeDocumentInstanceHandle.js | 1 + scripts/releases/utils/version-utils.js | 1 + 4 files changed, 4 insertions(+) diff --git a/packages/community-cli-plugin/src/utils/version.js b/packages/community-cli-plugin/src/utils/version.js index 85daf5d8843..15e5f385227 100644 --- a/packages/community-cli-plugin/src/utils/version.js +++ b/packages/community-cli-plugin/src/utils/version.js @@ -92,6 +92,7 @@ Diff: ${chalk.dim.underline(newVersion?.diffUrl ?? 'none')} // $FlowFixMe function isDiffPurgeEntry(data: Partial): data is DiffPurge { return ( + // $FlowFixMe[incompatible-type-guard] [data.name, data.zipball_url, data.tarball_url, data.node_id].filter( e => typeof e !== 'undefined', ).length === 0 diff --git a/packages/react-native/Libraries/Animated/nodes/AnimatedObject.js b/packages/react-native/Libraries/Animated/nodes/AnimatedObject.js index ba0aab03c76..77d6cc9b390 100644 --- a/packages/react-native/Libraries/Animated/nodes/AnimatedObject.js +++ b/packages/react-native/Libraries/Animated/nodes/AnimatedObject.js @@ -26,6 +26,7 @@ export function isPlainObject( and ReactElement checks preserve the type refinement of `value`. */ ): value is $ReadOnly<{[string]: mixed}> { return ( + // $FlowFixMe[incompatible-type-guard] value !== null && typeof value === 'object' && Object.getPrototypeOf(value).isPrototypeOf(Object) && diff --git a/packages/react-native/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js b/packages/react-native/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js index 658d65dabb7..bc607b8a94f 100644 --- a/packages/react-native/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +++ b/packages/react-native/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js @@ -39,5 +39,6 @@ export function isReactNativeDocumentInstanceHandle( instanceHandle: mixed, // $FlowExpectedError[incompatible-type-guard] ): instanceHandle is ReactNativeDocumentInstanceHandle { + // $FlowFixMe[incompatible-type-guard] return typeof instanceHandle === 'number' && instanceHandle % 10 === 1; } diff --git a/scripts/releases/utils/version-utils.js b/scripts/releases/utils/version-utils.js index 1163fde7fa0..f6904f01561 100644 --- a/scripts/releases/utils/version-utils.js +++ b/scripts/releases/utils/version-utils.js @@ -66,6 +66,7 @@ function validateBuildType( const validBuildTypes = new Set(['release', 'dry-run', 'nightly']); // $FlowFixMe[incompatible-return] + // $FlowFixMe[incompatible-type-guard] return validBuildTypes.has(buildType); }