File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -855,7 +855,29 @@ export default class Package {
855855 const mutex = MUTEX_SET . get ( "outdated-dependencies/" + dependency . name ) ;
856856
857857 if ( mutex . tryLock ( ) ) {
858- res = await this . npm . getPackageVersions ( dependency . name ) ;
858+ if ( dependency . gitRepositorySlug ) {
859+ res = await this . git . exec ( [ "ls-remote" , "--tags" , `https://github.com/${ dependency . gitRepositorySlug } ` ] ) ;
860+
861+ if ( res . ok ) {
862+ const versions = [ ] ;
863+
864+ for ( const line of res . data . split ( "\n" ) ) {
865+ const fields = line . split ( "\t" ) ,
866+ tag = fields [ 1 ] ?. replace ( "refs/tags/" , "" ) ;
867+
868+ if ( ! tag || tag . endsWith ( "^{}" ) ) continue ;
869+
870+ if ( SemanticVersion . isValid ( tag ) ) {
871+ versions . push ( tag ) ;
872+ }
873+ }
874+
875+ res . data = versions ;
876+ }
877+ }
878+ else {
879+ res = await this . npm . getPackageVersions ( dependency . name ) ;
880+ }
859881
860882 if ( res . ok ) {
861883 let latest , next ;
You can’t perform that action at this time.
0 commit comments