Skip to content

Bump tsconfig target/lib from es6 to es2022 - #2761

Merged
nagilson merged 1 commit into
dotnet:mainfrom
nagilson:nagilson/tsconfig-es2022-target
Aug 4, 2026
Merged

Bump tsconfig target/lib from es6 to es2022#2761
nagilson merged 1 commit into
dotnet:mainfrom
nagilson:nagilson/tsconfig-es2022-target

Conversation

@nagilson

@nagilson nagilson commented Jul 21, 2026

Copy link
Copy Markdown
Member

The library and extensions set target and lib to es6 (ES2015) in all tsconfig files. ES2015 predates Array.prototype.includes (ES2016), so the many .includes() calls across the codebase raised TS2550: "Property 'includes' does not exist on type 'string[]'. ... Try changing the 'lib' compiler option to 'es2016' or later."

lib/target are compile-time only and are independent of the VS Code runtime. The extensions declare engines.vscode: ^1.101.0, and VS Code 1.101 runs on Node 22.15.1 (Electron 35.5.1), which fully supports ES2022. Newer VS Code builds ship even newer Node versions (https://github.com/ewanharris/vscode-versions), so ES2022 is safe against the minimum supported host.

The library and extensions set `target` and `lib` to `es6` (ES2015) in all
tsconfig files. ES2015 predates `Array.prototype.includes` (ES2016), so the
many `.includes()` calls across the codebase raised TS2550:
"Property 'includes' does not exist on type 'string[]'. ... Try changing the
'lib' compiler option to 'es2016' or later."

`lib`/`target` are compile-time only and are independent of the VS Code
runtime. The extensions declare `engines.vscode: ^1.101.0`, and VS Code 1.101
runs on Node 22.15.1 (Electron 35.5.1), which fully supports ES2022. Newer
VS Code builds ship even newer Node, so ES2022 is safe against the minimum
supported host.

Updated files: vscode-dotnet-runtime-library, vscode-dotnet-runtime-extension,
vscode-dotnet-sdk-extension, sample, and tsconfig.eslint.json.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nagilson
nagilson marked this pull request as ready for review July 21, 2026 23:04
Copilot AI review requested due to automatic review settings July 21, 2026 23:04
@nagilson
nagilson requested a review from a team July 21, 2026 23:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the TypeScript compile-time configuration across the library, extensions, and sample to target ES2022, resolving TS2550 errors for newer JS APIs (e.g., Array.prototype.includes) while remaining compatible with the minimum supported VS Code engine (^1.101.0).

Changes:

  • Bumped compilerOptions.target from es6 to es2022 in all repo tsconfig files.
  • Bumped compilerOptions.lib from ["es6"] to ["es2022"] in all repo tsconfig files.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vscode-dotnet-sdk-extension/tsconfig.json Targets ES2022 for SDK extension TypeScript compilation.
vscode-dotnet-runtime-library/tsconfig.json Targets ES2022 for the shared acquisition library compilation.
vscode-dotnet-runtime-extension/tsconfig.json Targets ES2022 for runtime extension TypeScript compilation.
tsconfig.eslint.json Aligns ESLint TypeScript project settings with ES2022.
sample/tsconfig.json Targets ES2022 for the sample extension compilation.

@nagilson
nagilson added this pull request to the merge queue Jul 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 24, 2026
@nagilson
nagilson added this pull request to the merge queue Aug 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 4, 2026
@nagilson
nagilson merged commit 0954baf into dotnet:main Aug 4, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants