diff --git a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java index 416fa237e97e..82dcc0bc2a7d 100644 --- a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java +++ b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java @@ -794,7 +794,7 @@ private CompletableFuture extractSource() throws IOException { } } // exclude files in output directories as configured in tsconfig.json - filesToExtract.removeIf(f -> outDirs.stream().anyMatch(od -> f.startsWith(od))); + filesToExtract.removeIf(f -> FileType.forFileExtension(f.toFile()) == FileType.JS && outDirs.stream().anyMatch(od -> f.startsWith(od))); DependencyInstallationResult dependencyInstallationResult = DependencyInstallationResult.empty; if (!tsconfigFiles.isEmpty()) { diff --git a/javascript/ql/src/change-notes/2026-01-08-out-dir-filtering.md b/javascript/ql/src/change-notes/2026-01-08-out-dir-filtering.md new file mode 100644 index 000000000000..0fa9d6f05c76 --- /dev/null +++ b/javascript/ql/src/change-notes/2026-01-08-out-dir-filtering.md @@ -0,0 +1,6 @@ +--- +category: fix +--- +* Fixed a bug that would cause `.ts` files to be skipped when they were inside the `outDir` of + the corresponding `tsconfig.json` file. Now only JavaScript files are excluded when they appear + in the `outDir`.