* 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[])
| 2378 | * an enclosing one declares any of them. |
| 2379 | */ |
| 2380 | private frameworksForFile(filePath: string, names: string[]): string[] { |
| 2381 | if (this.gatedFrameworks.size === 0) return names; |
| 2382 | const slash = filePath.lastIndexOf('/'); |
| 2383 | const dir = slash < 0 ? '' : filePath.slice(0, slash); |
| 2384 | const kept = names.filter((name) => this.frameworkAppliesIn(dir, name)); |
| 2385 | return kept.length === names.length ? names : kept; |
| 2386 | } |
| 2387 | |
| 2388 | private frameworkAppliesIn(dir: string, name: string): boolean { |
| 2389 | const deps = this.gatedFrameworks.get(name); |
no test coverage detected