Commit cdd0b35 1 parent 87c3a11 commit cdd0b35 Copy full SHA for cdd0b35
File tree 3 files changed +10
-10
lines changed
3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ function specifierIncluded(specifier) {
6
6
var versionParts = ( parts . length > 1 ? parts [ 1 ] : parts [ 0 ] ) . split ( '.' ) ;
7
7
8
8
for ( var i = 0 ; i < 3 ; ++ i ) {
9
- var cur = Number ( current [ i ] || 0 ) ;
10
- var ver = Number ( versionParts [ i ] || 0 ) ;
9
+ var cur = parseInt ( current [ i ] || 0 , 10 ) ;
10
+ var ver = parseInt ( versionParts [ i ] || 0 , 10 ) ;
11
11
if ( cur === ver ) {
12
12
continue ; // eslint-disable-line no-restricted-syntax, no-continue
13
13
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"assert" : true ,
3
+ "assert/strict" : " >= 15" ,
3
4
"async_hooks" : " >= 8" ,
4
5
"buffer_ieee754" : " < 0.9.7" ,
5
6
"buffer" : true ,
12
13
"_debugger" : " < 8" ,
13
14
"dgram" : true ,
14
15
"dns" : true ,
16
+ "dns/promises" : " >= 15" ,
15
17
"domain" : true ,
16
18
"events" : true ,
17
19
"freelist" : " < 6" ,
49
51
"_stream_readable" : " >= 0.9.4" ,
50
52
"_stream_writable" : " >= 0.9.4" ,
51
53
"stream" : true ,
54
+ "stream/promises" : " >= 15" ,
52
55
"string_decoder" : true ,
53
56
"sys" : true ,
54
57
"timers" : true ,
58
+ "timers/promises" : " >= 15" ,
55
59
"_tls_common" : " >= 0.11.13" ,
56
60
"_tls_legacy" : " >= 0.11.3 && < 10" ,
57
61
"_tls_wrap" : " >= 0.11.3" ,
Original file line number Diff line number Diff line change @@ -22,16 +22,12 @@ test('core modules', function (t) {
22
22
23
23
for ( var i = 0 ; i < cores . length ; ++ i ) {
24
24
var mod = cores [ i ] ;
25
+ var requireFunc = function ( ) { require ( mod ) ; } ; // eslint-disable-line no-loop-func
26
+ console . log ( mod , resolve . core , resolve . core [ mod ] ) ;
25
27
if ( resolve . core [ mod ] ) {
26
- st . doesNotThrow (
27
- function ( ) { require ( mod ) ; } , // eslint-disable-line no-loop-func
28
- mod + ' supported; requiring does not throw'
29
- ) ;
28
+ st . doesNotThrow ( requireFunc , mod + ' supported; requiring does not throw' ) ;
30
29
} else {
31
- st . throws (
32
- function ( ) { require ( mod ) ; } , // eslint-disable-line no-loop-func
33
- mod + ' not supported; requiring throws'
34
- ) ;
30
+ st . throws ( requireFunc , mod + ' not supported; requiring throws' ) ;
35
31
}
36
32
}
37
33
You can’t perform that action at this time.
0 commit comments