fix(theme): remove cwd options from picomatch (#892)

This commit is contained in:
pengzhanbo 2026-04-19 14:10:40 +08:00 committed by GitHub
parent 6ebb1bda6e
commit 58ea2fc8cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,12 +46,11 @@ export function resolveMatcherPattern(include?: string | string[], exclude?: str
*
* @param include - Patterns to include /
* @param exclude - Patterns to exclude /
* @param cwd - Current working directory for relative path matching /
* @returns Matcher function that tests file paths /
*/
export function createMatcher(include?: string | string[], exclude?: string | string[], cwd?: string): Matcher {
export function createMatcher(include?: string | string[], exclude?: string | string[]): Matcher {
exclude = ['**/node_modules/**', '**/.vuepress/**', ...toArray(exclude)]
const { pattern, ignore } = resolveMatcherPattern(include, exclude)
return picomatch(pattern, { ignore, cwd })
return picomatch(pattern, { ignore })
}