Skip to content

GitAuto: makeBrowserOfflineTransport no longer adds types to transportOptions #14

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gitauto-ai[bot]
Copy link

@gitauto-ai gitauto-ai bot commented Oct 5, 2024

Resolves #3

Why the bug occurs

The bug occurs because the makeBrowserOfflineTransport function no longer adds the necessary types to transportOptions, leading to a TypeScript error when using options like flushAtStartup that are not recognized in the current type definition of BrowserTransportOptions.

How to reproduce

  1. Upgrade the Sentry SDK from version 7.60.0 to 8.33.1.
  2. Use the makeBrowserOfflineTransport function with transportOptions that include properties not defined in BrowserTransportOptions.
  3. Observe the TypeScript error indicating that the specified properties do not exist in the type.

How to fix

To fix this issue, we need to update the type definitions for BrowserTransportOptions to include the additional properties that are valid when using makeBrowserOfflineTransport. Specifically, we should:

  1. Identify the additional properties that are valid for transportOptions when using makeBrowserOfflineTransport.
  2. Update the type definition for BrowserTransportOptions to include these properties, ensuring that TypeScript recognizes them as valid.
  3. Verify that the updated type definitions do not break existing functionality and maintain backward compatibility with previous versions.

Test these changes locally

git checkout -b gitauto/issue-#3-f847ef29-2dcd-4ed2-a4fa-09dc22f77461
git pull origin gitauto/issue-#3-f847ef29-2dcd-4ed2-a4fa-09dc22f77461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

makeBrowserOfflineTransport no longer adds types to transportOptions
0 participants