chore: update

This commit is contained in:
autofix-ci[bot] 2025-06-18 06:47:11 +00:00 committed by daiwei
parent 5246bdfe53
commit 7588b4dacf
1 changed files with 4 additions and 5 deletions

View File

@ -1030,12 +1030,11 @@ function resolveWithTS(
matchedConfig = configs[0] matchedConfig = configs[0]
} else { } else {
const [major, minor] = ts.versionMajorMinor.split('.').map(Number) const [major, minor] = ts.versionMajorMinor.split('.').map(Number)
function getPattern(base: string, p: string): string { const getPattern = (base: string, p: string) => {
const supportsConfigDir = // ts 5.5+ supports ${configDir} in paths
major > 5 || (major === 5 && minor >= 5) const supportsConfigDir = major > 5 || (major === 5 && minor >= 5)
return p.startsWith('${configDir}') && supportsConfigDir return p.startsWith('${configDir}') && supportsConfigDir
? // ts 5.5+ supports ${configDir} in paths ? normalizePath(p.replace('${configDir}', dirname(configPath!)))
normalizePath(p.replace('${configDir}', dirname(configPath!)))
: joinPaths(base, p) : joinPaths(base, p)
} }
// resolve which config matches the current file // resolve which config matches the current file