Repository navigation
chore(deps): upgrade Sentry SDK and Vite plugin to 11.15.0 - #437
Merged
Merged
Conversation
@sentry/browser 10.78.0 -> 11.15.0 and @sentry/vite-plugin 5.4.1 -> 11.15.0, which now ships from the SDK monorepo in lockstep with it. The plugin's @sentry/bundler-plugins 11 depends on glob 14, which clears the two moderate advisories pnpm audit reported through it (glob GHSA-3g3m-2fjr-6pw4, minimatch GHSA-g3hv-75wg-m249). It drives the new `sentry` CLI package in-process instead of the @sentry/cli binary. Three v11 defaults would have changed what a report sends, each with the mocked report.sentry.test.ts still green: - `sendDefaultPii` is gone, and an unset `dataCollection` collects every category. `userInfo: true` stamps `infer_ip: 'auto'`, so Sentry would store each visitor's IP. Every category is now set off explicitly. - `attachStacktrace` defaults to true, giving a thrown string a synthetic stack of the reporter's own frames. Pinned to false. - 11.15.0's BrowserClient fills `release` with `??`, so an explicit `undefined` now reads the host's `window.SENTRY_RELEASE`, `__SENTRY_RELEASE__` or `<meta name="sentry-release">`. Pinned with `''`, which applyClientOptions never writes to an event. Driving the real SDK through report.ts on a hostile host page, the events v10 and migrated v11 post are identical; the one difference is an empty `trace.release` in the envelope header, which Relay's normalize_dsc_values turns back into no release. The plugin options keep their v5 names and meaning (filesToDeleteAfterUpload, errorHandler, telemetry, release.*). It now also returns an `enforce: 'post'` plugin, which changes nothing here because `build.sourcemap` is set. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
report.sentry.test.ts mocks @sentry/browser, so it pins the options the seam passes and never what the SDK makes of them. The v11 upgrade showed the gap: three defaults changed what a report sends while that suite stayed green. report.sdk.test.ts stubs only `fetch` and reads the posted envelope on a jsdom host page that runs its own Sentry (release global, define global, meta tag, global-scope tag, user and extra) and carries a token and an OAuth fragment in its URL. It pins that the event goes to the DSN's own ingest host carrying none of the host's values and no release, that it asks Sentry not to infer the visitor's IP, and that a thrown string gets no synthetic stack. Each assertion was watched failing against its defect, reintroduced in report.ts: `release: undefined` (host release on the event), no `userInfo: false` (infer_ip 'auto'), no `attachStacktrace: false` (synthetic frames), `delete event.user` removed (host email leaks), and a `tunnel` option (wrong origin). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
The per-chunk debug-ID snippet now comes from @sentry/vite-plugin 11.15.0, so the gap was re-measured on all three graphs the way the note beside the constant prescribes: `pnpm build` plain, then again under ci.yml's "Source-map upload chain (offline dry run)" environment. graph plain → dry run (KiB) gap on 5ce0f21, plugin 5.4.1 standalone 332.319 → 333.479 1.160 332.207 → 333.387 1.180 loader 2.840 → 3.304 0.464 2.837 → 3.310 0.473 embed 333.403 → 334.592 1.189 333.292 → 334.500 1.208 Chunk counts are unchanged at 8 / 3 / 8, and each gap still rounds to the entry it had (1.2 / 0.5 / 1.2), so only the dated note moves. The plugin still names its snippet `_sentryDebugIdIdentifier` (it is in all 26 emitted files of the dry-run build and none of the plain one), so DEBUG_ID_MARKER stands. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
The plugin no longer shells out to the @sentry/cli binary: it runs the new `sentry` CLI package's `sourcemap upload` in-process. The runbook quoted the old binary's `sourcemaps upload -p … --release <sha>` command line. What it was quoted for still holds and is now stated against the new call: the plugin infers the release from git (or SENTRY_RELEASE) and passes it to the upload even with every release action switched off, so the token still needs release scope. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
@sentry/vite-plugin 11 runs the new `sentry` CLI in-process. That CLI wraps every command in its own telemetry, which `telemetry: false` does not reach, so the credentialed build posted a `sourcemap.upload` transaction to Sentry's telemetry project. The transaction carried the upload directory, the git SHA, the org and project slugs and an instance id. The CI dry run posted it too, on every run, forked PRs included. Plugin 5's binary CLI sent nothing. No plugin option reaches the CLI. It reads `process.env` per call, so the config sets SENTRY_CLI_NO_TELEMETRY before building the plugin. scripts/sentry-upload.test.ts evaluates the config under the dry-run credentials and fails without the line. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
The BrowserClient reads `dataCollection.userInfo` and nothing else. Every other category is read only by an integration this client does not install. The 11-key literal cost about 100 B gzip in the eager chunk on every page load. Its comment also claimed every category was off, while `stackFrameVariables` and `frameContextLines` stayed at their defaults. The posted envelopes are byte-identical either way, with volatile ids normalised, driven through the real SDK by report.sdk.test.ts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
This repo squash-merges, so the branch commit the note cited would never reach main. The figures are re-measured on the final tree, after the data-collection trim. Gaps are 1.161 / 0.465 / 1.198 KiB at 8 / 3 / 8 chunks, so the constants stay at 1.2 / 0.5 / 1.2. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVeNzer8ue5c7JRsZk
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | 5d31fa0 | Nov 19 2026, 09:06 PM |
sydevs-bot
enabled auto-merge
November 19, 2026 21:08
Ardnived
approved these changes
Nov 19, 2026
Contributor
Author
|
🤖 no session running Written by the sydevs dispatcher. Sessions never edit this comment. |
This was referenced Nov 19, 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.
Summary
This PR upgrades
@sentry/browserfrom 10.78.0 to 11.15.0 and@sentry/vite-pluginfrom 5.4.1 to 11.15.0, the registry'slatestfor both. The plugin now ships from the SDK monorepo, in lockstep with the SDK.What changed and why it matters
SDK migration (
src/lib/report.ts). Three v11 defaults would have changed what a report sends. The mockedreport.sentry.test.tsstayed green through all three.sendDefaultPiiwas removed. An unsetdataCollectionnow collects every category, and the defaultuserInfo: truestampsinfer_ip: 'auto', which tells Sentry to store each visitor's IP from the request. NobeforeSendcan scrub that.dataCollection: { userInfo: false }.userInfois the only category this client reads. Every other category is read only by integrations this client does not install.attachStacktracenow defaults to true, which gives a thrown string a synthetic stack made of the reporter's own frames. It is now set tofalse.release: options.release ?? getDefaultRelease(). Sorelease: undefinednow reads the host's__SENTRY_RELEASE__,<meta name="sentry-release">orwindow.SENTRY_RELEASE. It is now pinned with'', which is never written to an event.A spec that drives the real SDK (
src/lib/report.sdk.test.ts, jsdom). It stubs onlyfetchand runs the real SDK on a hostile host page. It asserts four things:infer_ipis'never'report.sentry.test.tschanged the two assertions v11 forced:sendDefaultPiino longer exists, so it now checksdataCollection.userInfo === false, andreleaseis now''.The Sentry CLI's own telemetry is switched off (
vite.config.ts). Plugin 11 drives the newsentryCLI in-process, instead of the@sentry/clibinary, and that CLI wraps every command in its own telemetry.telemetry: falsedoes not reach the CLI.sourcemap.uploadtransaction to Sentry's telemetry project. So would the CI offline dry run, on every PR, forked ones included.SENTRY_CLI_NO_TELEMETRY=1before it builds the plugin. No plugin option reaches the CLI, which readsprocess.envon each call.scripts/sentry-upload.test.tsevaluates the config under the dry-run credentials, and fails without that line.Plugin options. Read from the installed 11.15.0 sources, every option the config uses keeps its meaning:
filesToDeleteAfterUpload,errorHandler,telemetry, andrelease.inject/create/finalize/setCommits. Deletion still runs inwriteBundle'sfinally. Two smaller changes:enforce: 'post'plugin. It stages maps only when the plugin itself turned them on, so it is inert here:build.sourcemapis set. The comment is updated.docs/environment.mdnow names the in-processsourcemap uploadcall instead of the old binary command.Size gate (
scripts/check-bundle-size.mjs).DEBUG_ID_MARKERis unchanged. Plugin 11 still injects_sentryDebugIdIdentifier: in 26 of 26 chunks under the dry-run env, and 0 of 26 in a plain build.SENTRY_GAP_KIBwas re-measured on the final tree: 1.161 / 0.465 / 1.198 KiB at 8 / 3 / 8 chunks. The constants stay 1.2 / 0.5 / 1.2; only the dated note changed.No CHANGELOG or
docs/embedding.mdentry. Nothing a host relies on changed.*.sentry.iorow covers. Its chunk names no URL.freeze,resume,pagehideandpageshowlisteners whose handler only reads the clock. v10'svisibilitychangelistener was never documented either.Verification
Run on the final head:
pnpm install --frozen-lockfile: up to date..claude/skills/pr-prep/check.sh --full: exit 0. Lint, typecheck, the unit lane (175 files, 2114 tests), the build (assert:css, assert:maps on 27 files, assert:classic) andpnpm size.pnpm ladle:build: exit 0. assert:maps found no maps across 168 files.pnpm check:wrangler: exit 0. Both configs completed their dry runs.Offline dry-run build (ci.yml's env): exit 0.
dist/, no injectedSENTRY_RELEASE, no debugId comment, and no temp directory left behind.Outbound traffic of that dry run, behind a logging proxy that refuses every request, plus a socket tracer:
127.0.0.1:1; none to any sentry.io hostCONNECT o1.ingest.us.sentry.io:443New and changed assertions, each watched failing.
scripts/sentry-upload.test.ts.dataCollectionline failsreport.sdk.test.ts('auto'where it expects'never') andreport.sentry.test.ts.The
dataCollectiontrim. The real-SDK envelopes are byte-identical between the old 11-key literal and{ userInfo: false }, once ids and timestamps are normalised.pnpm audit. main's lockfile: 2 moderate (glob GHSA-3g3m-2fjr-6pw4, minimatch GHSA-g3hv-75wg-m249). This branch: "No known vulnerabilities found".Size, from
pnpm size(gzip, KiB):main's 3-decimal figures come from a baseline build of 5ce0f21 made earlier in this work. Its 1-decimal shipped figures match the gate's baseline.
The lazy SDK chunk sits outside all three graphs. It grew from 57,667 to 60,041 B raw, and from 19,421 to 20,695 B gzip.
Verified earlier on this branch, before the last three commits, and not re-run since:
trace.releasein the envelope header.release: undefined, droppingattachStacktrace, removingdelete event.user, and adding atunnel.Since those checks, the only runtime change is the
dataCollectionliteral, and the posted envelopes are byte-identical either way.Not done / not verified
sourcemap uploadneeds are unverified. The runbook still saysproject:releases+org:read, and the CLI (0.49.0) ships no scope documentation.trace.release: "". Relay'snormalize_dsc_valuestreats that as no release, going by its source; this was not checked against a live Sentry.SENTRY_CLI_NO_TELEMETRY, not that the CLI still honours that name. If a future CLI renames the switch, the spec stays green and the telemetry comes back. The CLI also honoursDO_NOT_TRACK=1, which was left unset to keep the change narrow.sourcemaps.delete: truenot adopted. That plugin option keeps maps out ofdist/entirely, but adopting it would change the chore(build): upload sentry source maps from the pages build #130 mechanism, which is out of scope here.Follow-ups for the maintainer
No
.claude/edit is needed.Lockfile. This PR rewrites the Sentry subtree of
pnpm-lock.yaml:[email protected],oxc-parserwith its per-platform bindings,glob14 andminimatch11@sentry/cliand its binariesOther dependency-upgrade branches also touch the lockfile. Whichever lands second should rebase on
mainand regenerate it withpnpm install, not merge it by hand.License.
[email protected]is a dev dependency under FSL-1.1-Apache-2.0, not MIT. As read, the shared Dependency Review workflow haslicense-checkoff and fails only on runtime scope, so it should pass.First credentialed deploy. Read the build log, as the runbook says. The upload is non-fatal by design.
Release timing. Both 11.15.0 packages were published on 2026-11-19. The
release: ''pin also holds on 11.14.0.Generated by Claude Code