File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
packages/jest-resolve/src Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
## main
2
2
3
+ ## 30.1.3
4
+
5
+ ### Fixes
6
+
7
+ - Fix ` unstable_mockModule ` with ` node: ` prefixed core modules.
8
+
3
9
## 30.1.2
4
10
5
11
### Fixes
Original file line number Diff line number Diff line change @@ -463,9 +463,7 @@ export default class Resolver {
463
463
}
464
464
465
465
normalizeCoreModuleSpecifier ( specifier : string ) : string {
466
- return specifier . startsWith ( 'node:' )
467
- ? specifier . slice ( 'node:' . length )
468
- : specifier ;
466
+ return specifier . startsWith ( 'node:' ) ? specifier . slice ( 5 ) : specifier ;
469
467
}
470
468
471
469
getModule ( name : string ) : string | null {
@@ -742,11 +740,6 @@ export default class Resolver {
742
740
moduleName : string ,
743
741
options ?: Pick < ResolveModuleConfig , 'conditions' > ,
744
742
) : string | null {
745
- // Strip core module scheme if necessary.
746
- if ( this . isCoreModule ( moduleName ) ) {
747
- return this . normalizeCoreModuleSpecifier ( moduleName ) ;
748
- }
749
-
750
743
const dirname = path . dirname ( from ) ;
751
744
752
745
const { extensions, moduleDirectory, paths} = this . _prepareForResolution (
You can’t perform that action at this time.
0 commit comments