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