Skip to content

Commit 2713c64

Browse files
committed
fix fast-glob concurrency
1 parent 31097c6 commit 2713c64

File tree

1 file changed

+7
-0
lines changed
  • packages/tailwindcss-intellisense/src/class-names

1 file changed

+7
-0
lines changed

packages/tailwindcss-intellisense/src/class-names/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import getVariants from './getVariants'
1010
import resolveConfig from './resolveConfig'
1111
import * as path from 'path'
1212
import * as fs from 'fs'
13+
import * as os from 'os'
1314
import { getUtilityConfigMap } from './getUtilityConfigMap'
1415
import glob from 'fast-glob'
1516
import normalizePath from 'normalize-path'
@@ -38,6 +39,12 @@ export default async function getClassNames(
3839
onlyFiles: true,
3940
absolute: true,
4041
suppressErrors: true,
42+
// fast-glob defaults concurrency to `os.cpus().length`,
43+
// but this can be 0, so we override it here, ensuring
44+
// that concurrency is at least 1. Fix is here but is
45+
// currently unpublished:
46+
// https://github.com/mrmlnc/fast-glob/pull/296
47+
concurrency: Math.max(os.cpus().length, 1),
4148
})
4249
)
4350
.map(normalizePath)

0 commit comments

Comments
 (0)