Skip to content

Commit 7a0f27f

Browse files
panagosg7meta-codesync[bot]
authored andcommitted
Deploy 0.343.0 to xplat
Summary: X-link: react/metro#2323 Deploy `flow-bin` 0.343.0 for React Native, Metro, and Relay, updating the OSS Flow version constraints, dependency lockfiles, and the shared Yarn offline mirror, with one generated suppression in `NewAppScreen.js`. Flow 0.343.0 merges library `declare module` blocks, so the second `declare export default` of `babel/generator` in the React Native and Metro `babel_v7.x.x.js` libdefs is now a `name-already-bound` error; it is suppressed. Flow 0.343.0 also gives `void` TypeScript semantics, so Metro's Jest libdef types hook callbacks as returning `void | Promise<unknown>` and an unimplemented mock's `getMockImplementation` as `undefined`. Too few or too many arguments for a fixed-length tuple rest param are now reported as `incompatible-type` or `extra-arg` instead of `invalid-tuple-arity`, so `EventEmitter-flowtest.js` carries both codes while it is still also checked with 0.342. Changelog: [Internal] Differential Revision: D135458864
1 parent b49769c commit 7a0f27f

6 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎.flowconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ untyped-import
114114
untyped-type-import
115115

116116
[version]
117-
^0.342.0
117+
^0.343.0

‎flow-typed/npm/babel_v7.x.x.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,7 @@ declare module '@babel/generator' {
12551255
code?: string | {[filename: string]: string, ...},
12561256
) => GeneratorResult;
12571257

1258+
// $FlowFixMe[name-already-bound]
12581259
declare export default (
12591260
ast: BabelNode,
12601261
options?: Options,

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"eslint-plugin-relay": "^1.8.3",
9999
"fb-dotslash": "0.5.8",
100100
"flow-api-translator": "0.340.0",
101-
"flow-bin": "^0.342.0",
101+
"flow-bin": "^0.343.0",
102102
"flow-eslint": "0.340.0",
103103
"flow-parser": "0.340.0",
104104
"flow-transform": "0.340.0",

‎packages/new-app-screen/src/NewAppScreen.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ function getHermesLabel(): React.Node {
135135
}
136136

137137
return (
138+
// $FlowFixMe[incompatible-type]
138139
<ThemedText color="secondary" style={styles.label}>
139140
JS Engine: Hermes ({RuntimeVersion.hermes})
140141
</ThemedText>

‎packages/react-native/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,18 @@ subscription.listener;
6262
subscription.once;
6363

6464
// $FlowExpectedError[invalid-tuple-arity]
65+
// $FlowExpectedError[extra-arg]
6566
emitter.emit('void', undefined);
6667
// $FlowExpectedError[incompatible-type]
6768
emitter.emit('string', 123);
6869
// $FlowExpectedError[invalid-tuple-arity]
70+
// $FlowExpectedError[incompatible-type]
6971
emitter.emit('strings', 'foo');
7072
// $FlowExpectedError[invalid-tuple-arity]
73+
// $FlowExpectedError[extra-arg]
7174
emitter.emit('strings', 'foo', 'bar', 'baz');
7275
// $FlowExpectedError[invalid-tuple-arity]
76+
// $FlowExpectedError[incompatible-type]
7377
emitter.emit('error');
7478
// $FlowExpectedError[prop-missing]
7579
emitter.emit('does-not-exist');

‎yarn.lock‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4855,10 +4855,10 @@ flow-api-translator@0.340.0:
48554855
flow-transform "0.340.0"
48564856
typescript "5.3.2"
48574857

4858-
flow-bin@^0.342.0:
4859-
version "0.342.0"
4860-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.342.0.tgz#de211291165039f8cc83355575b75a931bd09793"
4861-
integrity sha512-/ha9+RAUGF+G9o5hnBzpKCP5iZXzms0tMVi1Dp4zNvPfWo3dUF6qE8S0Q2zJMugX3f5DPqE4h3BaFSpWYQjhUA==
4858+
flow-bin@^0.343.0:
4859+
version "0.343.0"
4860+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.343.0.tgz#2aabed58e14f89df207f31c20071460b228161d8"
4861+
integrity sha512-JNu0HcN40ffhgWr91AwxNIHMLaEtq6uny2ubdPhH2xXoMba21px930aFmIUw1c5ui9S5LFN/AW04S6RwUkUw6w==
48624862

48634863
flow-enums-runtime@^0.0.6:
48644864
version "0.0.6"

0 commit comments

Comments
 (0)