Skip to content
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

fix(browser): Don't use chrome variable name #10874

Merged
merged 2 commits into from
Mar 4, 2024
Merged

Conversation

AbhiPrasad
Copy link
Member

resolves #6880

Using const chrome = ... or similar breaks certain setups based on their bundler config. This makes changes to browser code so that we never declare a variable named chrome.

I tried setting up https://eslint.org/docs/latest/rules/id-denylist to enforce this, but this unfortunately also looks as types declarations (so type K = { chrome: ... } is problematic.

@AbhiPrasad AbhiPrasad requested a review from a team February 29, 2024 20:48
@AbhiPrasad AbhiPrasad self-assigned this Feb 29, 2024
@AbhiPrasad AbhiPrasad requested review from mydea and s1gr1d and removed request for a team February 29, 2024 20:48
Copy link
Contributor

github-actions bot commented Feb 29, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 77.21 KB (0%)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 68.46 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 72.4 KB (0%)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 62.01 KB (0%)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.67 KB (0%)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 32.67 KB (0%)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.02 KB (0%)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.02 KB (0%)
@sentry/browser - Webpack (gzipped) 22.27 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 75.37 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 67.03 KB (0%)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 32.87 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped) 23.85 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 210.31 KB (0%)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 99.04 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 71.07 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 35.95 KB (+0.01% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 68.74 KB (0%)
@sentry/react - Webpack (gzipped) 22.3 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 85.19 KB (0%)
@sentry/nextjs Client - Webpack (gzipped) 49.53 KB (0%)
@sentry-internal/feedback - Webpack (gzipped) 17.09 KB (0%)

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) March 1, 2024 14:58
@AbhiPrasad AbhiPrasad mentioned this pull request Mar 1, 2024
@AbhiPrasad AbhiPrasad merged commit f655931 into develop Mar 4, 2024
97 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-chrome-var-name branch March 4, 2024 16:37
AbhiPrasad added a commit that referenced this pull request Mar 7, 2024
resolves #6880

Using `const chrome = ...` or similar breaks certain setups based on
their bundler config. This makes changes to browser code so that we
never declare a variable named `chrome`.

I tried setting up https://eslint.org/docs/latest/rules/id-denylist to
enforce this, but this unfortunately also looks as types declarations
(so `type K = { chrome: ... }` is problematic.
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.

Browser lib contains variable "chrome" that conflicts with the global "chrome" variable
3 participants