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: Ensure all integration classes have correct types #10183

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Jan 15, 2024

This ensures that all integration classes have both the correct constructor options, as well as the correct instance methods.

This is pretty dirty, but since we're going to remove the classes very soon in v8, IMHO that's the easiest approach to make this work properly for our users.

Somehow TS complains when using the option types directly, so we inline them for now everywhere, which seems to make it happy. 🤷 soon we'll remove these anyhow!

Extracted out of #10143

@mydea mydea requested review from lforst and Lms24 January 15, 2024 13:23
@mydea mydea self-assigned this Jan 15, 2024
@mydea
Copy link
Member Author

mydea commented Jan 15, 2024

Seems to depend on #10181... I will cherry pick that here for now so CI can run.

@mydea mydea force-pushed the fn/integration-classes-types branch from 205a715 to 376c29c Compare January 15, 2024 14:01
Copy link
Contributor

github-actions bot commented Jan 15, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 77.12 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 68.48 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 62.14 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.52 KB (+0.04% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.09 KB (+0.01% 🔺)
@sentry/browser - Webpack (gzipped) 22.44 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 74.8 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 66.45 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 32.28 KB (+0.04% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 24.08 KB (-0.01% 🔽)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 209.48 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 97.53 KB (+0.05% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 72.09 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 35.3 KB (+0.05% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 68.86 KB (+0.03% 🔺)
@sentry/react - Webpack (gzipped) 22.48 KB (+0.01% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 85.55 KB (+0.02% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 49.66 KB (+0.03% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.11 KB (0%)

This ensures that all integration classes have both the correct constructor options, as well as the correct instance methods.

This is pretty dirty, but since we're going to remove the classes very soon in v8, IMHO that's the easiest approach to make this work properly for our users.
@mydea mydea force-pushed the fn/integration-classes-types branch from 376c29c to cb84726 Compare January 16, 2024 07:38
@mydea mydea merged commit 56206f5 into develop Jan 16, 2024
96 checks passed
@mydea mydea deleted the fn/integration-classes-types branch January 16, 2024 10:26
billyvg added a commit that referenced this pull request Jan 16, 2024
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.

2 participants