This repository was archived by the owner on May 10, 2021. It is now read-only.
File tree 3 files changed +20
-2
lines changed
3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -373,7 +373,10 @@ class Installer {
373
373
pkg , stage , pkgPath , LifecycleOpts ( this . opts ) . concat ( {
374
374
// TODO: can be removed once npm-lifecycle is updated to modern
375
375
// config practices.
376
- config : Object . assign ( { } , this . opts , { log : null } ) ,
376
+ config : Object . assign ( { } , this . opts , {
377
+ log : null ,
378
+ dirPacker : null
379
+ } ) ,
377
380
dir : this . prefix
378
381
} ) )
379
382
) . tap ( ( ) => { this . timings . scripts += Date . now ( ) - start } )
Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ let workerFarm
12
12
const ENABLE_WORKERS = false
13
13
14
14
const ExtractOpts = figgyPudding ( {
15
- log : { }
15
+ log : { } ,
16
+ dirPacker : { }
16
17
} )
17
18
18
19
module . exports = {
Original file line number Diff line number Diff line change @@ -10,6 +10,20 @@ const extract = requireInject('../../../lib/extract.js', {
10
10
}
11
11
} )
12
12
13
+ test ( 'extract.child() ensures dirPacker is defined' , t => {
14
+ const name = 'name'
15
+ const child = { version : '0.0.0' , integrity : 'integrity' , resolved : 'resolved' }
16
+ const childPath = './path'
17
+
18
+ const opts = { log : { level : 'level' } , dirPacker : { } }
19
+ const a = extract . child ( name , child , childPath , opts )
20
+
21
+ a . then ( b => {
22
+ t . ok ( 'dirPacker' in b [ 2 ] , 'dirPacker is defined' )
23
+ t . end ( )
24
+ } )
25
+ } )
26
+
13
27
test ( 'extract.child() only overwrites dirPacker when opts.dirPacker is defined' , t => {
14
28
const name = 'name'
15
29
const child = { version : '0.0.0' , integrity : 'integrity' , resolved : 'resolved' }
You can’t perform that action at this time.
0 commit comments