Skip to content

fix(core): Avoid using Array.findIndex() as it is ES5 incompatible #7400

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

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Mar 10, 2023

Not sure if there is an easy way to polyfill this only for ES5 builds? But other than this, this should be straightforward enough.

Closes #7397

@mydea mydea requested review from lforst and AbhiPrasad March 10, 2023 08:00
@mydea mydea self-assigned this Mar 10, 2023
Copy link
Contributor

@lforst lforst left a comment

Choose a reason for hiding this comment

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

wondering if we should use something like browserlist....

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.24 KB (+0.12% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 62.95 KB (+0.11% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.87 KB (+0.1% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 55.87 KB (+0.12% 🔺)
@sentry/browser - Webpack (gzipped + minified) 20.62 KB (+0.12% 🔺)
@sentry/browser - Webpack (minified) 67.39 KB (+0.1% 🔺)
@sentry/react - Webpack (gzipped + minified) 20.65 KB (+0.12% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 48.54 KB (+0.18% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 27.51 KB (+0.23% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.76 KB (+0.21% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.17 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 37.19 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 61.18 KB (+0.09% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 54.35 KB (+0.04% 🔺)

@mydea
Copy link
Member Author

mydea commented Mar 10, 2023

It would be nice to have an easy way to just use this and have a polyfill be added only for the ES5 bundle. But let's merge this for now and maybe look into this later!

@mydea mydea merged commit 8b0d536 into develop Mar 10, 2023
@mydea mydea deleted the fn/avoid-findIndex branch March 10, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ES5 build contains findIndex (incompatible API)
3 participants