File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " eslint-import-resolver-typescript " : patch
3+ ---
4+
5+ fix: check if cwd changed to bust mapper cache
Original file line number Diff line number Diff line change @@ -119,6 +119,8 @@ let previousOptionsHash: string
119119let optionsHash : string
120120let cachedOptions : InternalResolverOptions | undefined
121121
122+ let prevCwd : string
123+
122124let mappersCachedOptions : InternalResolverOptions
123125let mappers : Array < ( ( specifier : string ) => string [ ] ) | null > | undefined
124126
@@ -347,9 +349,14 @@ function getMappedPath(
347349}
348350
349351function initMappers ( options : InternalResolverOptions ) {
350- if ( mappers && mappersCachedOptions === options ) {
352+ if (
353+ mappers &&
354+ mappersCachedOptions === options &&
355+ prevCwd === process . cwd ( )
356+ ) {
351357 return
352358 }
359+ prevCwd = process . cwd ( )
353360
354361 const configPaths =
355362 typeof options . project === 'string'
You can’t perform that action at this time.
0 commit comments