You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This streamlines the build logs for sveltekit. For this, I aligned how
we handle source maps setting with other SDKs, which is a bit different
then how sveltekit did it.
1. Only show log messages when `debug: true`
2. Show short warning when `sourceMaps: false` and `debug: false`, more
details when `debug: true` is set
3. Re-organize how `filesToDeleteAfterUpload` is set, based on other
SDKs (?? I hope that makes sense....)
---------
Co-authored-by: Abhijeet Prasad <[email protected]>
`[Sentry] Parts of source map generation are currently disabled in your Vite configuration (\`${settingKey}: false\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \`${settingKey}\` (e.g. by setting them to \`hidden\`).`,
.join(', ')}]\` to delete generated source maps after they were uploaded to Sentry.`,
200
190
);
201
-
});
202
-
}elseif(previousSourceMapSetting==='enabled'){
203
-
if(mergedOptions?.debug){
204
-
consoleSandbox(()=>{
205
-
// eslint-disable-next-line no-console
206
-
console.log(
207
-
`[Sentry] We discovered you enabled source map generation in your Vite configuration (\`${settingKey}\`). Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue page.`,
`[Sentry] Source map generation is currently disabled in your Vite configuration (\`${settingKey}: false \`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \`${settingKey}\` (e.g. by setting them to \`hidden\`).`,
417
+
);
418
+
}else{
419
+
// eslint-disable-next-line no-console
420
+
console.warn('[Sentry] Source map generation is disabled in your Vite configuration.');
`[Sentry] We discovered \`${settingKey}\` is set to \`${viteSourceMap.toString()}\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue page.`,
`[Sentry] Enabled source map generation in the build options with \`${settingKey}: 'hidden'\`. The source maps will be deleted after they were uploaded to Sentry.`,
437
+
);
437
438
}
438
439
439
-
return{
440
-
previousSourceMapSetting: 'unset',
441
-
updatedSourceMapSetting: 'hidden',
442
-
};
440
+
returnupdatedSourceMapSetting;
443
441
}
444
442
445
443
functiongetFiles(dir: string): string[]{
@@ -475,22 +473,3 @@ function detectSentryRelease(): string {
475
473
476
474
returnrelease;
477
475
}
478
-
479
-
/**
480
-
* Creates a deferred promise that can be resolved/rejected by calling the
0 commit comments