* 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[])
| 2549 | * an enclosing one declares any of them. |
| 2550 | */ |
| 2551 | private frameworksForFile(filePath: string, names: string[]): string[] { |
| 2552 | if (this.gatedFrameworks.size === 0) return names; |
| 2553 | const slash = filePath.lastIndexOf('/'); |
| 2554 | const dir = slash < 0 ? '' : filePath.slice(0, slash); |
| 2555 | const kept = names.filter((name) => this.frameworkAppliesIn(dir, name)); |
| 2556 | return kept.length === names.length ? names : kept; |
| 2557 | } |
| 2558 | |
| 2559 | private frameworkAppliesIn(dir: string, name: string): boolean { |
| 2560 | const deps = this.gatedFrameworks.get(name); |
no test coverage detected