Skip to content

Commit 2f0e693

Browse files
authored
Merge pull request #450 from xiemaisi/js/improve-externs-extractor-options
Approved by esben-semmle
2 parents 663bdd6 + 63933cd commit 2f0e693

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public void run() throws IOException {
373373
* externs.
374374
*/
375375
private void extractExterns() throws IOException {
376-
ExtractorConfig config = new ExtractorConfig(true).withExterns(true);
376+
ExtractorConfig config = new ExtractorConfig(false).withExterns(true);
377377
FileExtractor extractor = new FileExtractor(config, outputConfig, trapCache, extractorState);
378378
FileVisitor<? super Path> visitor = new SimpleFileVisitor<Path>() {
379379
@Override

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public ExtractorConfig(boolean experimental) {
162162
this.ecmaVersion = experimental ? ECMAVersion.ECMA2019 : ECMAVersion.ECMA2018;
163163
this.platform = Platform.AUTO;
164164
this.jsx = true;
165-
this.sourceType = SourceType.SCRIPT;
165+
this.sourceType = SourceType.AUTO;
166166
this.htmlHandling = HTMLHandling.ELEMENTS;
167167
this.tolerateParseErrors = true;
168168
if (experimental) {
@@ -171,6 +171,7 @@ public ExtractorConfig(boolean experimental) {
171171
this.esnext = true;
172172
this.v8Extensions = true;
173173
}
174+
this.typescriptMode = TypeScriptMode.NONE;
174175
this.defaultEncoding = StandardCharsets.UTF_8.name();
175176
}
176177

0 commit comments

Comments
 (0)