ref(core)!: Remove getLocationHref export from core - #23717
Merged
Conversation
Contributor
size-limit report 📦
|
Move the browser `getLocationHref` helper out of `@sentry/browser` into `@sentry/browser-utils` so it can be shared. Update browser consumers and `replay-internal` to import it from there. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mydea
force-pushed
the
fn/remove-get-location-href-export
branch
from
August 28, 2026 08:44
fdada09 to
6dfc9f5
Compare
mydea
marked this pull request as ready for review
August 28, 2026 08:45
mydea
requested review from
logaretm and
msonnb
and removed request for
a team
August 28, 2026 08:45
msonnb
approved these changes
Aug 28, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove the
getLocationHrefexport from@sentry/core. The single in-core consumer inlines the one-liner it needed (per feedback), so core no longer needs to expose this browser-specific helper.The browser helper itself now lives in
@sentry/browser-utilsinstead of@sentry/browser, so it can be shared across browser-side packages without pulling in the full@sentry/browserpackage. Browser consumers andreplay-internal(previously importing it from@sentry/core) now import it from@sentry/browser-utils.Note that
browser-utils'WINDOWtypesdocumentas optional (webworker environments), so the moved helper uses optional chaining where the previous@sentry/browserversion relied onWINDOWbeing a fullWindow.The remaining private copy in
@sentry/coreis untouched.