Polyfill Array.prototype.at mainly for Safari < 15.4 - #1339
Merged
Merged
Conversation
marked 18 calls `.at` while parsing, which is ES2022 and so needs Chrome 92, Safari 15.4 or Firefox 90. Our floor is chrome90/firefox88/safari14.1/ios14.5 (BUILD_TARGETS in vite.config.ts, mirrored in browserslist), and esbuild lowers syntax but never built-ins, so Safari and iOS 14.1-15.3 users get a TypeError from the lexer. The error boundary catches it, so the whole docs panel is replaced by the error page rather than the markdown degrading. Reported once from the wild against v3.1.13 (PYTHON-EDITOR-NEXT-3V7) from a browser below the floor, but the same call fails on Safari versions we do claim to support. tsconfig's ES2021 lib already stops our own source calling `.at`; this is only needed because the call is in a dependency. Prime candidate for removing on next floor bump.
|
Preview build will be at |
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.
marked 18 calls
.atwhile parsing, which is ES2022 and so needs Chrome 92, Safari 15.4 or Firefox 90. Our floor is chrome90/firefox88/safari14.1/ios14.5 (BUILD_TARGETS in vite.config.ts, mirrored in browserslist), and esbuild lowers syntax but never built-ins, so Safari and iOS 14.1-15.3 users get a TypeError from the lexer. The error boundary catches it, so the whole docs panel is replaced by the error page rather than the markdown degrading.Reported once from the wild against v3.1.13
(PYTHON-EDITOR-NEXT-3V7) from a browser below the floor, but the same call fails on Safari versions we do claim to support.
tsconfig's ES2021 lib already stops our own source calling
.at; this is only needed because the call is in a dependency.Prime candidate for removing on next floor bump.