Skip to content

Commit dfe276a

Browse files
authored
Merge pull request #9715 from asgerf/js/always-check-file-header
JS: always sniff file header of TypeScript files
2 parents c72377c + c8b2be6 commit dfe276a

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

javascript/extractor/src/com/semmle/js/extractor/FileExtractor.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@ protected boolean contains(File f, String lcExt, ExtractorConfig config) {
217217
}
218218

219219
private boolean hasBadFileHeader(File f, String lcExt, ExtractorConfig config) {
220-
if (!".ts".equals(lcExt)) {
221-
return false;
222-
}
223220
try (FileInputStream fis = new FileInputStream(f)) {
224221
byte[] bytes = new byte[fileHeaderSize];
225222
int length = fis.read(bytes);

javascript/extractor/src/com/semmle/js/extractor/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class Main {
4343
* A version identifier that should be updated every time the extractor changes in such a way that
4444
* it may produce different tuples for the same file under the same {@link ExtractorConfig}.
4545
*/
46-
public static final String EXTRACTOR_VERSION = "2022-06-08";
46+
public static final String EXTRACTOR_VERSION = "2022-06-27";
4747

4848
public static final Pattern NEWLINE = Pattern.compile("\n");
4949

0 commit comments

Comments
 (0)