Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes ES3 as a recognized compiler target and adds error handling for ES5, porting changes from TypeScript PR #63067. The main issue addressed is that ES3 was both a valid value and the unset/default value, which caused tests without any target setting to be incorrectly skipped.
Changes:
- Removed ES3 from the valid target options
- Added error diagnostics for ES5 target usage
- Updated test infrastructure to handle unrecognized option values
- Generated new baseline files for previously skipped tests
Reviewed changes
Copilot reviewed 298 out of 355 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/tsoptions/enummaps.go | Removed ES3 entry from targetOptionMap |
| internal/tsoptions/commandlineoption.go | Removed "es3" from deprecated target options |
| internal/testutil/harnessutil/harnessutil.go | Added tryGetValueOfOptionString to handle unrecognized values; updated skipUnsupportedCompilerOptions to only skip ES5 |
| internal/core/scripttarget_stringer_generated.go | Removed ES3 from stringer generation |
| internal/core/compileroptions.go | Removed ScriptTargetES3 constant and updated ES5 deprecation comment |
| internal/compiler/program.go | Uncommented ES5 validation error |
| testdata/baselines/reference/* | New baseline files for tests that were previously skipped |
RyanCavanaugh
approved these changes
Feb 14, 2026
Member
Author
|
I have a fix for that skipped test; it's the same thing as #2134 but for functions/constructors. Enums also have the bug. |
DanielRosenwasser
approved these changes
Feb 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Largely ports microsoft/TypeScript#63067
This also removes ES3 as a value we even recognize. ES3 is the same as "unset", so in the PR where I bumped the submodule and skipped ES3/ES5 tests, I accidentally skipped all tests without any target set.
Such is the risk of having a valid value that is also the unset value.