(importMapSections: string)
| 86 | } |
| 87 | |
| 88 | const importMapReplacements = (importMapSections: string): ReadonlyMap<string, ReadonlyArray<string>> => { |
| 89 | const replacements = new Map<string, Array<string>>() |
| 90 | for (const line of importMapSections.split("\n")) { |
| 91 | const match = /^(\S+) -> (\S+)(?: \(barrel: [^)]+\))?$/.exec(line) |
| 92 | if (match === null) { |
| 93 | continue |
| 94 | } |
| 95 | const targets = replacements.get(match[1]!) |
| 96 | if (targets === undefined) { |
| 97 | replacements.set(match[1]!, [match[2]!]) |
| 98 | } else if (!targets.includes(match[2]!)) { |
| 99 | targets.push(match[2]!) |
| 100 | } |
| 101 | } |
| 102 | return replacements |
| 103 | } |
| 104 | |
| 105 | const removedModules = (diff: ApiDiff): ReadonlyArray<string> => |
| 106 | [ |
no test coverage detected