@@ -15,6 +15,7 @@ interface Stats {
1515 critical : number ;
1616 notices : number ;
1717 unmaintained : number ;
18+ unsound : number ;
1819 other : number ;
1920}
2021
@@ -89,6 +90,7 @@ function getStats(
8990 let critical = 0 ;
9091 let notices = 0 ;
9192 let unmaintained = 0 ;
93+ let unsound = 0 ;
9294 let other = 0 ;
9395 for ( const vulnerability of vulnerabilities ) {
9496 switch ( vulnerability . advisory . informational ) {
@@ -98,6 +100,9 @@ function getStats(
98100 case 'unmaintained' :
99101 unmaintained += 1 ;
100102 break ;
103+ case 'unsound' :
104+ unsound += 1 ;
105+ break ;
101106 case null :
102107 critical += 1 ;
103108 break ;
@@ -113,6 +118,10 @@ function getStats(
113118 unmaintained += 1 ;
114119 break ;
115120
121+ case 'unsound' :
122+ unsound += 1 ;
123+ break ;
124+
116125 default :
117126 // Both yanked and informational types of kind
118127 other += 1 ;
@@ -124,6 +133,7 @@ function getStats(
124133 critical : critical ,
125134 notices : notices ,
126135 unmaintained : unmaintained ,
136+ unsound : unsound ,
127137 other : other ,
128138 } ;
129139}
@@ -132,15 +142,17 @@ function getSummary(stats: Stats): string {
132142 const blocks : string [ ] = [ ] ;
133143
134144 if ( stats . critical > 0 ) {
135- // TODO: Plural
136- blocks . push ( `${ stats . critical } advisory(ies)` ) ;
145+ blocks . push ( `${ stats . critical } advisories` ) ;
137146 }
138147 if ( stats . notices > 0 ) {
139148 blocks . push ( `${ stats . notices } notice${ plural ( stats . notices ) } ` ) ;
140149 }
141150 if ( stats . unmaintained > 0 ) {
142151 blocks . push ( `${ stats . unmaintained } unmaintained` ) ;
143152 }
153+ if ( stats . unsound > 0 ) {
154+ blocks . push ( `${ stats . unsound } unsound` ) ;
155+ }
144156 if ( stats . other > 0 ) {
145157 blocks . push ( `${ stats . other } other` ) ;
146158 }
@@ -275,6 +287,8 @@ export async function reportIssues(
275287 for ( const warning of warnings ) {
276288 let advisory : interfaces . Advisory ;
277289 switch ( warning . kind ) {
290+ case 'unsound' :
291+ case 'notice' :
278292 case 'unmaintained' :
279293 case 'informational' :
280294 advisory = warning . advisory ;
0 commit comments