File tree Expand file tree Collapse file tree 7 files changed +112
-121
lines changed
e2e/__tests__/__snapshots__ Expand file tree Collapse file tree 7 files changed +112
-121
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ compressionLevel: mixed
2
2
3
3
enableGlobalCache : true
4
4
5
+ enableTelemetry : false
6
+
5
7
logFilters :
6
8
- code : YN0032
7
9
level : discard
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ exports[`moduleNameMapper wrong array configuration 1`] = `
41
41
12 | module.exports = () => 'test';
42
42
13 |
43
43
44
- at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:1117 :17)
44
+ at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:1095 :17)
45
45
at Object.require (index.js:10:1)
46
46
at Object.require (__tests__/index.js:10:20)"
47
47
` ;
@@ -71,7 +71,7 @@ exports[`moduleNameMapper wrong configuration 1`] = `
71
71
12 | module.exports = () => 'test';
72
72
13 |
73
73
74
- at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:1117 :17)
74
+ at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:1095 :17)
75
75
at Object.require (index.js:10:1)
76
76
at Object.require (__tests__/index.js:10:20)"
77
77
` ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ exports[`shows a proper error from deep requires 1`] = `
26
26
12 | test('dummy', () => {
27
27
13 | expect (1 ).toBe (1 );
28
28
29
- at Resolver ._throwModNotFoundError (../ ../ packages / jest - resolve / build / index .js :863 :11 )
29
+ at Resolver ._throwModNotFoundError (../ ../ packages / jest - resolve / build / index .js :841 :11 )
30
30
at Object .<anonymous > (node_modules/discord.js/src/index.js:21:12)
31
31
at Object.require (__tests__/test.js:10:1)"
32
32
`;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ exports[`show error message with matching files 1`] = `
37
37
| ^
38
38
9 |
39
39
40
- at Resolver._throwModNotFoundError (../../packages/jest-resolve/build/index.js:863 :11)
40
+ at Resolver._throwModNotFoundError (../../packages/jest-resolve/build/index.js:841 :11)
41
41
at Object.require (index.js:8:18)
42
42
at Object.require (__tests__/test.js:8:11)"
43
43
` ;
Original file line number Diff line number Diff line change 22
22
"chalk" : " ^4.1.2" ,
23
23
"graceful-fs" : " ^4.2.11" ,
24
24
"jest-haste-map" : " workspace:*" ,
25
- "jest-pnp-resolver" : " ^1.2.3" ,
26
25
"jest-util" : " workspace:*" ,
27
26
"jest-validate" : " workspace:*" ,
28
27
"slash" : " ^3.0.0" ,
29
- "unrs-resolver" : " ^1.7.11 "
28
+ "unrs-resolver" : " ^1.11.0 "
30
29
},
31
30
"devDependencies" : {
32
31
"@types/graceful-fs" : " ^4.1.9" ,
Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
import { isBuiltin } from 'module' ;
9
- import { fileURLToPath } from 'url' ;
10
- import pnpResolver from 'jest-pnp-resolver' ;
11
9
import {
12
10
type ResolveResult ,
13
11
ResolverFactory ,
@@ -40,12 +38,6 @@ export interface ResolverOptions extends UpstreamResolveOptions {
40
38
paths ?: Array < string > ;
41
39
/** Current root directory. */
42
40
rootDir ?: string ;
43
-
44
- /**
45
- * @internal Whether to allow the `jest-pnp-resolver` to be used.
46
- * @see https://github.com/arcanis/jest-pnp-resolver/blob/ae8e3992349f3b43d1476572e9315e14358e8944/index.js#L49
47
- */
48
- allowPnp ?: boolean ;
49
41
}
50
42
51
43
export type SyncResolver = ( path : string , options : ResolverOptions ) => string ;
@@ -74,20 +66,11 @@ function baseResolver(
74
66
options : ResolverOptions ,
75
67
async ?: true ,
76
68
) : string | Promise < string > {
77
- // https://github.com/oxc-project/oxc-resolver/issues/565
78
- // https://github.com/jestjs/jest/issues/15676
69
+ // `builtins` in `unrs-resolver` is static which could be wrong at runtime.
79
70
if ( isBuiltin ( path ) ) {
80
71
return path ;
81
72
}
82
73
83
- if ( process . versions . pnp && options . allowPnp !== false ) {
84
- return pnpResolver ( path , options ) ;
85
- }
86
-
87
- if ( path . startsWith ( 'file://' ) ) {
88
- path = fileURLToPath ( path ) ;
89
- }
90
-
91
74
/* eslint-disable prefer-const */
92
75
let {
93
76
basedir,
You can’t perform that action at this time.
0 commit comments