From bd4ead17a329d14d93e0071b8040eea6a51d7cb5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Sep 2025 23:22:57 +0000 Subject: [PATCH] Change default target from ES5 to ESNext in compiler Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com> --- src/compiler/commandLineParser.ts | 2 +- src/compiler/utilities.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 345eff35052..9ff0bf0930b 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -583,7 +583,7 @@ export const targetOptionDeclaration: CommandLineOptionOfCustomType = { showInSimplifiedHelpView: true, category: Diagnostics.Language_and_Environment, description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations, - defaultValueDescription: ScriptTarget.ES5, + defaultValueDescription: ScriptTarget.ESNext, }; /** @internal */ diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 3f79843f31a..add8b7a98d7 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -8989,7 +8989,7 @@ const _computedOptions = createComputedCompilerOptions({ (compilerOptions.module === ModuleKind.Node18 && ScriptTarget.ES2022) || (compilerOptions.module === ModuleKind.Node20 && ScriptTarget.ES2023) || (compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) || - ScriptTarget.ES5); + ScriptTarget.ESNext); }, }, module: {