File tree 2 files changed +13
-1
lines changed
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
119
119
let optionsHash : string
120
120
let cachedOptions : InternalResolverOptions | undefined
121
121
122
+ let prevCwd : string
123
+
122
124
let mappersCachedOptions : InternalResolverOptions
123
125
let mappers : Array < ( ( specifier : string ) => string [ ] ) | null > | undefined
124
126
@@ -347,9 +349,14 @@ function getMappedPath(
347
349
}
348
350
349
351
function initMappers ( options : InternalResolverOptions ) {
350
- if ( mappers && mappersCachedOptions === options ) {
352
+ if (
353
+ mappers &&
354
+ mappersCachedOptions === options &&
355
+ prevCwd === process . cwd ( )
356
+ ) {
351
357
return
352
358
}
359
+ prevCwd = process . cwd ( )
353
360
354
361
const configPaths =
355
362
typeof options . project === 'string'
You can’t perform that action at this time.
0 commit comments