diff --git a/.changeset/smooth-wombats-protect.md b/.changeset/smooth-wombats-protect.md new file mode 100644 index 00000000..a845151c --- /dev/null +++ b/.changeset/smooth-wombats-protect.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/build-scripts/gen-flow-types.ts b/build-scripts/gen-flow-types.ts index 40b808ec..3f0a5345 100644 --- a/build-scripts/gen-flow-types.ts +++ b/build-scripts/gen-flow-types.ts @@ -1,4 +1,4 @@ -import {execSync} from "child_process"; +import {execFileSync} from "child_process"; import * as path from "path"; import * as fglob from "fast-glob"; @@ -9,10 +9,10 @@ const files = fglob.sync("packages/wonder-stuff-*/dist/**/*.d.ts", { for (const inFile of files) { const outFile = inFile.replace(".d.ts", ".js.flow"); - const command = `yarn flowgen ${inFile} -o ${outFile} --add-flow-header`; + const args = ["flowgen", inFile, "-o", outFile, "--add-flow-header"]; try { - execSync(command, {cwd: rootDir}); + execFileSync("yarn", args, {cwd: rootDir}); console.log(`✅ wrote: ${outFile}`); } catch (e) { console.log(`❌ error processing: ${inFile}: ${e}`);