File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
packages/jest-resolve/src Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 33### Features
44
55- ` [jest-haste-map] ` ignore Sapling vcs directories (` .sl/ ` ) ([ #13674 ] ( https://github.com/facebook/jest/pull/13674 ) )
6- - ` [jest-resolve] ` Support subpath imports ([ #13705 ] ( https://github.com/facebook/jest/pull/13705 ) )
6+ - ` [jest-resolve] ` Support subpath imports ([ #13705 ] ( https://github.com/facebook/jest/pull/13705 ) , [ # 13723 ] ( https://github.com/facebook/jest/pull/13723 ) )
77- ` [jest-runtime] ` Add ` jest.isolateModulesAsync ` for scoped module initialization of asynchronous functions ([ #13680 ] ( https://github.com/facebook/jest/pull/13680 ) )
88- ` [jest-test-result] ` Added ` skipped ` and ` focused ` status to ` FormattedTestResult ` ([ #13700 ] ( https://github.com/facebook/jest/pull/13700 ) )
99
Original file line number Diff line number Diff line change @@ -164,14 +164,18 @@ function resolveByPathInModule(
164164
165165 const resolvedValues = Array . isArray ( resolved ) ? resolved : [ resolved ] ;
166166
167+ let lastError : Error ;
167168 for ( const resolved of resolvedValues ) {
168169 const resolvedPath = resolveByPath ( resolved ) ;
170+
169171 try {
170172 return resolveSync ( resolvedPath , options ) ;
171- } catch ( e ) {
173+ } catch ( e : any ) {
174+ lastError = e ;
172175 continue ;
173176 }
174177 }
178+ throw lastError ! ;
175179
176180 function resolveByPath ( resolved : string ) {
177181 if ( resolved . startsWith ( '.' ) ) {
You can’t perform that action at this time.
0 commit comments