-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(nextjs): Make build-time value injection turbopack compatible #14081
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
106fa11
ref(nextjs): Make build-time value injection turbopack compatible
218edb5
Use process.env and fallback for all built-time values
61e864d
hmmm.
3f7863d
Fix stuff
068fecb
Merge branch 'develop' into lforst-turbo-compatible-constant-injection
68a560c
Review suggestion
c90fa09
Merge branch 'develop' into lforst-turbo-compatible-constant-injection
906a551
lint
1b1af55
size limit
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -3,16 +3,16 @@ import type { BrowserOptions } from '@sentry/react'; | |
import { applyTunnelRouteOption } from '../../src/client/tunnelRoute'; | ||
|
||
const globalWithInjectedValues = global as typeof global & { | ||
__sentryRewritesTunnelPath__?: string; | ||
_sentryRewritesTunnelPath?: string; | ||
}; | ||
|
||
beforeEach(() => { | ||
globalWithInjectedValues.__sentryRewritesTunnelPath__ = undefined; | ||
globalWithInjectedValues._sentryRewritesTunnelPath = undefined; | ||
}); | ||
|
||
describe('applyTunnelRouteOption()', () => { | ||
it('Correctly applies `tunnelRoute` option when conditions are met', () => { | ||
globalWithInjectedValues.__sentryRewritesTunnelPath__ = '/my-error-monitoring-route'; | ||
globalWithInjectedValues._sentryRewritesTunnelPath = '/my-error-monitoring-route'; | ||
const options: any = { | ||
dsn: 'https://[email protected]/3333333', | ||
} as BrowserOptions; | ||
|
@@ -23,7 +23,7 @@ describe('applyTunnelRouteOption()', () => { | |
}); | ||
|
||
it("Doesn't apply `tunnelRoute` when DSN is missing", () => { | ||
globalWithInjectedValues.__sentryRewritesTunnelPath__ = '/my-error-monitoring-route'; | ||
globalWithInjectedValues._sentryRewritesTunnelPath = '/my-error-monitoring-route'; | ||
const options: any = { | ||
// no dsn | ||
} as BrowserOptions; | ||
|
@@ -34,7 +34,7 @@ describe('applyTunnelRouteOption()', () => { | |
}); | ||
|
||
it("Doesn't apply `tunnelRoute` when DSN is invalid", () => { | ||
globalWithInjectedValues.__sentryRewritesTunnelPath__ = '/my-error-monitoring-route'; | ||
globalWithInjectedValues._sentryRewritesTunnelPath = '/my-error-monitoring-route'; | ||
const options: any = { | ||
dsn: 'invalidDsn', | ||
} as BrowserOptions; | ||
|
@@ -55,7 +55,7 @@ describe('applyTunnelRouteOption()', () => { | |
}); | ||
|
||
it("Doesn't `tunnelRoute` option when DSN is not a SaaS DSN", () => { | ||
globalWithInjectedValues.__sentryRewritesTunnelPath__ = '/my-error-monitoring-route'; | ||
globalWithInjectedValues._sentryRewritesTunnelPath = '/my-error-monitoring-route'; | ||
const options: any = { | ||
dsn: 'https://[email protected]/3333333', | ||
} as BrowserOptions; | ||
|
@@ -66,7 +66,7 @@ describe('applyTunnelRouteOption()', () => { | |
}); | ||
|
||
it('Correctly applies `tunnelRoute` option to region DSNs', () => { | ||
globalWithInjectedValues.__sentryRewritesTunnelPath__ = '/my-error-monitoring-route'; | ||
globalWithInjectedValues._sentryRewritesTunnelPath = '/my-error-monitoring-route'; | ||
const options: any = { | ||
dsn: 'https://[email protected]/3333333', | ||
} as BrowserOptions; | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.