( id: string, changes: ReadonlyArray<ApiChange>, removed: ReadonlySet<string>, replacements: ReadonlyMap<string, ReadonlyArray<string>>, addedSignatures: ReadonlyMap<string, ReadonlyArray<string>> )
| 137 | } |
| 138 | |
| 139 | const isUnchangedModuleMove = ( |
| 140 | id: string, |
| 141 | changes: ReadonlyArray<ApiChange>, |
| 142 | removed: ReadonlySet<string>, |
| 143 | replacements: ReadonlyMap<string, ReadonlyArray<string>>, |
| 144 | addedSignatures: ReadonlyMap<string, ReadonlyArray<string>> |
| 145 | ): boolean => { |
| 146 | const separator = id.indexOf("#") |
| 147 | const module = id.slice(0, separator) |
| 148 | const targets = replacements.get(module) |
| 149 | if (separator === -1 || !removed.has(module) || targets === undefined) { |
| 150 | return false |
| 151 | } |
| 152 | const before = changes |
| 153 | .filter((change) => change.classification === "api-removed" && change.before !== undefined) |
| 154 | .map((change) => change.before!) |
| 155 | .sort(compareStrings) |
| 156 | if (before.length === 0) { |
| 157 | return false |
| 158 | } |
| 159 | const path = id.slice(separator + 1) |
| 160 | return targets.some((target) => { |
| 161 | const after = addedSignatures.get(`${target}#${path}`) |
| 162 | return after !== undefined && sameStrings(before, after) |
| 163 | }) |
| 164 | } |
| 165 | |
| 166 | const isRemovalCoveredByModule = ( |
| 167 | id: string, |
no test coverage detected