JS: Ensure tsconfig.json files are extracted in qltest

QLTests still use the Main.java entry point, which didn't extract tsconfig.json and didn't allow non-standard JSON syntax such as trailing commas that are allowed in tsconfig.json files.
This commit is contained in:
Asger F
2025-04-04 00:01:46 +02:00
parent ec4b3ef202
commit 190dfce9c5
2 changed files with 5 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ public class JSONExtractor implements IExtractor {
private final boolean tolerateParseErrors;
public JSONExtractor(ExtractorConfig config) {
this.tolerateParseErrors = config.isTolerateParseErrors();
this.tolerateParseErrors = true;
}
@Override

View File

@@ -303,7 +303,10 @@ public class Main {
addIncludesFor(includes, FileType.JS);
// extract TypeScript if `--typescript` or `--typescript-full` was specified
if (getTypeScriptMode(ap) != TypeScriptMode.NONE) addIncludesFor(includes, FileType.TYPESCRIPT);
if (getTypeScriptMode(ap) != TypeScriptMode.NONE) {
addIncludesFor(includes, FileType.TYPESCRIPT);
includes.add("**/tsconfig*.json");
}
// add explicit include patterns
for (String pattern : ap.getZeroOrMore(P_INCLUDE))