(files: string[], rootDir = ROOT)
| 174 | } |
| 175 | |
| 176 | export function curateWindowsSafe(files: string[], rootDir = ROOT): CurationResult { |
| 177 | const safe: string[] = []; |
| 178 | const excluded: Array<{ file: string; reason: string }> = []; |
| 179 | const knownBad = new Map(KNOWN_WINDOWS_INCOMPATIBLE.map((e) => [e.file, e.reason])); |
| 180 | for (const relativePath of files) { |
| 181 | const knownReason = knownBad.get(relativePath); |
| 182 | if (knownReason) { |
| 183 | excluded.push({ file: relativePath, reason: knownReason }); |
| 184 | continue; |
| 185 | } |
| 186 | const absolute = path.join(rootDir, relativePath); |
| 187 | const fragility = detectWindowsFragility(absolute); |
| 188 | if (fragility) { |
| 189 | excluded.push({ file: relativePath, reason: fragility.reason }); |
| 190 | } else { |
| 191 | safe.push(relativePath); |
| 192 | } |
| 193 | } |
| 194 | return { safe, excluded }; |
| 195 | } |
| 196 | |
| 197 | export function stableHash(input: string): number { |
| 198 | let hash = 0x811c9dc5; |
no test coverage detected