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.
This commit is contained in:
Max Schaefer
2018-11-09 15:53:28 +00:00
parent a7290e5aeb
commit f7d693d06f

View File

@@ -162,7 +162,7 @@ public class ExtractorConfig {
this.ecmaVersion = experimental ? ECMAVersion.ECMA2019 : ECMAVersion.ECMA2018;
this.platform = Platform.AUTO;
this.jsx = true;
this.sourceType = SourceType.SCRIPT;
this.sourceType = SourceType.AUTO;
this.htmlHandling = HTMLHandling.ELEMENTS;
this.tolerateParseErrors = true;
if (experimental) {
@@ -171,6 +171,7 @@ public class ExtractorConfig {
this.esnext = true;
this.v8Extensions = true;
}
this.typescriptMode = TypeScriptMode.NONE;
this.defaultEncoding = StandardCharsets.UTF_8.name();
}