From f0750cbe05fe2b0d2c1ecdf09164f55f4bf63070 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Wed, 20 Dec 2023 09:07:18 +0000 Subject: [PATCH] fix: default to concurrency 1 in ci --- src/utils.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index f358d6add..1b2f73204 100644 --- a/src/utils.js +++ b/src/utils.js @@ -345,8 +345,18 @@ export async function everyMonorepoProject (projectDir, fn, opts) { inDegree.set(name, project.siblingDependencies.length) } + let concurrency = opts?.concurrency + + if (concurrency == null && process.env.CI != null) { + concurrency = 1 + } + + if (concurrency == null) { + concurrency = os.availableParallelism?.() ?? os.cpus().length + } + const queue = new PQueue({ - concurrency: opts?.concurrency ?? os.availableParallelism?.() ?? os.cpus().length + concurrency }) while (inDegree.size) {