@@ -122,7 +122,7 @@ export async function lockfileToDepGraph (
122
122
...( opts . include . optionalDependencies ? pkgSnapshot . optionalDependencies : { } ) ,
123
123
}
124
124
const peerDeps = pkgSnapshot . peerDependencies ? new Set ( Object . keys ( pkgSnapshot . peerDependencies ) ) : null
125
- node . children = _getChildrenPaths ( allDeps , peerDeps , '.' )
125
+ node . children = _getChildrenPaths ( allDeps , peerDeps , node . dir )
126
126
}
127
127
128
128
const directDependenciesByImporterId : DirectDependenciesByImporterId = { }
@@ -265,13 +265,13 @@ function getChildrenPaths (
265
265
ctx : GetChildrenPathsContext ,
266
266
allDeps : { [ alias : string ] : string } ,
267
267
peerDeps : Set < string > | null ,
268
- importerId : string
268
+ importerDir : string
269
269
) : { [ alias : string ] : string } {
270
270
const children : { [ alias : string ] : string } = { }
271
271
for ( const [ alias , ref ] of Object . entries ( allDeps ) ) {
272
272
const childDepPath = dp . refToRelative ( ref , alias )
273
273
if ( childDepPath === null ) {
274
- children [ alias ] = path . resolve ( ctx . lockfileDir , importerId , ref . slice ( 5 ) )
274
+ children [ alias ] = path . resolve ( importerDir , ref . slice ( 5 ) )
275
275
continue
276
276
}
277
277
const childRelDepPath = dp . refToRelative ( ref , alias ) !
0 commit comments