Skip to content

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