( diff: ApiDiff, annotations: ReadonlyMap<string, MigrationAnnotation>, importMapSections = "" )
| 446 | } |
| 447 | |
| 448 | export const renderMissingAnnotations = ( |
| 449 | diff: ApiDiff, |
| 450 | annotations: ReadonlyMap<string, MigrationAnnotation>, |
| 451 | importMapSections = "" |
| 452 | ): string => { |
| 453 | const missingApis = unannotatedApiIds(diff, annotations, importMapSections) |
| 454 | const missingModules = unannotatedModuleIds(diff, annotations, importMapSections) |
| 455 | if (missingApis.size === 0 && missingModules.length === 0) { |
| 456 | return "All migration APIs and removed modules have guidance.\n" |
| 457 | } |
| 458 | return `${ |
| 459 | [ |
| 460 | ...(missingModules.length === 0 ? [] : ["Removed modules:", ...missingModules.map((module) => ` - ${module}`)]), |
| 461 | ...[...missingApis].flatMap(([module, ids]) => [ |
| 462 | `${module}:`, |
| 463 | ...ids.map((id) => ` - ${id}`) |
| 464 | ]) |
| 465 | ].join("\n") |
| 466 | }\n` |
| 467 | } |
no test coverage detected