@@ -6,7 +6,6 @@ const pacote = require('pacote')
6
6
const { join } = require ( 'node:path' )
7
7
const { depth } = require ( 'treeverse' )
8
8
const crypto = require ( 'node:crypto' )
9
- const path = require ( 'node:path' )
10
9
11
10
// cache complicated function results
12
11
const memoize = ( fn ) => {
@@ -82,7 +81,7 @@ module.exports = cls => class IsolatedReifier extends cls {
82
81
}
83
82
queue . push ( e . to )
84
83
} )
85
- if ( ! next . isProjectRoot && ! next . isWorkspace && ! next . ideallyInert ) {
84
+ if ( ! next . isProjectRoot && ! next . isWorkspace ) {
86
85
root . external . push ( await this . externalProxyMemo ( next ) )
87
86
}
88
87
}
@@ -150,8 +149,8 @@ module.exports = cls => class IsolatedReifier extends cls {
150
149
const nonOptionalDeps = edges . filter ( e => ! e . optional ) . map ( e => e . to . target )
151
150
152
151
result . localDependencies = await Promise . all ( nonOptionalDeps . filter ( n => n . isWorkspace ) . map ( this . workspaceProxyMemo ) )
153
- result . externalDependencies = await Promise . all ( nonOptionalDeps . filter ( n => ! n . isWorkspace && ! n . ideallyInert ) . map ( this . externalProxyMemo ) )
154
- result . externalOptionalDependencies = await Promise . all ( optionalDeps . filter ( n => ! n . ideallyInert ) . map ( this . externalProxyMemo ) )
152
+ result . externalDependencies = await Promise . all ( nonOptionalDeps . filter ( n => ! n . isWorkspace ) . map ( this . externalProxyMemo ) )
153
+ result . externalOptionalDependencies = await Promise . all ( optionalDeps . map ( this . externalProxyMemo ) )
155
154
result . dependencies = [
156
155
...result . externalDependencies ,
157
156
...result . localDependencies ,
@@ -324,11 +323,11 @@ module.exports = cls => class IsolatedReifier extends cls {
324
323
isRoot : false ,
325
324
isInStore : inStore ,
326
325
path : node . isLink ?
327
- join ( proxiedIdealTree . root . localPath , node . locationPath || '' , location ) :
328
- join ( proxiedIdealTree . root . localPath , location ) ,
326
+ join ( proxiedIdealTree . root . localPath , node . localPath || '' , location ) :
327
+ join ( proxiedIdealTree . root . localPath , location ) ,
329
328
realpath : node . isLink ?
330
- join ( proxiedIdealTree . root . localPath , node . locationPath || '' , location ) :
331
- join ( proxiedIdealTree . root . localPath , location ) ,
329
+ join ( proxiedIdealTree . root . localPath , node . localPath || '' , location ) :
330
+ join ( proxiedIdealTree . root . localPath , location ) ,
332
331
resolved : node . resolved ,
333
332
version : pkg . version ,
334
333
package : pkg ,
@@ -375,18 +374,17 @@ module.exports = cls => class IsolatedReifier extends cls {
375
374
} else {
376
375
from = node . isProjectRoot ? root : root . fsChildren . find ( c => c . location === node . localLocation )
377
376
nmFolder = node . isLink ?
378
- join ( proxiedIdealTree . root . localPath , node . localLocation || '' , 'node_modules' ) :
379
- join ( node . localLocation , 'node_modules' )
377
+ join ( proxiedIdealTree . root . localPath , node . localLocation || '' , 'node_modules' ) :
378
+ join ( node . localLocation , 'node_modules' )
380
379
}
381
380
382
381
const processDeps = ( dep , optional , external ) => {
383
382
optional = ! ! optional
384
383
external = ! ! external
385
-
384
+
386
385
const location = dep . isLink ?
387
386
join ( proxiedIdealTree . root . localPath , dep . localLocation || '' , 'node_modules' , dep . name ) :
388
387
join ( nmFolder , dep . name )
389
-
390
388
const binNames = dep . package . bin && Object . keys ( dep . package . bin ) || [ ]
391
389
const toKey = getKey ( dep )
392
390
@@ -401,9 +399,9 @@ module.exports = cls => class IsolatedReifier extends cls {
401
399
402
400
binNames . forEach ( bn => {
403
401
const binPath = dep . isLink ?
404
- join ( proxiedIdealTree . root . localPath , from . realpath , 'node_modules' , '.bin' , bn ) :
405
- join ( from . realpath , 'node_modules' , 'bin' , bn )
406
- target . binpaths . push ( binpath )
402
+ join ( proxiedIdealTree . root . localPath , from . realpath , 'node_modules' , '.bin' , bn ) :
403
+ join ( from . realpath , 'node_modules' , '. bin' , bn )
404
+ target . binPaths . push ( binPath )
407
405
} )
408
406
409
407
const link = {
0 commit comments