Skip to content

Commit f7d693d

Browse files
author
Max Schaefer
committed
JavaScript: Make default extractor options more sensible.
We now use module auto-detection and no TypeScript mode. This only affects extern extraction in `AutoBuild`, everything else sets these options explicitly. We currently do not have any ES2015 modules or TypeScript code in our externs, so in practice this is behaviour-preserving.
1 parent a7290e5 commit f7d693d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)