( diff: ApiDiff, annotations: ReadonlyMap<string, MigrationAnnotation>, importMapSections = "" )
| 430 | } |
| 431 | |
| 432 | export const renderMissingAnnotations = ( |
| 433 | diff: ApiDiff, |
| 434 | annotations: ReadonlyMap<string, MigrationAnnotation>, |
| 435 | importMapSections = "" |
| 436 | ): string => { |
| 437 | const missingApis = unannotatedApiIds(diff, annotations, importMapSections) |
| 438 | const missingModules = unannotatedModuleIds(diff, annotations, importMapSections) |
| 439 | if (missingApis.size === 0 && missingModules.length === 0) { |
| 440 | return "All migration APIs and removed modules have guidance.\n" |
| 441 | } |
| 442 | return `${ |
| 443 | [ |
| 444 | ...(missingModules.length === 0 ? [] : ["Removed modules:", ...missingModules.map((module) => ` - ${module}`)]), |
| 445 | ...[...missingApis].flatMap(([module, ids]) => [ |
| 446 | `${module}:`, |
| 447 | ...ids.map((id) => ` - ${id}`) |
| 448 | ]) |
| 449 | ].join("\n") |
| 450 | }\n` |
| 451 | } |
no test coverage detected