File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ function extractAndParseYAML(text) {
3434 meta . deprecated = arrify ( meta . deprecated ) ;
3535 }
3636
37+ if ( meta . removed ) {
38+ meta . removed = arrify ( meta . removed ) ;
39+ }
40+
3741 meta . changes = meta . changes || [ ] ;
3842
3943 return meta ;
Original file line number Diff line number Diff line change @@ -264,6 +264,7 @@ function parseYAML(text) {
264264
265265 const added = { description : '' } ;
266266 const deprecated = { description : '' } ;
267+ const removed = { description : '' } ;
267268
268269 if ( meta . added ) {
269270 added . version = meta . added . join ( ', ' ) ;
@@ -276,9 +277,15 @@ function parseYAML(text) {
276277 `<span>Deprecated since: ${ deprecated . version } </span>` ;
277278 }
278279
280+ if ( meta . removed ) {
281+ removed . version = meta . removed . join ( ', ' ) ;
282+ removed . description = `<span>Removed in: ${ removed . version } </span>` ;
283+ }
284+
279285 if ( meta . changes . length > 0 ) {
280286 if ( added . description ) meta . changes . push ( added ) ;
281287 if ( deprecated . description ) meta . changes . push ( deprecated ) ;
288+ if ( removed . description ) meta . changes . push ( removed ) ;
282289
283290 meta . changes . sort ( ( a , b ) => versionSort ( a . version , b . version ) ) ;
284291
@@ -299,7 +306,8 @@ function parseYAML(text) {
299306
300307 result += '</table>\n</details>\n' ;
301308 } else {
302- result += `${ added . description } ${ deprecated . description } \n` ;
309+ result += `${ added . description } ${ deprecated . description } ` +
310+ `${ removed . description } \n` ;
303311 }
304312
305313 if ( meta . napiVersion ) {
You can’t perform that action at this time.
0 commit comments