Conversation
Codecov Results 📊Generated by Codecov Action |
|
|
||
| if (sentryBuildOptions.debug && userFilesToDeleteAfterUpload !== undefined) { | ||
| // eslint-disable-next-line no-console | ||
| console.debug('[@sentry/nextjs] Skipping auto-deletion of source maps as user has provided filesToDeleteAfterUpload:', userFilesToDeleteAfterUpload); |
There was a problem hiding this comment.
Debug log misleadingly implies deletion is skipped entirely
Low Severity
The debug log message says "Skipping auto-deletion of source maps as user has provided filesToDeleteAfterUpload" which implies deletion is being skipped. In reality, the user's custom filesToDeleteAfterUpload patterns will be used to delete files — it's only the auto-computed patterns that are skipped. A user debugging with debug: true could misinterpret this as "no deletion is happening" when files are indeed being deleted using their custom patterns. The log was specifically requested to help users understand what patterns are being used, but it focuses on what's skipped rather than what's happening.
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
…ue-does-not-delete-nextserver-source
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| buildTool, | ||
| deleteSourcemapsAfterUpload, | ||
| useRunAfterProductionCompileHook, | ||
| ); |
There was a problem hiding this comment.
User patterns bypass deleteSourcemapsAfterUpload: false guard
Medium Severity
When filesToDeleteAfterUpload is provided, it completely bypasses the deleteSourcemapsAfterUpload check. If a user sets deleteSourcemapsAfterUpload: false alongside filesToDeleteAfterUpload, source maps will still be deleted — contradicting the user's explicit opt-out. The deleteSourcemapsAfterUpload: false setting is expected to act as a master toggle preventing all deletion.
ref getsentry/sentry-javascript#19235 ref getsentry/sentry-javascript#19280 --------- Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>


sourcemaps.filesToDeleteAfterUploadto the Next.js SDK's SentryBuildOptions type, allowing users to specify custom glob patterns forsource map deletion after upload.
deleteSourcemapsAfterUpload, giving users fine-grained control — including the ability to target server-side source maps if desired.closes #19235