Skip to content

Commit b31efc5

Browse files
committed
Update downloadFlowTypes with newly missing flow types
1 parent 237bcc5 commit b31efc5

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

packages/@rnw-scripts/just-task/flow-tasks.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ async function downloadFlowTypes(overwrite = false) {
112112

113113
const reactNativeRef = await getAbbreviatedRef(reactNativeVersion);
114114

115+
// Download the 'flow-typed' path from the react-native monorepo root
116+
// and copy it into a ./flow folder
115117
await downloadFilesFromReactNative(
116118
reactNativeRef,
117119
'flow-typed',
@@ -120,6 +122,16 @@ async function downloadFlowTypes(overwrite = false) {
120122
overwrite,
121123
);
122124

125+
// Download the 'flow' path from the react-native package root
126+
// and copy it into a ./flow folder
127+
await downloadFilesFromReactNative(
128+
reactNativeRef,
129+
'packages/react-native/flow',
130+
path.resolve(rnDir, '../.flow/flow'),
131+
'**/*.*',
132+
overwrite,
133+
);
134+
123135
// Get the unpublished @react-native/* flow files from the react-native monorepo
124136
const reactNativePackages = [
125137
{
@@ -148,6 +160,8 @@ task(
148160
series('downloadFlowTypes', async () => {
149161
const flowBinPath = require.resolve('flow-bin');
150162
const flowPath = path.join(path.dirname(flowBinPath), 'cli.js');
151-
require('child_process').execSync(`node "${flowPath}" check`, {stdio: 'inherit'});
163+
require('child_process').execSync(`node "${flowPath}" check`, {
164+
stdio: 'inherit',
165+
});
152166
}),
153167
);

vnext/.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106

107107
[libs]
108108
interface.js
109-
flow/
109+
../node_modules/.flow/flow/
110110
../node_modules/.flow/flow-typed/
111111
../node_modules/react-native/src/types
112112
src/types/

0 commit comments

Comments
 (0)