Skip to content

ref(core)!: Remove getLocationHref export from core - #23717

Merged
mydea merged 2 commits into
developfrom
fn/remove-get-location-href-export
Aug 28, 2026
Merged

ref(core)!: Remove getLocationHref export from core#23717
mydea merged 2 commits into
developfrom
fn/remove-get-location-href-export

Conversation

@mydea

@mydea mydea commented Aug 28, 2026

Copy link
Copy Markdown
Member

Remove the getLocationHref export 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-utils instead of @sentry/browser, so it can be shared across browser-side packages without pulling in the full @sentry/browser package. Browser consumers and replay-internal (previously importing it from @sentry/core) now import it from @sentry/browser-utils.

Note that browser-utils' WINDOW types document as optional (webworker environments), so the moved helper uses optional chaining where the previous @sentry/browser version relied on WINDOW being a full Window.

The remaining private copy in @sentry/core is untouched.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 28.56 kB -0.02% -3 B 🔽
@sentry/browser - with treeshaking flags 26.92 kB +0.01% +2 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB +0.01% +2 B 🔺
@sentry/browser (incl. Tracing) 48.63 kB -0.01% -3 B 🔽
@sentry/browser (incl. Tracing + Span Streaming) 48.64 kB -0.02% -7 B 🔽
@sentry/browser (incl. Tracing, Profiling) 51.55 kB -0.03% -12 B 🔽
@sentry/browser (incl. Tracing, Replay) 88.09 kB -0.04% -28 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.52 kB +0.02% +9 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 92.79 kB -0.04% -31 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 105.5 kB -0.01% -5 B 🔽
@sentry/browser (incl. Feedback) 45.8 kB +0.02% +9 B 🔺
@sentry/browser (incl. sendFeedback) 33.37 kB +0.06% +17 B 🔺
@sentry/browser (incl. FeedbackAsync) 38.47 kB +0.04% +14 B 🔺
@sentry/browser (incl. Metrics) 29.51 kB -0.01% -1 B 🔽
@sentry/browser (incl. Logs) 29.8 kB -0.01% -1 B 🔽
@sentry/browser (incl. Metrics & Logs) 30.43 kB -0.01% -3 B 🔽
@sentry/react 30.3 kB -0.02% -6 B 🔽
@sentry/react (incl. Tracing) 50.83 kB -0.02% -7 B 🔽
@sentry/vue 35.69 kB +0.02% +7 B 🔺
@sentry/vue (incl. Tracing) 50.86 kB -0.04% -17 B 🔽
@sentry/svelte 28.59 kB +0.01% +1 B 🔺
CDN Bundle 30.35 kB -0.05% -13 B 🔽
CDN Bundle (incl. Tracing) 49.24 kB +0.24% +113 B 🔺
CDN Bundle (incl. Logs, Metrics) 32.57 kB +0.04% +10 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 51.12 kB +0.23% +114 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 73.17 kB +0.25% +178 B 🔺
CDN Bundle (incl. Tracing, Replay) 86.72 kB +0.12% +102 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.61 kB +0.1% +87 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 92.64 kB +0.27% +246 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.53 kB +0.23% +209 B 🔺
CDN Bundle - uncompressed 89.95 kB -0.03% -21 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 146.82 kB -0.01% -1 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.24 kB -0.03% -21 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.51 kB -0.01% -1 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.41 kB -0.01% -15 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.32 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 272 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 280.07 kB +0.03% +60 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.74 kB +0.03% +60 B 🔺
@sentry/nextjs (client) 53.41 kB +0.02% +6 B 🔺
@sentry/sveltekit (client) 49.07 kB -0.02% -6 B 🔽
@sentry/core/server 65.15 kB - -
@sentry/core/browser 51.88 kB -0.24% -121 B 🔽
@sentry/node 122.69 kB +0.02% +17 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.22 kB - -
@sentry/node - without tracing 87.73 kB +0.03% +26 B 🔺
@sentry/node - without channel injection 102.36 kB +0.02% +19 B 🔺
@sentry/aws-serverless 95.88 kB +0.03% +27 B 🔺
@sentry/cloudflare (withSentry) - minified 199.61 kB - -
@sentry/cloudflare (withSentry) 495.94 kB - -

View base workflow run

mydea and others added 2 commits August 28, 2026 10:44
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
mydea force-pushed the fn/remove-get-location-href-export branch from fdada09 to 6dfc9f5 Compare August 28, 2026 08:44
@mydea
mydea marked this pull request as ready for review August 28, 2026 08:45
@mydea
mydea requested a review from a team as a code owner August 28, 2026 08:45
@mydea
mydea requested review from logaretm and msonnb and removed request for a team August 28, 2026 08:45
@mydea
mydea merged commit 5a0edad into develop Aug 28, 2026
278 checks passed
@mydea
mydea deleted the fn/remove-get-location-href-export branch August 28, 2026 09:11
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.

2 participants