@sentry/rollup-plugin 4.0.2 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -31
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -119,10 +119,13 @@ This value can also be specified via the `SENTRY_PROJECT` environment variable.
|
|
|
119
119
|
|
|
120
120
|
Type: `string`
|
|
121
121
|
|
|
122
|
-
The authentication token to use for all communication with Sentry.
|
|
122
|
+
The authentication token to use for all communication with Sentry.
|
|
123
|
+
Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/.
|
|
123
124
|
|
|
124
125
|
This value can also be specified via the `SENTRY_AUTH_TOKEN` environment variable.
|
|
125
126
|
|
|
127
|
+
Check out the docs on organization tokens: https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
|
|
128
|
+
|
|
126
129
|
### `url`
|
|
127
130
|
|
|
128
131
|
Type: `string`
|
|
@@ -137,19 +140,19 @@ Defaults to https://sentry.io/, which is the correct value for SaaS customers.
|
|
|
137
140
|
|
|
138
141
|
Type: `Record<string, string>`
|
|
139
142
|
|
|
140
|
-
|
|
143
|
+
Additional headers to send with every outgoing request to Sentry.
|
|
141
144
|
|
|
142
145
|
### `debug`
|
|
143
146
|
|
|
144
147
|
Type: `boolean`
|
|
145
148
|
|
|
146
|
-
|
|
149
|
+
Enable debug information logs during build-time. Enabling this will give you, for example, logs about source maps. Defaults to `false`.
|
|
147
150
|
|
|
148
151
|
### `silent`
|
|
149
152
|
|
|
150
153
|
Type: `boolean`
|
|
151
154
|
|
|
152
|
-
Suppresses all logs. Defaults to `false`.
|
|
155
|
+
Suppresses all build logs (all log levels, including errors). Defaults to `false`.
|
|
153
156
|
|
|
154
157
|
### `errorHandler`
|
|
155
158
|
|
|
@@ -172,9 +175,9 @@ errorHandler: (err) => {
|
|
|
172
175
|
|
|
173
176
|
Type: `boolean`
|
|
174
177
|
|
|
175
|
-
If
|
|
178
|
+
If this flag is `true`, internal plugin errors and performance data will be sent to Sentry. It will not collect any sensitive or user-specific data.
|
|
176
179
|
|
|
177
|
-
At Sentry we like to use Sentry ourselves to deliver faster and more stable products. We're very careful of what we're sending. We won't collect anything other than error and high-level performance data. We will never collect your code or any details of the projects in which you're using this plugin.
|
|
180
|
+
At Sentry, we like to use Sentry ourselves to deliver faster and more stable products. We're very careful of what we're sending. We won't collect anything other than error and high-level performance data. We will never collect your code or any details of the projects in which you're using this plugin.
|
|
178
181
|
|
|
179
182
|
Defaults to `true`.
|
|
180
183
|
|
|
@@ -188,16 +191,16 @@ Completely disables all functionality of the plugin. Defaults to `false`.
|
|
|
188
191
|
|
|
189
192
|
|
|
190
193
|
|
|
191
|
-
Options
|
|
194
|
+
Options related to source maps upload and processing.
|
|
192
195
|
### `sourcemaps.assets`
|
|
193
196
|
|
|
194
197
|
Type: `string | string[]`
|
|
195
198
|
|
|
196
|
-
A glob or an array of globs that
|
|
199
|
+
A glob or an array of globs that specify the build artifacts and source maps that will be uploaded to Sentry.
|
|
197
200
|
|
|
198
|
-
|
|
201
|
+
The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
|
|
199
202
|
|
|
200
|
-
|
|
203
|
+
If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
|
|
201
204
|
|
|
202
205
|
Use the `debug` option to print information about which files end up being uploaded.
|
|
203
206
|
|
|
@@ -207,12 +210,12 @@ Type: `string | string[]`
|
|
|
207
210
|
|
|
208
211
|
A glob or an array of globs that specifies which build artifacts should not be uploaded to Sentry.
|
|
209
212
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
|
|
213
|
+
The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
|
|
213
214
|
|
|
214
215
|
Use the `debug` option to print information about which files end up being uploaded.
|
|
215
216
|
|
|
217
|
+
Default: `[]`
|
|
218
|
+
|
|
216
219
|
### `sourcemaps.rewriteSources`
|
|
217
220
|
|
|
218
221
|
Type: `(source: string, map: any) => string`
|
|
@@ -250,7 +253,9 @@ Type: `string | string[] | Promise<string | string[]>`
|
|
|
250
253
|
|
|
251
254
|
A glob, an array of globs or a promise resolving a glob or array of globs that specifies the build artifacts that should be deleted after the artifact upload to Sentry has been completed.
|
|
252
255
|
|
|
253
|
-
|
|
256
|
+
Note: If you pass in a Promise that resolves to a string or array, the plugin will await the Promise and use the resolved value globs. This is useful if you need to dynamically determine the files to delete. Some higher-level Sentry SDKs or options use this feature (e.g., SvelteKit).
|
|
257
|
+
|
|
258
|
+
The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
|
|
254
259
|
|
|
255
260
|
Use the `debug` option to print information about which files end up being deleted.
|
|
256
261
|
|
|
@@ -258,7 +263,7 @@ Use the `debug` option to print information about which files end up being delet
|
|
|
258
263
|
|
|
259
264
|
Type: `boolean`
|
|
260
265
|
|
|
261
|
-
|
|
266
|
+
If this flag is `true`, any functionality related to source maps will be disabled.
|
|
262
267
|
|
|
263
268
|
Defaults to `false`.
|
|
264
269
|
|
|
@@ -277,9 +282,9 @@ Unique identifier for the release you want to create.
|
|
|
277
282
|
|
|
278
283
|
This value can also be specified via the `SENTRY_RELEASE` environment variable.
|
|
279
284
|
|
|
280
|
-
Defaults to automatically detecting a value for your environment. This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA
|
|
285
|
+
Defaults to automatically detecting a value for your environment. This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA (the latter requires access to git CLI and for the root directory to be a valid repository).
|
|
281
286
|
|
|
282
|
-
If
|
|
287
|
+
If no `name` is provided and the plugin can't automatically detect one, no release will be created.
|
|
283
288
|
|
|
284
289
|
### `release.inject`
|
|
285
290
|
|
|
@@ -293,7 +298,9 @@ Defaults to `true`.
|
|
|
293
298
|
|
|
294
299
|
Type: `boolean`
|
|
295
300
|
|
|
296
|
-
Whether the plugin should create a release on Sentry during the build.
|
|
301
|
+
Whether the plugin should create a release on Sentry during the build.
|
|
302
|
+
|
|
303
|
+
Note that a release may still appear in Sentry even if this is value is `false` because any Sentry event that has a release value attached will automatically create a release. (for example via the `inject` option)
|
|
297
304
|
|
|
298
305
|
Defaults to `true`.
|
|
299
306
|
|
|
@@ -301,7 +308,7 @@ Defaults to `true`.
|
|
|
301
308
|
|
|
302
309
|
Type: `boolean`
|
|
303
310
|
|
|
304
|
-
Whether the
|
|
311
|
+
Whether to automatically finalize the release. The release is finalized by adding an end timestamp after the build ends.
|
|
305
312
|
|
|
306
313
|
Defaults to `true`.
|
|
307
314
|
|
|
@@ -309,13 +316,15 @@ Defaults to `true`.
|
|
|
309
316
|
|
|
310
317
|
Type: `string`
|
|
311
318
|
|
|
312
|
-
Unique identifier for the
|
|
319
|
+
Unique distribution identifier for the release. Used to further segment the release.
|
|
320
|
+
|
|
321
|
+
Usually your build number.
|
|
313
322
|
|
|
314
323
|
### `release.vcsRemote`
|
|
315
324
|
|
|
316
325
|
Type: `string`
|
|
317
326
|
|
|
318
|
-
Version control system remote name.
|
|
327
|
+
Version control system (VCS) remote name.
|
|
319
328
|
|
|
320
329
|
This value can also be specified via the `SENTRY_VSC_REMOTE` environment variable.
|
|
321
330
|
|
|
@@ -325,7 +334,11 @@ Defaults to 'origin'.
|
|
|
325
334
|
|
|
326
335
|
|
|
327
336
|
|
|
328
|
-
|
|
337
|
+
Configuration for associating the release with its commits in Sentry.
|
|
338
|
+
|
|
339
|
+
Set to `false` to disable commit association.
|
|
340
|
+
|
|
341
|
+
Defaults to `{ auto: true }`.
|
|
329
342
|
### `release.setCommits.previousCommit`
|
|
330
343
|
|
|
331
344
|
Type: `string`
|
|
@@ -380,7 +393,7 @@ Required if the `auto` option is not set to `true`.
|
|
|
380
393
|
|
|
381
394
|
|
|
382
395
|
|
|
383
|
-
|
|
396
|
+
Configuration for adding deployment information to the release in Sentry.
|
|
384
397
|
### `release.deploy.env`
|
|
385
398
|
|
|
386
399
|
Type: `string`
|
|
@@ -533,52 +546,70 @@ type IncludeEntry = {
|
|
|
533
546
|
|
|
534
547
|
|
|
535
548
|
|
|
536
|
-
Options
|
|
549
|
+
Options for bundle size optimizations by excluding certain features.
|
|
537
550
|
### `bundleSizeOptimizations.excludeDebugStatements`
|
|
538
551
|
|
|
539
552
|
Type: `boolean`
|
|
540
553
|
|
|
541
|
-
|
|
542
|
-
|
|
554
|
+
Exclude debug statements from the bundle, thus disabling features like the SDK's `debug` option.
|
|
555
|
+
|
|
556
|
+
If set to `true`, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK during the build.
|
|
557
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
543
558
|
|
|
544
|
-
|
|
559
|
+
Defaults to `false`.
|
|
545
560
|
|
|
546
561
|
### `bundleSizeOptimizations.excludeTracing`
|
|
547
562
|
|
|
548
563
|
Type: `boolean`
|
|
549
564
|
|
|
565
|
+
Exclude tracing functionality from the bundle, thus disabling features like performance monitoring.
|
|
566
|
+
|
|
550
567
|
If set to `true`, the plugin will attempt to tree-shake (remove) code within the Sentry SDK that is related to tracing and performance monitoring.
|
|
551
|
-
Note that the success of this depends on tree
|
|
568
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
552
569
|
|
|
553
570
|
**Notice:** Do not enable this when you're using any performance monitoring-related SDK features (e.g. `Sentry.startTransaction()`).
|
|
554
571
|
|
|
572
|
+
Defaults to `false`.
|
|
573
|
+
|
|
555
574
|
### `bundleSizeOptimizations.excludeReplayShadowDom`
|
|
556
575
|
|
|
557
576
|
Type: `boolean`
|
|
558
577
|
|
|
578
|
+
Exclude Replay Shadow DOM functionality from the bundle.
|
|
579
|
+
|
|
559
580
|
If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay Shadow DOM recording functionality.
|
|
560
|
-
Note that the success of this depends on tree
|
|
581
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
561
582
|
|
|
562
583
|
This option is safe to be used when you do not want to capture any Shadow DOM activity via Sentry Session Replay.
|
|
563
584
|
|
|
585
|
+
Defaults to `false`.
|
|
586
|
+
|
|
564
587
|
### `bundleSizeOptimizations.excludeReplayIframe`
|
|
565
588
|
|
|
566
589
|
Type: `boolean`
|
|
567
590
|
|
|
591
|
+
Exclude Replay iFrame functionality from the bundle.
|
|
592
|
+
|
|
568
593
|
If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay `iframe` recording functionality.
|
|
569
|
-
Note that the success of this depends on tree
|
|
594
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
570
595
|
|
|
571
596
|
You can safely do this when you do not want to capture any `iframe` activity via Sentry Session Replay.
|
|
572
597
|
|
|
598
|
+
Defaults to `false`.
|
|
599
|
+
|
|
573
600
|
### `bundleSizeOptimizations.excludeReplayWorker`
|
|
574
601
|
|
|
575
602
|
Type: `boolean`
|
|
576
603
|
|
|
604
|
+
Exclude Replay worker functionality from the bundle.
|
|
605
|
+
|
|
577
606
|
If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay's Compression Web Worker.
|
|
578
|
-
Note that the success of this depends on tree
|
|
607
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
579
608
|
|
|
580
609
|
**Notice:** You should only use this option if you manually host a compression worker and configure it in your Sentry Session Replay integration config via the `workerUrl` option.
|
|
581
610
|
|
|
611
|
+
Defaults to `false`.
|
|
612
|
+
|
|
582
613
|
### `reactComponentAnnotation`
|
|
583
614
|
|
|
584
615
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/rollup-plugin",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Official Sentry Rollup plugin",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript-bundler-plugins.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/rollup-plugin",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"prepack": "ts-node ./src/prepack.ts"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@sentry/bundler-plugin-core": "4.
|
|
52
|
+
"@sentry/bundler-plugin-core": "4.1.1",
|
|
53
53
|
"unplugin": "1.0.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@babel/preset-typescript": "7.17.12",
|
|
62
62
|
"@rollup/plugin-babel": "5.3.1",
|
|
63
63
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
64
|
-
"@sentry-internal/eslint-config": "4.
|
|
65
|
-
"@sentry-internal/sentry-bundler-plugin-tsconfig": "4.
|
|
64
|
+
"@sentry-internal/eslint-config": "4.1.1",
|
|
65
|
+
"@sentry-internal/sentry-bundler-plugin-tsconfig": "4.1.1",
|
|
66
66
|
"@swc/core": "^1.2.205",
|
|
67
67
|
"@swc/jest": "^0.2.21",
|
|
68
68
|
"@types/jest": "^28.1.3",
|