-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fedback): Convert CDN bundles to use async feedback for lower bu…
…ndle sizes (#11791) It's more aggressive to start with the async loading strategy in the CDN bundle, but could be safer because if we want to change from async->sync it would not really be a majr version change. Whereas going from sync->async would be more of a big feature, riskier, and could demand a version bump or something.
- Loading branch information
Showing
14 changed files
with
55 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
import { browserTracingIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims'; | ||
import { feedbackAsyncIntegration } from './feedbackAsync'; | ||
|
||
export * from './index.bundle.base'; | ||
|
||
export { feedbackIntegration } from './feedback'; | ||
export { getFeedback } from '@sentry-internal/feedback'; | ||
|
||
export { browserTracingIntegrationShim as browserTracingIntegration, replayIntegrationShim as replayIntegration }; | ||
export { | ||
browserTracingIntegrationShim as browserTracingIntegration, | ||
feedbackAsyncIntegration as feedbackAsyncIntegration, | ||
feedbackAsyncIntegration as feedbackIntegration, | ||
replayIntegrationShim as replayIntegration, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { browserTracingIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims'; | ||
import { feedbackIntegration } from '../../src'; | ||
import { feedbackAsyncIntegration } from '../../src'; | ||
|
||
import * as FeedbackBundle from '../../src/index.bundle.feedback'; | ||
|
||
describe('index.bundle.feedback', () => { | ||
it('has correct exports', () => { | ||
expect(FeedbackBundle.browserTracingIntegration).toBe(browserTracingIntegrationShim); | ||
expect(FeedbackBundle.feedbackAsyncIntegration).toBe(feedbackAsyncIntegration); | ||
expect(FeedbackBundle.feedbackIntegration).toBe(feedbackAsyncIntegration); | ||
expect(FeedbackBundle.replayIntegration).toBe(replayIntegrationShim); | ||
expect(FeedbackBundle.feedbackIntegration).toBe(feedbackIntegration); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { feedbackIntegrationShim } from '@sentry-internal/integration-shims'; | ||
import { replayIntegration } from '@sentry/browser'; | ||
import { browserTracingIntegrationShim, feedbackIntegrationShim } from '@sentry-internal/integration-shims'; | ||
import { replayIntegration } from '../../src'; | ||
|
||
import * as ReplayBundle from '../../src/index.bundle.replay'; | ||
|
||
describe('index.bundle.replay', () => { | ||
it('has correct exports', () => { | ||
expect(ReplayBundle.replayIntegration).toBe(replayIntegration); | ||
expect(ReplayBundle.browserTracingIntegration).toBe(browserTracingIntegrationShim); | ||
expect(ReplayBundle.feedbackAsyncIntegration).toBe(feedbackIntegrationShim); | ||
expect(ReplayBundle.feedbackIntegration).toBe(feedbackIntegrationShim); | ||
expect(ReplayBundle.replayIntegration).toBe(replayIntegration); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import { feedbackIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims'; | ||
import { | ||
browserTracingIntegrationShim, | ||
feedbackIntegrationShim, | ||
replayIntegrationShim, | ||
} from '@sentry-internal/integration-shims'; | ||
|
||
import * as Bundle from '../../src/index.bundle'; | ||
|
||
describe('index.bundle', () => { | ||
it('has correct exports', () => { | ||
expect(Bundle.replayIntegration).toBe(replayIntegrationShim); | ||
expect(Bundle.browserTracingIntegration).toBe(browserTracingIntegrationShim); | ||
expect(Bundle.feedbackAsyncIntegration).toBe(feedbackIntegrationShim); | ||
expect(Bundle.feedbackIntegration).toBe(feedbackIntegrationShim); | ||
expect(Bundle.replayIntegration).toBe(replayIntegrationShim); | ||
}); | ||
}); |
8 changes: 5 additions & 3 deletions
8
packages/browser/test/unit/index.bundle.tracing.replay.feedback.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import { browserTracingIntegration, feedbackIntegration, replayIntegration } from '../../src'; | ||
import { browserTracingIntegration, feedbackAsyncIntegration, replayIntegration } from '../../src'; | ||
|
||
import * as TracingReplayFeedbackBundle from '../../src/index.bundle.tracing.replay.feedback'; | ||
|
||
describe('index.bundle.tracing.replay.feedback', () => { | ||
it('has correct exports', () => { | ||
expect(TracingReplayFeedbackBundle.replayIntegration).toBe(replayIntegration); | ||
expect(TracingReplayFeedbackBundle.browserTracingIntegration).toBe(browserTracingIntegration); | ||
expect(TracingReplayFeedbackBundle.feedbackIntegration).toBe(feedbackIntegration); | ||
expect(TracingReplayFeedbackBundle.feedbackAsyncIntegration).toBe(feedbackAsyncIntegration); | ||
expect(TracingReplayFeedbackBundle.feedbackIntegration).toBe(feedbackAsyncIntegration); | ||
expect(TracingReplayFeedbackBundle.replayIntegration).toBe(replayIntegration); | ||
}); | ||
}); |
7 changes: 3 additions & 4 deletions
7
packages/browser/test/unit/index.bundle.tracing.replay.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import { feedbackIntegrationShim } from '@sentry-internal/integration-shims'; | ||
|
||
import { browserTracingIntegration, replayIntegration } from '../../src'; | ||
|
||
import * as TracingReplayBundle from '../../src/index.bundle.tracing.replay'; | ||
|
||
describe('index.bundle.tracing.replay', () => { | ||
it('has correct exports', () => { | ||
expect(TracingReplayBundle.replayIntegration).toBe(replayIntegration); | ||
|
||
expect(TracingReplayBundle.browserTracingIntegration).toBe(browserTracingIntegration); | ||
|
||
expect(TracingReplayBundle.feedbackAsyncIntegration).toBe(feedbackIntegrationShim); | ||
expect(TracingReplayBundle.feedbackIntegration).toBe(feedbackIntegrationShim); | ||
expect(TracingReplayBundle.replayIntegration).toBe(replayIntegration); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { feedbackIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims'; | ||
|
||
import { browserTracingIntegration } from '../../src'; | ||
|
||
import * as TracingBundle from '../../src/index.bundle.tracing'; | ||
|
||
describe('index.bundle.tracing', () => { | ||
it('has correct exports', () => { | ||
expect(TracingBundle.replayIntegration).toBe(replayIntegrationShim); | ||
expect(TracingBundle.browserTracingIntegration).toBe(browserTracingIntegration); | ||
expect(TracingBundle.feedbackAsyncIntegration).toBe(feedbackIntegrationShim); | ||
expect(TracingBundle.feedbackIntegration).toBe(feedbackIntegrationShim); | ||
expect(TracingBundle.replayIntegration).toBe(replayIntegrationShim); | ||
}); | ||
}); |