fix fast-glob concurrency
parent
31097c683b
commit
2713c64365
|
@ -10,6 +10,7 @@ import getVariants from './getVariants'
|
||||||
import resolveConfig from './resolveConfig'
|
import resolveConfig from './resolveConfig'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
|
import * as os from 'os'
|
||||||
import { getUtilityConfigMap } from './getUtilityConfigMap'
|
import { getUtilityConfigMap } from './getUtilityConfigMap'
|
||||||
import glob from 'fast-glob'
|
import glob from 'fast-glob'
|
||||||
import normalizePath from 'normalize-path'
|
import normalizePath from 'normalize-path'
|
||||||
|
@ -38,6 +39,12 @@ export default async function getClassNames(
|
||||||
onlyFiles: true,
|
onlyFiles: true,
|
||||||
absolute: true,
|
absolute: true,
|
||||||
suppressErrors: true,
|
suppressErrors: true,
|
||||||
|
// fast-glob defaults concurrency to `os.cpus().length`,
|
||||||
|
// but this can be 0, so we override it here, ensuring
|
||||||
|
// that concurrency is at least 1. Fix is here but is
|
||||||
|
// currently unpublished:
|
||||||
|
// https://github.com/mrmlnc/fast-glob/pull/296
|
||||||
|
concurrency: Math.max(os.cpus().length, 1),
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.map(normalizePath)
|
.map(normalizePath)
|
||||||
|
|
Loading…
Reference in New Issue