chore!: bump TypeScript target and lib to ES2022 - #10019
Draft
Mrtenz wants to merge 3 commits into
Draft
Conversation
The browser targets and React Native version used by the clients that consume these packages support ES2022, so the target and lib settings can be updated to match that. We stop short of ES2023, since Hermes doesn't fully support it yet. This also lets `foundryup` drop its own `lib` override, since the base config now provides `ES2022` and `DOM` already.
ES2022ES2022
Bumping the TypeScript target and lib to ES2022 changed the compiled output slightly, causing coverage to dip by a fraction of a percent in a handful of packages. Lower the affected `coverageThreshold` values in each package's `jest.config.cjs` to match.
Member
Author
|
@metamaskbot publish-previews |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
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.
Explanation
The base TypeScript configuration targeted
ES2020, which is older than what the browser targets and React Native version used by the clients that consume these packages actually support. Since those clients supportES2022, we can bump the sharedtargetandlibsettings toES2022to take advantage of newer syntax and APIs.We stop short of
ES2023, since Hermes (the React Native JS engine) doesn't fully support it yet (most notably,Array.prototype.toSortedis unsupported).References
N/A