-
Notifications
You must be signed in to change notification settings - Fork 616
Port in ES2024 #727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port in ES2024 #727
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request ports in ES2024 support as described in microsoft/TypeScript#58573. The changes introduce new compiler targets, update library mappings and baselines, adjust error messages, and update embedded resources to incorporate the ES2024 libraries.
- Add a new ScriptTarget (ES2024) and update corresponding enums and error messages.
- Update library maps, baselines, and generated/embedded resources to include ES2024 libraries.
- Adjust feature maps to reflect ES2024 additions.
Reviewed Changes
Copilot reviewed 54 out of 66 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
testdata/baselines/reference/submodule/conformance/callChainWithSuper(target=es2024).js | Adds baseline tests for optional chaining with super calls in ES2024. |
testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with jsonSourceFile api.js | Updates error message to recognize ES2024 as a valid target. |
internal/tsoptions/enummaps.go | Updates enum mappings to include new ES2024 library entries. |
internal/core/compileroptions.go | Introduces ScriptTargetES2024 to extend supported targets. |
internal/compiler/program_test.go | Updates test expectations for the new ES2024 libraries. |
internal/checker/utilities.go | Incorporates additional ES2024 features in the feature map. |
internal/bundled/libs_generated.go | Updates generated libraries list to include ES2024 libraries. |
internal/bundled/embed_generated.go | Updates embedded library resources with ES2024 entries while removing some redundant esnext entries. |
Files not reviewed (12)
- _submodules/TypeScript: Language not supported
- testdata/baselines/reference/submodule/compiler/mapGroupBy.symbols: Language not supported
- testdata/baselines/reference/submodule/compiler/mapGroupBy.symbols.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/objectGroupBy.errors.txt: Language not supported
- testdata/baselines/reference/submodule/compiler/objectGroupBy.symbols: Language not supported
- testdata/baselines/reference/submodule/compiler/objectGroupBy.symbols.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/promiseWithResolvers.symbols: Language not supported
- testdata/baselines/reference/submodule/compiler/promiseWithResolvers.symbols.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/regExpWithOpenBracketInCharClass(target=es2015).errors.txt.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/regExpWithOpenBracketInCharClass(target=es5).errors.txt.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/regularExpressionScanning(target=es2015).errors.txt.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/regularExpressionScanning(target=es5).errors.txt.diff: Language not supported
Comments suppressed due to low confidence (2)
internal/tsoptions/enummaps.go:101
- Please verify if mapping 'esnext.promise' to 'lib.es2024.promise.d.ts' is intentional, as it deviates from the previous pattern and might warrant establishing a separate 'es2024.promise' key.
{Key: "esnext.promise", Value: "lib.es2024.promise.d.ts"},
internal/bundled/embed_generated.go:175
- Ensure that the removal of embedded files for 'lib.esnext.object.d.ts', 'lib.esnext.promise.d.ts', 'lib.esnext.regexp.d.ts', and 'lib.esnext.string.d.ts' does not negatively impact consumers that might still rely on these resources.
Removal of esnext.* embedded files
This ports in microsoft/TypeScript#58573.