File tree Expand file tree Collapse file tree 3 files changed +45
-17
lines changed
integration-tests/fixtures/disabled-sourcemaps-upload Expand file tree Collapse file tree 3 files changed +45
-17
lines changed Original file line number Diff line number Diff line change @@ -126,24 +126,24 @@ export function sentryUnpluginFactory({
126126
127127 if ( ! options . sourcemaps ?. disable ) {
128128 plugins . push ( debugIdInjectionPlugin ( logger ) ) ;
129- }
130129
131- // This option is only strongly typed for the webpack plugin, where it is used. It has no effect on other plugins
132- const webpack_forceExitOnBuildComplete =
133- typeof options . _experiments [ "forceExitOnBuildCompletion" ] === "boolean"
134- ? options . _experiments [ "forceExitOnBuildCompletion" ]
135- : undefined ;
136-
137- plugins . push (
138- debugIdUploadPlugin (
139- createDebugIdUploadFunction ( {
140- sentryBuildPluginManager,
141- } ) ,
142- logger ,
143- sentryBuildPluginManager . createDependencyOnBuildArtifacts ,
144- webpack_forceExitOnBuildComplete
145- )
146- ) ;
130+ // This option is only strongly typed for the webpack plugin, where it is used. It has no effect on other plugins
131+ const webpack_forceExitOnBuildComplete =
132+ typeof options . _experiments [ "forceExitOnBuildCompletion" ] === "boolean"
133+ ? options . _experiments [ "forceExitOnBuildCompletion" ]
134+ : undefined ;
135+
136+ plugins . push (
137+ debugIdUploadPlugin (
138+ createDebugIdUploadFunction ( {
139+ sentryBuildPluginManager,
140+ } ) ,
141+ logger ,
142+ sentryBuildPluginManager . createDependencyOnBuildArtifacts ,
143+ webpack_forceExitOnBuildComplete
144+ )
145+ ) ;
146+ }
147147
148148 if ( options . reactComponentAnnotation ) {
149149 if ( ! options . reactComponentAnnotation . enabled ) {
Original file line number Diff line number Diff line change 1+ import { sentryRollupPlugin } from "@sentry/rollup-plugin" ;
2+
3+ const debugIdUploadPluginName = "sentry-rollup-debug-id-upload-plugin" ;
4+
5+ test ( "should not call upload plugin when sourcemaps are disabled" , ( ) => {
6+ const plugins = sentryRollupPlugin ( {
7+ telemetry : false ,
8+ sourcemaps : {
9+ disable : true ,
10+ } ,
11+ } ) as Array < { name : string } > ;
12+
13+ const debugIdUploadPlugin = plugins . find ( ( plugin ) => plugin . name === debugIdUploadPluginName ) ;
14+
15+ expect ( debugIdUploadPlugin ) . toBeUndefined ( ) ;
16+ } ) ;
17+
18+ test ( "should call upload plugin when sourcemaps are enabled" , ( ) => {
19+ const plugins = sentryRollupPlugin ( {
20+ telemetry : false ,
21+ } ) as Array < { name : string } > ;
22+
23+ const debugIdUploadPlugin = plugins . find ( ( plugin ) => plugin . name === debugIdUploadPluginName ) ;
24+
25+ expect ( debugIdUploadPlugin ) . toBeDefined ( ) ;
26+ } ) ;
Original file line number Diff line number Diff line change 1+ // eslint-disable-next-line no-console
2+ console . log ( "Beep!" ) ;
You can’t perform that action at this time.
0 commit comments