File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/vitest/src/node/workspace Expand file tree Collapse file tree 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'
22import type { UserConfig , UserWorkspaceConfig , WorkspaceProjectConfiguration } from '../types/config'
33import type { WorkspaceProject } from '../workspace'
44import { existsSync , promises as fs } from 'node:fs'
5+ import os from 'node:os'
56import { limitConcurrency } from '@vitest/runner/utils'
67import fg from 'fast-glob'
78import { relative , resolve } from 'pathe'
@@ -51,7 +52,7 @@ export async function resolveWorkspace(
5152
5253 const projectPromises : Promise < WorkspaceProject > [ ] = [ ]
5354 const fileProjects = [ ...configFiles , ...nonConfigDirectories ]
54- const concurrent = limitConcurrency ( 5 )
55+ const concurrent = limitConcurrency ( os . availableParallelism ?. ( ) || os . cpus ( ) . length || 5 )
5556
5657 for ( const filepath of fileProjects ) {
5758 // 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