Call os.cpus in update-codeowners (#49063)

If you don't call it, you get the number of parameters of os.cpus, which
is 0, which parseDefinition treats as a single to return an empty result
instead of parsing.
This commit is contained in:
Nathan Shively-Sanders
2020-10-23 15:15:04 -07:00
committed by GitHub
parent 483a0b365c
commit e005d43d19

View File

@@ -13,7 +13,7 @@ async function main() {
clean();
const dt = await getDefinitelyTyped(options, log);
await parseDefinitions(dt, { nProcesses: os.cpus.length, definitelyTypedPath: "." }, log);
await parseDefinitions(dt, { nProcesses: os.cpus().length, definitelyTypedPath: "." }, log);
const allPackages = await AllPackages.read(dt);
const typings = allPackages.allTypings();
const maxPathLen = Math.max(...typings.map(t => t.subDirectoryPath.length));