Skip to content

feat: add es2026 as a valid target and lib - #64096

Merged
Daniel Rosenwasser (DanielRosenwasser) merged 27 commits into
microsoft:mainfrom
a-tarasyuk:feat/63704
Sep 28, 2026
Merged

Daniel Rosenwasser (DanielRosenwasser) merged 27 commits into
microsoft:mainfrom
a-tarasyuk:feat/63704

Conversation

@a-tarasyuk

Copy link
Copy Markdown
Contributor

Fixes #63704

@typescript-automation typescript-automation Bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Aug 30, 2026
@a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk) marked this pull request as ready for review August 31, 2026 21:27
Copilot AI balanced review requested due to automatic review settings August 31, 2026 21:27

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

Adds ES2026 compiler-target and standard-library support, including the APIs requested by #63704.

Changes:

  • Registers es2026 as a target, default standard target, and library.
  • Adds ES2026 API declarations and preserves esnext.* aliases.
  • Adds conformance tests and refreshes generated baselines.

Reviewed changes

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

Show a summary per file
File Description
packages/typescript/src/enums/scriptTarget*.ts Exposes ES2026 publicly.
packages/typescript/test/{async,sync}/api.test.ts Updates target diagnostics.
tsc/internal/core/{compileroptions,scripttarget_stringer_generated}.go Defines and formats the target.
tsc/internal/tsoptions/enummaps.go Registers target, libraries, and compatibility aliases.
tsc/internal/transformers/estransforms/definitions.go Selects the ES2026 transform pipeline.
tsc/internal/checker/utilities.go Adds ES2026 library suggestions.
tsc/internal/bundled/libs/lib.es2026*.d.ts Defines the ES2026 library and APIs.
tsc/internal/bundled/libs/lib.esnext.d.ts Makes ESNext inherit ES2026.
tsc/internal/bundled/{embed_generated,libs_generated}.go Embeds and registers new libraries.
tsc/internal/compiler/program_test.go Updates expected ESNext library ordering.
tsc/testdata/fixtures/compiler/*.ts Synchronizes compiler fixtures.
tsc/testdata/tests/cases/conformance/es2026/*.ts Tests ES2026 APIs and diagnostics.
tsc/testdata/baselines/reference/** Refreshes generated compiler, build, watch, API, and conformance baselines.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@jakebailey
Jake Bailey (jakebailey) requested a balanced review from Copilot September 4, 2026 17:54

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.

🔵 Needs a closer look

The public target and library surface spans hundreds of generated baselines and warrants final human validation against the ES2026 specification.

Review details
  • Files reviewed: 136/540 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

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.

🟡 Changes recommended

The jsonRawJSON2 source and checked-in baselines disagree, causing baseline tests to fail.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 146/553 changed files
  • Comments generated: 1
  • Review effort level: Balanced

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.

Copilot review overview

🟢 Approval recommended

The target, libraries, API surface, and conformance coverage are coherent; only a non-blocking JSDoc typo remains.

Review effort: Balanced
Findings: None

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.

Copilot review overview

🟢 Approval recommended

The target registration, library declarations, API exposure, and corresponding baselines are consistent and adequately tested.

Review effort: Balanced
Findings: None

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.

Copilot review overview

🟢 Approval recommended

Target registration, library declarations, compatibility mappings, and conformance coverage are consistent.

Review effort: Balanced
Findings: None

@jakebailey Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we typically add a slew of tests for lib files but, it's fine

@DanielRosenwasser

Copy link
Copy Markdown
Member

I am happy to have lib tests to be honest.

Separately, it looks like we have some baseline merge conflicts though.

Merged via the queue into microsoft:main with commit 75e50a4 Sep 28, 2026
29 checks passed
@Phil2812

Philipp B. (Phil2812) commented Oct 29, 2026 •

Copy link
Copy Markdown

Hello,

Regarding the JSON change, shouldn't the reviver parameter of JSON.parse remain optional in the definition?

Including the changed definition (just lib.es2026.json.d.ts), JSON.parse works fine, but Parameters<JSON["parse"]> returns the wrong type (reviver parameter non-optional).

I am not set up to contribute to the project, so my apologies if this is not the right place to report this.

Cheers,
Philipp

@jakebailey

Copy link
Copy Markdown
Member

Philipp B. (@Phil2812) please file an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add es2026 as valid target and lib

5 participants