@@ -41,6 +41,7 @@ export class PackageNode {
41
41
constructor (
42
42
public name : string ,
43
43
public path : string ,
44
+ public location : string ,
44
45
public version : string ,
45
46
public type : "local" | "remote" | "editing"
46
47
) { }
@@ -163,7 +164,14 @@ export class PackageDependenciesProvider implements vscode.TreeDataProvider<Tree
163
164
const type = this . dependencyType ( dependency ) ;
164
165
const version = this . dependencyDisplayVersion ( dependency ) ;
165
166
const packagePath = this . dependencyPackagePath ( dependency , folderContext ) ;
166
- return new PackageNode ( dependency . packageRef . identity , packagePath , version , type ) ;
167
+ const location = dependency . packageRef . location ;
168
+ return new PackageNode (
169
+ dependency . packageRef . identity ,
170
+ packagePath ,
171
+ location ,
172
+ version ,
173
+ type
174
+ ) ;
167
175
} ) ?? [ ]
168
176
) ;
169
177
}
@@ -189,6 +197,7 @@ export class PackageDependenciesProvider implements vscode.TreeDataProvider<Tree
189
197
new PackageNode (
190
198
dependency . packageRef . identity ,
191
199
dependency . packageRef . location ,
200
+ dependency . packageRef . location ,
192
201
"local" ,
193
202
"local"
194
203
)
@@ -206,6 +215,7 @@ export class PackageDependenciesProvider implements vscode.TreeDataProvider<Tree
206
215
new PackageNode (
207
216
pin . identity ,
208
217
pin . location ,
218
+ pin . location ,
209
219
pin . state . version ?? pin . state . branch ?? pin . state . revision . substring ( 0 , 7 ) ,
210
220
"remote"
211
221
)
@@ -229,6 +239,7 @@ export class PackageDependenciesProvider implements vscode.TreeDataProvider<Tree
229
239
new PackageNode (
230
240
item . packageRef . identity ,
231
241
item . state . path ! ,
242
+ item . state . path ! ,
232
243
"local" ,
233
244
"editing"
234
245
)
@@ -284,6 +295,7 @@ export class PackageDependenciesProvider implements vscode.TreeDataProvider<Tree
284
295
return "remote" ;
285
296
}
286
297
}
298
+
287
299
/**
288
300
* Get version of WorkspaceStateDependency for displaying in the tree
289
301
* @param dependency
@@ -292,7 +304,7 @@ export class PackageDependenciesProvider implements vscode.TreeDataProvider<Tree
292
304
private dependencyDisplayVersion ( dependency : WorkspaceStateDependency ) : string {
293
305
const type = this . dependencyType ( dependency ) ;
294
306
if ( type === "editing" ) {
295
- return "editing" ; // ?TODO: get version from `baseOn` node for showing `editing 1.2.3`
307
+ return "editing" ;
296
308
} else if ( type === "local" ) {
297
309
return "local" ;
298
310
} else {
@@ -306,11 +318,12 @@ export class PackageDependenciesProvider implements vscode.TreeDataProvider<Tree
306
318
}
307
319
308
320
/**
309
- * Get type of WorkspaceStateDependency for displaying in the tree: real version | edited | local
310
- * `edited `: dependency.state.path ?? workspacePath + Packages/ + dependency.subpath
321
+ * * Get package source path of dependency
322
+ * `editing `: dependency.state.path ?? workspacePath + Packages/ + dependency.subpath
311
323
* `local`: dependency.packageRef.location
312
324
* `remote`: buildDirectory + checkouts + dependency.packageRef.location
313
325
* @param dependency
326
+ * @param workspaceFolder
314
327
* @return the package path based on the type
315
328
*/
316
329
private dependencyPackagePath (
0 commit comments