Skip to content

chore(deps): upgrade Sentry SDK and Vite plugin to 11.15.0 - #437

Merged
sydevs-bot merged 7 commits into
mainfrom
chore/sentry-11
Nov 19, 2026
Merged

sydevs-bot merged 7 commits into
mainfrom
chore/sentry-11

Conversation

@sydevs-bot

Copy link
Copy Markdown
Contributor

Summary

This PR upgrades @sentry/browser from 10.78.0 to 11.15.0 and @sentry/vite-plugin from 5.4.1 to 11.15.0, the registry's latest for both. The plugin now ships from the SDK monorepo, in lockstep with the SDK.

  • Reporting is unchanged. The events we post are the same as v10's, and the eager payload ships at the same size.
  • Two advisories are gone: glob GHSA-3g3m-2fjr-6pw4 and minimatch GHSA-g3hv-75wg-m249, the moderate ones that reached us through the plugin.
  • The build sends no telemetry. The new plugin brought some with it, and this PR switches it off.

What changed and why it matters

SDK migration (src/lib/report.ts). Three v11 defaults would have changed what a report sends. The mocked report.sentry.test.ts stayed green through all three.

  • Visitor IP. sendDefaultPii was removed. An unset dataCollection now collects every category, and the default userInfo: true stamps infer_ip: 'auto', which tells Sentry to store each visitor's IP from the request. No beforeSend can scrub that.
    • Fix: dataCollection: { userInfo: false }.
    • In the installed sources, userInfo is the only category this client reads. Every other category is read only by integrations this client does not install.
    • The comment says so, with a ⚠: an integration added later brings its category with it.
  • Synthetic stacks. attachStacktrace now defaults to true, which gives a thrown string a synthetic stack made of the reporter's own frames. It is now set to false.
  • Host release. In 11.15.0, BrowserClient sets release: options.release ?? getDefaultRelease(). So release: undefined now reads the host's __SENTRY_RELEASE__, <meta name="sentry-release"> or window.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 only fetch and runs the real SDK on a hostile host page. It asserts four things:

  • the post goes to the DSN's ingest origin
  • no value the host owns reaches the body
  • infer_ip is 'never'
  • a thrown string carries no stack

report.sentry.test.ts changed the two assertions v11 forced: sendDefaultPii no longer exists, so it now checks dataCollection.userInfo === false, and release is now ''.

The Sentry CLI's own telemetry is switched off (vite.config.ts). Plugin 11 drives the new sentry CLI in-process, instead of the @sentry/cli binary, and that CLI wraps every command in its own telemetry.

  • telemetry: false does not reach the CLI.
  • Without this fix, every credentialed build would post a sourcemap.upload transaction to Sentry's telemetry project. So would the CI offline dry run, on every PR, forked ones included.
  • That transaction carried the upload temp directory, the git SHA, the org and project slugs, and an instance id. The token was not in it.
  • The config now sets SENTRY_CLI_NO_TELEMETRY=1 before it builds the plugin. No plugin option reaches the CLI, which reads process.env on each call.
  • scripts/sentry-upload.test.ts evaluates 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, and release.inject/create/finalize/setCommits. Deletion still runs in writeBundle's finally. Two smaller changes:

  • The plugin now also returns an enforce: 'post' plugin. It stages maps only when the plugin itself turned them on, so it is inert here: build.sourcemap is set. The comment is updated.
  • The runbook line in docs/environment.md now names the in-process sourcemap upload call instead of the old binary command.

Size gate (scripts/check-bundle-size.mjs).

  • DEBUG_ID_MARKER is 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_KIB was 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.md entry. Nothing a host relies on changed.

  • The SDK still loads lazily, only after a failure, and only on a build with a DSN.
  • It still talks only to the DSN's ingest host, which the existing *.sentry.io row covers. Its chunk names no URL.
  • Once the reporter has loaded, a host could technically notice two things:
    • the lazy chunk is about 1.2 KiB gzip larger
    • the v11 client adds passive freeze, resume, pagehide and pageshow listeners whose handler only reads the clock. v10's visibilitychange listener 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) and pnpm 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.

    • The upload fails fast, the ✗ line prints, and assert:maps passes with 0 maps.
    • The marker is in 26 of 26 chunks.
    • There is no token in dist/, no injected SENTRY_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:

    Build Requests
    main 5ce0f21 (plugin 5) 1: the upload call to the closed 127.0.0.1:1; none to any sentry.io host
    this branch without the telemetry line 3× CONNECT o1.ingest.us.sentry.io:443
    this branch none
  • New and changed assertions, each watched failing.

    • Removing the env line fails scripts/sentry-upload.test.ts.
    • Removing the dataCollection line fails report.sdk.test.ts ('auto' where it expects 'never') and report.sentry.test.ts.
  • The dataCollection trim. 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):

Graph main measured branch measured main shipped branch shipped budget
standalone 332.207 332.224 333.4 333.4 336
loader 2.837 2.840 3.3 3.3 3.6
embed 333.292 333.305 334.5 334.5 336

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:

  • Envelope diff. v10 against v11 envelopes on a hostile jsdom host: the event bodies are identical. The only difference is an empty trace.release in the envelope header.
  • Browser comparison against main on the review host pages, at two widths:
    • the plain-build screenshots are pixel-identical, with the same requests
    • on a DSN build, each report sends one POST, and CLS is 0
  • Mutation checks. A spec kills each of these: release: undefined, dropping attachStacktrace, removing delete event.user, and adding a tunnel.

Since those checks, the only runtime change is the dataCollection literal, and the posted envelopes are byte-identical either way.

Not done / not verified

  • No real credentialed upload. There is no real token, so none was exercised. The token scopes the new CLI's sourcemap upload needs are unverified. The runbook still says project:releases + org:read, and the CLI (0.49.0) ships no scope documentation.
  • Smoke lane. Not run; it needs a deployed preview.
  • Empty release in the envelope header. The header still carries trace.release: "". Relay's normalize_dsc_values treats that as no release, going by its source; this was not checked against a live Sentry.
  • The telemetry spec has a blind spot. It pins that our config sets 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 honours DO_NOT_TRACK=1, which was left unset to keep the change narrow.
  • sourcemaps.delete: true not adopted. That plugin option keeps maps out of dist/ 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:

    • adds [email protected], oxc-parser with its per-platform bindings, glob 14 and minimatch 11
    • removes @sentry/cli and its binaries

    Other dependency-upgrade branches also touch the lockfile. Whichever lands second should rebase on main and regenerate it with pnpm 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 has license-check off 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

@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
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
sahajatlas-design 5d31fa0 Nov 19 2026, 09:06 PM

@sydevs-bot
sydevs-bot enabled auto-merge November 19, 2026 21:08
@sydevs-bot
sydevs-bot added this pull request to the merge queue Nov 19, 2026
@sydevs-bot

sydevs-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

Written by the sydevs dispatcher. Sessions never edit this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants