@@ -724,7 +724,7 @@ export default class Package {
724724 outdatedDependencies [ dependency . name ] = [ ] ;
725725 }
726726 else if ( ! Array . isArray ( outdatedDependencies [ dependency . name ] ) ) {
727- outdatedDependencies [ name ] = [ outdatedDependencies [ dependency . name ] ] ;
727+ outdatedDependencies [ dependency . name ] = [ outdatedDependencies [ dependency . name ] ] ;
728728 }
729729
730730 outdatedDependencies [ dependency . name ] . push ( {
@@ -785,29 +785,32 @@ export default class Package {
785785
786786 for ( const spec of specs ) {
787787
788- // updatable dependency
789- spec . updatable = locations [ spec . location ] ;
788+ // outdated dependency
789+ spec . outdated = spec . wanted !== spec . latest ;
790790
791- // not-outdated dependency, can be updated to the latest version
792- if ( spec . wanted === spec . latest ) {
793- spec . outdated = false ;
794- }
791+ // include installed, updatable deps by default
792+ let include ;
795793
796- // outdated dependency, can not be updated to the latest version
797- else {
798- spec . outdated = true ;
794+ if ( spec . linked ) {
795+ spec . updatable = true ;
796+
797+ include = true ;
799798 }
799+ else {
800+ spec . updatable = locations [ spec . location ] ;
800801
801- // include installed, updatable deps by default
802- let include = spec . current && spec . updatable ;
802+ if ( spec . updatable && spec . current ) {
803+ include = true ;
804+ }
805+ }
803806
804807 // include outdated deps
805808 if ( outdated && spec . outdated ) {
806809 include = true ;
807810 }
808811
809812 // include linked deps
810- if ( linked && spec . linked ) {
813+ if ( spec . linked ) {
811814 include = true ;
812815 }
813816
@@ -819,7 +822,7 @@ export default class Package {
819822 if ( ! include ) continue ;
820823
821824 // updatable dependency
822- if ( spec . updatable || spec . linked ) {
825+ if ( spec . updatable ) {
823826 hasUpdates = true ;
824827 }
825828
0 commit comments