From 0bca45a39bd1607947c64fe88e0d9c5c1428e3e3 Mon Sep 17 00:00:00 2001 From: Panos Vekris Date: Fri, 20 Nov 2026 13:47:24 -0800 Subject: [PATCH] Deploy 0.341.0 to xplat (#60165) Summary: X-link: https://github.com/meta/relay/pull/5459 Pull Request resolved: https://github.com/react/react-native/pull/60165 X-link: https://github.com/react/metro/pull/2255 [changelog](https://github.com/facebook/flow/blob/main/Changelog.md) ## Library definitions Flow 0.341.0 rejects the explicit exact object syntax `{| |}` and unnamed function type parameters, and checks type applications inside generic definitions. Relay's `flow-typed/` definitions for Babel, chalk and Jest now write exact objects as `{ }` (objects are exact by default, so the meaning is unchanged), and the second parameter of Babel's `traverse` is named. In the shared `child_process` definition used by Metro and React Native, `MaybeStream` infers `E` from the optional `stdio` option, so `E` includes `void`; its indexed accesses now read `NonNullable[FD]`. Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D133315654 --- .flowconfig | 2 +- flow-typed/environment/node.js | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.flowconfig b/.flowconfig index 29cdc377447..47c84c54801 100644 --- a/.flowconfig +++ b/.flowconfig @@ -119,4 +119,4 @@ untyped-import untyped-type-import [version] -^0.340.0 +^0.341.0 diff --git a/flow-typed/environment/node.js b/flow-typed/environment/node.js index b82b7dfb380..919e991cb21 100644 --- a/flow-typed/environment/node.js +++ b/flow-typed/environment/node.js @@ -539,9 +539,9 @@ declare module 'child_process' { ? StreamForChannel : E extends string ? null - : E[FD] extends child_process$StdioPipe + : NonNullable[FD] extends child_process$StdioPipe ? StreamForChannel - : E[FD] extends string | number + : NonNullable[FD] extends string | number ? null : null | StreamForChannel : PipeByDefault extends true diff --git a/package.json b/package.json index 8cec86e5369..4193e1dbf26 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "eslint-plugin-relay": "^1.8.3", "fb-dotslash": "0.5.8", "flow-api-translator": "0.340.0", - "flow-bin": "^0.340.0", + "flow-bin": "^0.341.0", "flow-eslint": "0.340.0", "flow-parser": "0.340.0", "flow-transform": "0.340.0", diff --git a/yarn.lock b/yarn.lock index 022f99b25f2..ac1935d61d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4855,10 +4855,10 @@ flow-api-translator@0.340.0: flow-transform "0.340.0" typescript "5.3.2" -flow-bin@^0.340.0: - version "0.340.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.340.0.tgz#f3edbe6f235c9bc9ff735e5cae1dc8b0a96d55f7" - integrity sha512-XourZh2487go6B2RTIssruf5iH1rVATg7IdE8CGfMbey/93RJR5HTsqQEgVK33lmGhew8fTRLZmeSEyMVubMpw== +flow-bin@^0.341.0: + version "0.341.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.341.0.tgz#e10bd44a3031f84d7c091f3380d3dcf53af26b40" + integrity sha512-NgsIhAk4TNRXRHro00uu+dI0fUsrL8w1jcdQOIXLVxU9YS6YyrwbvxGJr5RQXtRqeu2ScN+oXfJG7ooMH7HlXw== flow-enums-runtime@^0.0.6: version "0.0.6"