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

misc: Disallow direct usage of globals #3999

Merged
merged 1 commit into from Sep 21, 2021
Merged

misc: Disallow direct usage of globals #3999

merged 1 commit into from Sep 21, 2021

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Sep 21, 2021

Some global variables like document or even window and some other APIs are not available in environments like WebWorker or Node.js. We need to make sure that we use appropriate fallbacks or bail out without breaking people's stuff.

Some of the past issues for reference:
#3997
#3992
#3194
#3941

@kamilogorek kamilogorek enabled auto-merge (squash) September 21, 2021 08:54
@github-actions
Copy link
Contributor

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 22.26 KB (+0.08% 🔺)
@sentry/browser - Webpack 23.23 KB (0%)
@sentry/react - Webpack 23.26 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.7 KB (+0.05% 🔺)

Copy link
Member

@HazAT HazAT left a comment

Choose a reason for hiding this comment

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

Code LGTM
But please also add a description with links to the original issue describing why we do this so that if we come back to this in a year we understand Why?

@kamilogorek kamilogorek merged commit 8c77bb6 into master Sep 21, 2021
@kamilogorek kamilogorek deleted the lint-global branch September 21, 2021 09:45
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.

None yet

2 participants