From: Yadd Date: mars, 09 2026 21:23:50 +0100 Subject: [PATCH] fix for glob 10 Forwarded: not-needed --- a/fast-glob/src/tests/smoke/smoke.ts +++ b/fast-glob/src/tests/smoke/smoke.ts @@ -13,7 +13,7 @@ pattern: Pattern; ignore?: Pattern; cwd?: string; - globOptions?: glob.IOptions; + globOptions?: glob.GlobOptions; globFilter?: (entry: string, filepath: string) => boolean; globTransform?: (entry: string) => string; fgOptions?: Options; @@ -143,10 +143,10 @@ const globFilter = options.globFilter; const globTransform = options.globTransform; - let entries = glob.sync(pattern, { cwd, ignore, ...options.globOptions }); + let entries: string[] = glob.sync(pattern, { cwd, ignore, withFileTypes: false, ...options.globOptions }) as string[]; if (globFilter !== undefined) { - entries = entries.filter((entry) => { + entries = entries.filter((entry: string) => { const filepath = path.join(cwd, entry); return globFilter(entry, filepath); @@ -154,10 +154,10 @@ } if (globTransform !== undefined) { - entries = entries.map((entry) => globTransform(entry)); + entries = entries.map((entry: string) => globTransform(entry)); } - entries.sort((a, b) => a.localeCompare(b)); + entries.sort((a: string, b: string) => a.localeCompare(b)); return entries; }