@@ -200,7 +200,8 @@ export class OutdatedCommand extends BaseCommand {
200200 project ,
201201 fetcher ,
202202 dependencies ,
203- progress
203+ progress ,
204+ report
204205 )
205206 }
206207 )
@@ -422,11 +423,12 @@ export class OutdatedCommand extends BaseCommand {
422423 project : Project ,
423424 fetcher : DependencyFetcher ,
424425 dependencies : DependencyInfo [ ] ,
425- progress ?: ReturnType < typeof Report [ "progressViaCounter" ] >
426+ progress ?: ReturnType < typeof Report [ "progressViaCounter" ] > ,
427+ report ?: StreamReport
426428 ) : Promise < OutdatedDependency [ ] > {
427429 const outdated = dependencies . map (
428430 async ( { dependencyType, descriptor, name, pkg, workspace } ) => {
429- const { latest, range, url } = await fetcher . fetch ( {
431+ const { error , latest, range, url } = await fetcher . fetch ( {
430432 descriptor,
431433 includeRange : this . includeRange ,
432434 includeURL : this . includeURL ( configuration ) ,
@@ -436,7 +438,16 @@ export class OutdatedCommand extends BaseCommand {
436438 // JSON reports don't use progress, so this only applies for non-JSON cases.
437439 progress ?. tick ( )
438440
439- if ( isVersionOutdated ( pkg . version ! , latest ) ) {
441+ if ( error instanceof Error ) {
442+ report ?. reportError (
443+ MessageName . UNNAMED ,
444+ `Failed to fetch ${ name } : ${ error . message } `
445+ )
446+
447+ return
448+ }
449+
450+ if ( latest && isVersionOutdated ( pkg . version ! , latest ) ) {
440451 return {
441452 current : pkg . version ! ,
442453 latest,
0 commit comments