Update default target from ES3 to ES5 (#51731)

* Change the default emit target to ES5

* Add baseline update

* Remove tests with a hardcoded sourcemap in it

* Update hardcoded tests

* Merge with main

* Restore tests
This commit is contained in:
Ryan Cavanaugh
2022-12-08 16:43:47 -08:00
committed by GitHub
parent 3716ffe748
commit a3dbe7dc70
2983 changed files with 10122 additions and 12098 deletions

View File

@@ -7514,11 +7514,11 @@ export function getSetExternalModuleIndicator(options: CompilerOptions): (file:
}
/** @internal */
export function getEmitScriptTarget(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) {
export function getEmitScriptTarget(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}): ScriptTarget {
return compilerOptions.target ||
(compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) ||
(compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) ||
ScriptTarget.ES3;
ScriptTarget.ES5;
}
/** @internal */