@@ -258,25 +258,20 @@ export class SwiftPackage {
258258 ) : Promise < SwiftPackageState > {
259259 try {
260260 // Use swift package describe to describe the package targets, products, and platforms
261- const describe = await execSwift ( [ "package" , "describe" , "--type" , "json" ] , toolchain , {
262- cwd : folder . fsPath ,
263- } ) ;
264- const packageState = JSON . parse (
265- SwiftPackage . trimStdout ( describe . stdout )
266- ) as PackageContents ;
267-
268261 // Use swift package show-dependencies to get the dependencies in a tree format
269- const dependencies = await execSwift (
270- [ "package" , "show-dependencies" , "--format" , "json" ] ,
271- toolchain ,
272- {
262+ const [ describe , dependencies ] = await Promise . all ( [
263+ execSwift ( [ "package" , "describe" , "--type" , "json" ] , toolchain , {
273264 cwd : folder . fsPath ,
274- }
275- ) ;
265+ } ) ,
266+ execSwift ( [ "package" , "show-dependencies" , "--format" , "json" ] , toolchain , {
267+ cwd : folder . fsPath ,
268+ } ) ,
269+ ] ) ;
276270
277- packageState . dependencies = JSON . parse (
278- SwiftPackage . trimStdout ( dependencies . stdout )
279- ) . dependencies ;
271+ const packageState = {
272+ ...( JSON . parse ( SwiftPackage . trimStdout ( describe . stdout ) ) as PackageContents ) ,
273+ dependencies : JSON . parse ( SwiftPackage . trimStdout ( dependencies . stdout ) ) . dependencies ,
274+ } ;
280275
281276 return packageState ;
282277 } catch ( error ) {
0 commit comments