* The detected frameworks whose extractors apply to `filePath`: all of them, * except one with `appDependencies` when neither the file's package.json nor * an enclosing one declares any of them.
(filePath: string, names: string[])
| 2415 | * an enclosing one declares any of them. |
| 2416 | */ |
| 2417 | private frameworksForFile(filePath: string, names: string[]): string[] { |
| 2418 | if (this.gatedFrameworks.size === 0) return names; |
| 2419 | const slash = filePath.lastIndexOf('/'); |
| 2420 | const dir = slash < 0 ? '' : filePath.slice(0, slash); |
| 2421 | const kept = names.filter((name) => this.frameworkAppliesIn(dir, name)); |
| 2422 | return kept.length === names.length ? names : kept; |
| 2423 | } |
| 2424 | |
| 2425 | private frameworkAppliesIn(dir: string, name: string): boolean { |
| 2426 | const deps = this.gatedFrameworks.get(name); |
no test coverage detected