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(cloudflare): Make @cloudflare/workers-types an optional peer dependency #15554

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Mar 3, 2025

This PR redeclares the @cloudflare/workers-types package as an optional peer dependency rather than an optional dependency. With other SDKs now depending on @sentry/cloudflare, we'd pull in the type package into non-cloudflare projects. In the particular case reported in #15536, this lead to global type definitions of fetch being overridden by the cloudflare types package (more details: #15536 (comment)).

I'm not sure if I'm missing something but since we only use the @cloudflare/workers-types for types, I think it's okay to make this an optional peer dependency. Which should avoid "polluting" non-CF projects with CF types.

closes #15536

@Lms24 Lms24 requested a review from AbhiPrasad March 3, 2025 10:15
@Lms24 Lms24 self-assigned this Mar 3, 2025
@Lms24 Lms24 requested a review from s1gr1d March 3, 2025 10:19
@Lms24 Lms24 merged commit 2e51100 into develop Mar 3, 2025
37 checks passed
@Lms24 Lms24 deleted the lms/fix-cloudflare-types-optional-peer-dependency branch March 3, 2025 15:44
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.

Updating to @sentry/[email protected] changes fetch response from any to unknown
3 participants