mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
support for .mts and .cts file extensions
This commit is contained in:
@@ -141,8 +141,9 @@ public class Fetcher {
|
||||
entryPath = entryPath.subpath(1, entryPath.getNameCount());
|
||||
|
||||
String filename = entryPath.getFileName().toString();
|
||||
if (!filename.endsWith(".d.ts") && !filename.equals("package.json")) {
|
||||
continue; // Only extract .d.ts files and package.json
|
||||
if (!filename.endsWith(".d.ts") && !filename.endsWith(".d.mts") && !filename.endsWith(".d.cts")
|
||||
&& !filename.equals("package.json")) {
|
||||
continue; // Only extract .d.ts, .d.mts, .d.cts files, and package.json
|
||||
}
|
||||
relativePaths.add(entryPath);
|
||||
Path outputFile = destDir.resolve(entryPath);
|
||||
|
||||
@@ -203,7 +203,7 @@ public class FileExtractor {
|
||||
}
|
||||
},
|
||||
|
||||
TYPESCRIPT(".ts", ".tsx") {
|
||||
TYPESCRIPT(".ts", ".tsx", ".mts", ".cts") {
|
||||
@Override
|
||||
protected boolean contains(File f, String lcExt, ExtractorConfig config) {
|
||||
if (config.getTypeScriptMode() == TypeScriptMode.NONE) return false;
|
||||
|
||||
Reference in New Issue
Block a user