mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
perf(resolver): do not search for package.json inside non-existing directories (#1480)
This commit is contained in:
parent
51a78e2223
commit
7b909de28e
1 changed files with 7 additions and 0 deletions
|
|
@ -247,6 +247,13 @@ impl CachedPathImpl {
|
|||
if let Some(cv) = &cache_value.parent {
|
||||
cache_value = cv.as_ref();
|
||||
}
|
||||
} else {
|
||||
// Go up a directory when the querying path is neither a file nor a directory
|
||||
if !cache_value.is_dir(fs) {
|
||||
if let Some(cv) = &cache_value.parent {
|
||||
cache_value = cv.as_ref();
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut cache_value = Some(cache_value);
|
||||
while let Some(cv) = cache_value {
|
||||
|
|
|
|||
Loading…
Reference in a new issue