File tree 1 file changed +2
-1
lines changed
packages/vitest/src/node/workspace
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type { Vitest } from '../core'
2
2
import type { UserConfig , UserWorkspaceConfig , WorkspaceProjectConfiguration } from '../types/config'
3
3
import type { WorkspaceProject } from '../workspace'
4
4
import { existsSync , promises as fs } from 'node:fs'
5
+ import os from 'node:os'
5
6
import { limitConcurrency } from '@vitest/runner/utils'
6
7
import fg from 'fast-glob'
7
8
import { relative , resolve } from 'pathe'
@@ -51,7 +52,7 @@ export async function resolveWorkspace(
51
52
52
53
const projectPromises : Promise < WorkspaceProject > [ ] = [ ]
53
54
const fileProjects = [ ...configFiles , ...nonConfigDirectories ]
54
- const concurrent = limitConcurrency ( 5 )
55
+ const concurrent = limitConcurrency ( os . availableParallelism ?. ( ) || os . cpus ( ) . length || 5 )
55
56
56
57
for ( const filepath of fileProjects ) {
57
58
// if file leads to the root config, then we can just reuse it because we already initialized it
You can’t perform that action at this time.
0 commit comments