Skip to content

ref(bundler-plugins): Pass the SDK's own deletion globs through an internal option - #26906

Merged
timfish merged 3 commits into
developfrom
ref/sdk-source-map-glob-option
Dec 3, 2026
Merged

timfish merged 3 commits into
developfrom
ref/sdk-source-map-glob-option

Conversation

@timfish

@timfish timfish commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #26903. Prepares the deprecation of sourcemaps.disable, deleteSourcemapsAfterUpload and filesToDeleteAfterUpload: after this, SDKs no longer put their own values into these options, so the deprecation warnings only fire for user values.

  • New internal sdkFilesToDeleteAfterUpload option. Next.js, Nitro, Nuxt and SvelteKit pass their final deletion globs through it instead of filesToDeleteAfterUpload. The plugin deletes the files of both.
  • Next.js no longer passes its own disable value. It forwarded disable: false by default and disable: true when it skips the upload; the latter is now upload: false, injectDebugIds: false, which gives the same result.
  • Next.js no longer writes deleteSourcemapsAfterUpload: true into the user's options to remember that the SDK deletes the maps.
  • SDK messages no longer tell users to set these options. They name sourcemaps.delete: false and sourcemaps.upload: false instead.
  • Telemetry: delete-after-upload is now only set for a user's glob, and Next.js builds that skip the upload report upload and injectDebugIds as false instead of disable as true.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 216a674 (PR test merge using develop at 422d95f)

Against: 422d95f (develop) · base run #68622

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.64 kB - -
@sentry/browser - with treeshaking flags 28.73 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.62 kB - -
@sentry/browser (incl. Tracing) 53.98 kB - -
@sentry/browser (incl. Tracing Core) 40.82 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 53.98 kB - -
@sentry/browser (incl. Tracing, Profiling) 56.86 kB - -
@sentry/browser (incl. Tracing, Replay) 93.96 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 82.52 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 98.8 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 111.75 kB - -
@sentry/browser (incl. Feedback) 48.51 kB - -
@sentry/browser (incl. sendFeedback) 31.2 kB - -
@sentry/browser (incl. FeedbackAsync) 36.26 kB - -
@sentry/browser (incl. Metrics) 31.96 kB - -
@sentry/browser (incl. Logs) 32.25 kB - -
@sentry/browser (incl. Metrics & Logs) 32.91 kB - -
@sentry/react 32.52 kB - -
@sentry/react (incl. Tracing) 56.49 kB - -
@sentry/vue 38.99 kB - -
@sentry/vue (incl. Tracing) 57.05 kB - -
@sentry/svelte 30.68 kB - -
@sentry/effect (client) 42.21 kB - -
@sentry/effect (client, incl. Tracing) 55.02 kB - -
@sentry/effect (client, incl. Tracing, Logs, Metrics) 66.5 kB - -
@sentry/remix (Remix 3 client bundle) 59.47 kB - -
CDN Bundle 32.45 kB - -
CDN Bundle (incl. Tracing) 54.12 kB - -
CDN Bundle (incl. Logs, Metrics) 35.2 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 56.57 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.15 kB - -
CDN Bundle (incl. Tracing, Replay) 91.93 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 94.44 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.38 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.85 kB - -
CDN Bundle - uncompressed 94.67 kB - -
CDN Bundle (incl. Tracing) - uncompressed 160.02 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 103.01 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 167.65 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.4 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 280.45 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 288.08 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 292.39 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 300 kB - -
@sentry/nextjs (client) 59.83 kB - -
@sentry/sveltekit (client) 54.8 kB - -
@sentry/astro (client) - rolldown, without tracing 35.73 kB -0.01% -1 B 🔽
@sentry/core/server 45.91 kB - -
@sentry/core/browser 14.55 kB - -
@sentry/node 157.66 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.63 kB - -
@sentry/node - without tracing 89.66 kB -0.01% -1 B 🔽
@sentry/node - without channel injection 146.99 kB -0.01% -1 B 🔽
@sentry/aws-serverless 100.57 kB - -
@sentry/cloudflare (withSentry) - minified 212.87 kB - -
@sentry/cloudflare (withSentry) 493.43 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 215.81 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 238.32 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 1 not successful, 61 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E node-express-mcp-v2 (MCP SDK OpenTelemetry) Test (optional) Failing after 57s Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E hapi-21 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E hapi-21 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-without-tracing-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-eve (0.x) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (deno) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-4-sourcemaps (Vite server) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-eve (content off) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-14-supabase Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (delete all) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E vinext-cf-workers (workers cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps enabled by Sentry) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps (delete all) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E hono-5 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps (manual upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (manual upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (cloudflare) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (bun) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 1m Details

@timfish
timfish added this pull request to stack #26920 November 26, 2026 09:04
@timfish
timfish marked this pull request as ready for review November 26, 2026 09:05
Base automatically changed from ref/sdk-source-map-deletion-callback to develop November 26, 2026 13:05
@timfish
timfish force-pushed the ref/sdk-source-map-glob-option branch from 674f97e to d766635 Compare November 26, 2026 13:05
@timfish
timfish force-pushed the ref/sdk-source-map-glob-option branch 2 times, most recently from 364ee8c to fa82e22 Compare November 30, 2026 13:38
timfish added a commit that referenced this pull request Dec 2, 2026
…es not run (#26935)

Stacked on #26906.

With the `runAfterProductionCompile` hook, only the hook uploads and
deletes source maps. The SDK still turned source maps on when the hook
was not set up, so they stayed in `.next/static`, where they are served
publicly.

- Turbopack: the SDK no longer sets `productionBrowserSourceMaps: true`
when `useRunAfterProductionCompileHook` is `false`, or when
`compiler.runAfterProductionCompile` is set to something that is not a
function.
- Webpack with `useRunAfterProductionCompileHook: true`: the SDK no
longer changes `devtool` when the Next.js version is below 15.4.1, or
when `compiler.runAfterProductionCompile` is not a function.
- `sourcemaps.delete: false` still turns the maps on, because the user
asked to keep them.
- Source maps that the user turned on are not changed.
- The two hook call sites now share one function. This keeps the file
under the 300-line lint limit.
- Covered by unit tests only. No E2E app builds with the hook off.
@timfish
timfish enabled stacked auto-merge (squash) December 2, 2026 14:06
…ternal option

Next.js, Nitro, Nuxt and SvelteKit passed their own globs through the
public `filesToDeleteAfterUpload`. They now pass them through the
internal `sdkFilesToDeleteAfterUpload`. Next.js no longer passes its own
`disable` value or writes `deleteSourcemapsAfterUpload` into the user's
options. SDK messages no longer tell users to set these options.
…es not run (#26935)

Stacked on #26906.

With the `runAfterProductionCompile` hook, only the hook uploads and
deletes source maps. The SDK still turned source maps on when the hook
was not set up, so they stayed in `.next/static`, where they are served
publicly.

- Turbopack: the SDK no longer sets `productionBrowserSourceMaps: true`
when `useRunAfterProductionCompileHook` is `false`, or when
`compiler.runAfterProductionCompile` is set to something that is not a
function.
- Webpack with `useRunAfterProductionCompileHook: true`: the SDK no
longer changes `devtool` when the Next.js version is below 15.4.1, or
when `compiler.runAfterProductionCompile` is not a function.
- `sourcemaps.delete: false` still turns the maps on, because the user
asked to keep them.
- Source maps that the user turned on are not changed.
- The two hook call sites now share one function. This keeps the file
under the 300-line lint limit.
- Covered by unit tests only. No E2E app builds with the hook off.
@timfish
timfish force-pushed the ref/sdk-source-map-glob-option branch from 7a5c171 to f95ffa7 Compare December 3, 2026 03:38
@timfish
timfish merged commit 4740c71 into develop Dec 3, 2026
791 of 795 checks passed
@timfish
timfish deleted the ref/sdk-source-map-glob-option branch December 3, 2026 08:41
timfish added a commit that referenced this pull request Dec 3, 2026
…apsAfterUpload` and `filesToDeleteAfterUpload` (#26908)

Stacked on #26906. Don't merge before getsentry/sentry-docs#20971, which
documents the replacements.

`sourcemaps.upload`, `sourcemaps.injectDebugIds` and `sourcemaps.delete`
replace these options. They keep working until v12 and now log a warning
when the user sets them.

- `sourcemaps.disable` → `upload: false` for `'disable-upload'`,
`injectDebugIds: false` for `true`.
- `sourcemaps.deleteSourcemapsAfterUpload` (shared, Next.js, and
Gatsby's flat option) → `sourcemaps.delete`. `delete: true` removes
more: every source map of the build, not only those of uploaded chunks.
- `sourcemaps.filesToDeleteAfterUpload` → `sourcemaps.delete`, or a
script after the build for other files.
- Astro, Remix, SolidStart, TanStack Start and Gatsby now call the
shared warning helper, so every SDK warns for each option a user can set
there.
- Gatsby now passes `sourcemaps.disable` to the plugin. Before, Gatsby
only read it for its `devtool` decision, so `disable: true` still
injected debug IDs and uploaded the source maps that existed.
- `MIGRATION.md` gets a short "Deprecations in 11.x" section: the
replacement table, a link to the docs, and how to turn off the release
steps that `disable: true` also stopped in Astro, Nuxt, SolidStart and
Nitro. The older v11 entries that pointed to `sourcemaps.disable` now
name the new options.
- E2E apps keep using the deprecated options until v12.
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