@sentry/rollup-plugin 2.2.2 → 2.4.0

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.
Files changed (2) hide show
  1. package/README.md +74 -70
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -58,42 +58,42 @@ export default {
58
58
 
59
59
  ## Options
60
60
 
61
- - [`org`](#option-org)
62
- - [`project`](#option-project)
63
- - [`authToken`](#option-authtoken)
64
- - [`url`](#option-url)
65
- - [`headers`](#option-headers)
66
- - [`debug`](#option-debug)
67
- - [`silent`](#option-silent)
68
- - [`errorHandler`](#option-errorhandler)
69
- - [`telemetry`](#option-telemetry)
70
- - [`disable`](#option-disable)
71
- - [`sourcemaps`](#option-sourcemaps)
72
- - [`assets`](#option-sourcemaps-assets)
73
- - [`ignore`](#option-sourcemaps-ignore)
74
- - [`rewriteSources`](#option-sourcemaps-rewritesources)
75
- - [`deleteFilesAfterUpload`](#option-sourcemaps-deletefilesafterupload)
76
- - [`release`](#option-release)
77
- - [`name`](#option-release-name)
78
- - [`inject`](#option-release-inject)
79
- - [`create`](#option-release-create)
80
- - [`finalize`](#option-release-finalize)
81
- - [`dist`](#option-release-dist)
82
- - [`vcsRemote`](#option-release-vcsremote)
83
- - [`setCommits`](#option-release-setcommits)
84
- - [`deploy`](#option-release-deploy)
85
- - [`cleanArtifacts`](#option-release-cleanartifacts)
86
- - [`uploadLegacySourcemaps`](#option-release-uploadlegacysourcemaps)
87
- - [`_experiments`](#option-_experiments)
88
- - [`injectBuildInformation`](#option-_experiments-injectbuildinformation)
89
-
90
- ### <a name="option-org"></a>`org`
61
+ - [`org`](#org)
62
+ - [`project`](#project)
63
+ - [`authToken`](#authtoken)
64
+ - [`url`](#url)
65
+ - [`headers`](#headers)
66
+ - [`debug`](#debug)
67
+ - [`silent`](#silent)
68
+ - [`errorHandler`](#errorhandler)
69
+ - [`telemetry`](#telemetry)
70
+ - [`disable`](#disable)
71
+ - [`sourcemaps`](#sourcemaps)
72
+ - [`assets`](#sourcemapsassets)
73
+ - [`ignore`](#sourcemapsignore)
74
+ - [`rewriteSources`](#sourcemapsrewritesources)
75
+ - [`filesToDeleteAfterUpload`](#sourcemapsfilestodeleteafterupload)
76
+ - [`release`](#release)
77
+ - [`name`](#releasename)
78
+ - [`inject`](#releaseinject)
79
+ - [`create`](#releasecreate)
80
+ - [`finalize`](#releasefinalize)
81
+ - [`dist`](#releasedist)
82
+ - [`vcsRemote`](#releasevcsremote)
83
+ - [`setCommits`](#releasesetcommits)
84
+ - [`deploy`](#releasedeploy)
85
+ - [`cleanArtifacts`](#releasecleanartifacts)
86
+ - [`uploadLegacySourcemaps`](#releaseuploadlegacysourcemaps)
87
+ - [`_experiments`](#_experiments)
88
+ - [`injectBuildInformation`](#_experimentsinjectbuildinformation)
89
+
90
+ ### `org`
91
91
 
92
92
  Type: `string`
93
93
 
94
94
  The slug of the Sentry organization associated with the app.
95
95
 
96
- ### <a name="option-project"></a>`project`
96
+ ### `project`
97
97
 
98
98
 
99
99
 
@@ -101,7 +101,7 @@ The slug of the Sentry project associated with the app.
101
101
 
102
102
  This value can also be specified via the `SENTRY_PROJECT` environment variable.
103
103
 
104
- ### <a name="option-authtoken"></a>`authToken`
104
+ ### `authToken`
105
105
 
106
106
  Type: `string`
107
107
 
@@ -109,7 +109,7 @@ The authentication token to use for all communication with Sentry. Can be obtain
109
109
 
110
110
  This value can also be specified via the `SENTRY_AUTH_TOKEN` environment variable.
111
111
 
112
- ### <a name="option-url"></a>`url`
112
+ ### `url`
113
113
 
114
114
  Type: `string`
115
115
 
@@ -119,29 +119,29 @@ This value can also be set via the SENTRY_URL environment variable.
119
119
 
120
120
  Defaults to https://sentry.io/, which is the correct value for SaaS customers.
121
121
 
122
- ### <a name="option-headers"></a>`headers`
122
+ ### `headers`
123
123
 
124
124
  Type: `Record<string, string>`
125
125
 
126
126
  Headers added to every outgoing network request.
127
127
 
128
- ### <a name="option-debug"></a>`debug`
128
+ ### `debug`
129
129
 
130
130
  Type: `boolean`
131
131
 
132
132
  Print useful debug information. Defaults to `false`.
133
133
 
134
- ### <a name="option-silent"></a>`silent`
134
+ ### `silent`
135
135
 
136
136
  Type: `boolean`
137
137
 
138
138
  Suppresses all logs. Defaults to `false`.
139
139
 
140
- ### <a name="option-errorhandler"></a>`errorHandler`
140
+ ### `errorHandler`
141
141
 
142
142
  Type: `(err: Error) => void`
143
143
 
144
- When an error occurs during rlease creation or sourcemaps upload, the plugin will call this function.
144
+ When an error occurs during release creation or sourcemaps upload, the plugin will call this function.
145
145
 
146
146
  By default, the plugin will simply throw an error, thereby stopping the bundling process. If an `errorHandler` callback is provided, compilation will continue, unless an error is thrown in the provided callback.
147
147
 
@@ -154,7 +154,7 @@ errorHandler: (err) => {
154
154
  ```
155
155
 
156
156
 
157
- ### <a name="option-telemetry"></a>`telemetry`
157
+ ### `telemetry`
158
158
 
159
159
  Type: `boolean`
160
160
 
@@ -164,18 +164,18 @@ At Sentry we like to use Sentry ourselves to deliver faster and more stable prod
164
164
 
165
165
  Defaults to `true`.
166
166
 
167
- ### <a name="option-disable"></a>`disable`
167
+ ### `disable`
168
168
 
169
169
  Type: `boolean`
170
170
 
171
171
  Completely disables all functionality of the plugin. Defaults to `false`.
172
172
 
173
- ### <a name="option-sourcemaps"></a>`sourcemaps`
173
+ ### `sourcemaps`
174
174
 
175
175
 
176
176
 
177
177
  Options for source maps uploading. Leave this option undefined if you do not want to upload source maps to Sentry.
178
- ### <a name="option-sourcemaps-assets"></a>`sourcemaps.assets`
178
+ ### `sourcemaps.assets`
179
179
 
180
180
  Type: `string | string[]`
181
181
 
@@ -187,7 +187,7 @@ The globbing patterns follow the implementation of the `glob` package. (https://
187
187
 
188
188
  Use the `debug` option to print information about which files end up being uploaded.
189
189
 
190
- ### <a name="option-sourcemaps-ignore"></a>`sourcemaps.ignore`
190
+ ### `sourcemaps.ignore`
191
191
 
192
192
  Type: `string | string[]`
193
193
 
@@ -199,7 +199,7 @@ The globbing patterns follow the implementation of the `glob` package. (https://
199
199
 
200
200
  Use the `debug` option to print information about which files end up being uploaded.
201
201
 
202
- ### <a name="option-sourcemaps-rewritesources"></a>`sourcemaps.rewriteSources`
202
+ ### `sourcemaps.rewriteSources`
203
203
 
204
204
  Type: `(source: string, map: any) => string`
205
205
 
@@ -207,7 +207,7 @@ Hook to rewrite the `sources` field inside the source map before being uploaded
207
207
 
208
208
  Defaults to making all sources relative to `process.cwd()` while building.
209
209
 
210
- ### <a name="option-sourcemaps-deletefilesafterupload"></a>`sourcemaps.deleteFilesAfterUpload`
210
+ ### `sourcemaps.filesToDeleteAfterUpload`
211
211
 
212
212
  Type: `string | string[]`
213
213
 
@@ -217,14 +217,14 @@ The globbing patterns follow the implementation of the `glob` package. (https://
217
217
 
218
218
  Use the `debug` option to print information about which files end up being deleted.
219
219
 
220
- ### <a name="option-release"></a>`release`
220
+ ### `release`
221
221
 
222
222
 
223
223
 
224
224
  Options related to managing the Sentry releases for a build.
225
225
 
226
226
  More info: https://docs.sentry.io/product/releases/
227
- ### <a name="option-release-name"></a>`release.name`
227
+ ### `release.name`
228
228
 
229
229
  Type: `string`
230
230
 
@@ -236,7 +236,7 @@ Defaults to automatically detecting a value for your environment. This includes
236
236
 
237
237
  If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
238
238
 
239
- ### <a name="option-release-inject"></a>`release.inject`
239
+ ### `release.inject`
240
240
 
241
241
  Type: `boolean`
242
242
 
@@ -244,7 +244,7 @@ Whether the plugin should inject release information into the build for the SDK
244
244
 
245
245
  Defaults to `true`.
246
246
 
247
- ### <a name="option-release-create"></a>`release.create`
247
+ ### `release.create`
248
248
 
249
249
  Type: `boolean`
250
250
 
@@ -252,7 +252,7 @@ Whether the plugin should create a release on Sentry during the build. Note that
252
252
 
253
253
  Defaults to `true`.
254
254
 
255
- ### <a name="option-release-finalize"></a>`release.finalize`
255
+ ### `release.finalize`
256
256
 
257
257
  Type: `boolean`
258
258
 
@@ -260,13 +260,13 @@ Whether the Sentry release should be automatically finalized (meaning an end tim
260
260
 
261
261
  Defaults to `true`.
262
262
 
263
- ### <a name="option-release-dist"></a>`release.dist`
263
+ ### `release.dist`
264
264
 
265
265
  Type: `string`
266
266
 
267
267
  Unique identifier for the distribution, used to further segment your release.
268
268
 
269
- ### <a name="option-release-vcsremote"></a>`release.vcsRemote`
269
+ ### `release.vcsRemote`
270
270
 
271
271
  Type: `string`
272
272
 
@@ -276,12 +276,12 @@ This value can also be specified via the `SENTRY_VSC_REMOTE` environment variabl
276
276
 
277
277
  Defaults to 'origin'.
278
278
 
279
- ### <a name="option-release-setcommits"></a>`release.setCommits`
279
+ ### `release.setCommits`
280
280
 
281
281
 
282
282
 
283
283
  Option to associate the created release with its commits in Sentry.
284
- ### <a name="option-release-setcommits-previouscommit"></a>`release.setCommits.previousCommit`
284
+ ### `release.setCommits.previousCommit`
285
285
 
286
286
  Type: `string`
287
287
 
@@ -291,7 +291,7 @@ Defaults to the last commit of the previous release in Sentry.
291
291
 
292
292
  If there was no previous release, the last 10 commits will be used.
293
293
 
294
- ### <a name="option-release-setcommits-ignoremissing"></a>`release.setCommits.ignoreMissing`
294
+ ### `release.setCommits.ignoreMissing`
295
295
 
296
296
  Type: `boolean`
297
297
 
@@ -299,7 +299,7 @@ If the flag is to `true` and the previous release commit was not found in the re
299
299
 
300
300
  Defaults to `false`.
301
301
 
302
- ### <a name="option-release-setcommits-ignoreempty"></a>`release.setCommits.ignoreEmpty`
302
+ ### `release.setCommits.ignoreEmpty`
303
303
 
304
304
  Type: `boolean`
305
305
 
@@ -307,7 +307,7 @@ If this flag is set, the setCommits step will not fail and just exit silently if
307
307
 
308
308
  Defaults to `false`.
309
309
 
310
- ### <a name="option-release-setcommits-auto"></a>`release.setCommits.auto`
310
+ ### `release.setCommits.auto`
311
311
 
312
312
  Type: `boolean`
313
313
 
@@ -315,7 +315,7 @@ Automatically sets `commit` and `previousCommit`. Sets `commit` to `HEAD` and `p
315
315
 
316
316
  If you set this to `true`, manually specified `commit` and `previousCommit` options will be overridden. It is best to not specify them at all if you set this option to `true`.
317
317
 
318
- ### <a name="option-release-setcommits-repo"></a>`release.setCommits.repo`
318
+ ### `release.setCommits.repo`
319
319
 
320
320
  Type: `string`
321
321
 
@@ -323,7 +323,7 @@ The full repo name as defined in Sentry.
323
323
 
324
324
  Required if the `auto` option is not set to `true`.
325
325
 
326
- ### <a name="option-release-setcommits-commit"></a>`release.setCommits.commit`
326
+ ### `release.setCommits.commit`
327
327
 
328
328
  Type: `string`
329
329
 
@@ -331,48 +331,48 @@ The current (last) commit in the release.
331
331
 
332
332
  Required if the `auto` option is not set to `true`.
333
333
 
334
- ### <a name="option-release-deploy"></a>`release.deploy`
334
+ ### `release.deploy`
335
335
 
336
336
 
337
337
 
338
338
  Adds deployment information to the release in Sentry.
339
- ### <a name="option-release-deploy-env"></a>`release.deploy.env`
339
+ ### `release.deploy.env`
340
340
 
341
341
  Type: `string`
342
342
 
343
343
  Environment for this release. Values that make sense here would be `production` or `staging`.
344
344
 
345
- ### <a name="option-release-deploy-started"></a>`release.deploy.started`
345
+ ### `release.deploy.started`
346
346
 
347
347
  Type: `number | string`
348
348
 
349
349
  Deployment start time in Unix timestamp (in seconds) or ISO 8601 format.
350
350
 
351
- ### <a name="option-release-deploy-finished"></a>`release.deploy.finished`
351
+ ### `release.deploy.finished`
352
352
 
353
353
  Type: `number | string`
354
354
 
355
355
  Deployment finish time in Unix timestamp (in seconds) or ISO 8601 format.
356
356
 
357
- ### <a name="option-release-deploy-time"></a>`release.deploy.time`
357
+ ### `release.deploy.time`
358
358
 
359
359
  Type: `number`
360
360
 
361
361
  Deployment duration (in seconds). Can be used instead of started and finished.
362
362
 
363
- ### <a name="option-release-deploy-name"></a>`release.deploy.name`
363
+ ### `release.deploy.name`
364
364
 
365
365
  Type: `string`
366
366
 
367
367
  Human readable name for the deployment.
368
368
 
369
- ### <a name="option-release-deploy-url"></a>`release.deploy.url`
369
+ ### `release.deploy.url`
370
370
 
371
371
  Type: `string`
372
372
 
373
373
  URL that points to the deployment.
374
374
 
375
- ### <a name="option-release-cleanartifacts"></a>`release.cleanArtifacts`
375
+ ### `release.cleanArtifacts`
376
376
 
377
377
  Type: `boolean`
378
378
 
@@ -380,7 +380,7 @@ Remove all previously uploaded artifacts for this release on Sentry before the u
380
380
 
381
381
  Defaults to `false`.
382
382
 
383
- ### <a name="option-release-uploadlegacysourcemaps"></a>`release.uploadLegacySourcemaps`
383
+ ### `release.uploadLegacySourcemaps`
384
384
 
385
385
  Type: `string | IncludeEntry | Array<string | IncludeEntry>`
386
386
 
@@ -480,12 +480,12 @@ type IncludeEntry = {
480
480
 
481
481
 
482
482
 
483
- ### <a name="option-_experiments"></a>`_experiments`
483
+ ### `_experiments`
484
484
 
485
485
  Type: `string`
486
486
 
487
487
  Options that are considered experimental and subject to change. This option does not follow semantic versioning and may change in any release.
488
- ### <a name="option-_experiments-injectbuildinformation"></a>`_experiments.injectBuildInformation`
488
+ ### `_experiments.injectBuildInformation`
489
489
 
490
490
  Type: `boolean`
491
491
 
@@ -495,6 +495,10 @@ Defaults to `false`.
495
495
 
496
496
 
497
497
 
498
+ ### Configuration File
499
+
500
+ As an additional configuration method, the Sentry Rollup plugin will pick up environment variables configured inside a `.env.sentry-build-plugin` file located in the current working directory when building your app.
501
+
498
502
  ## More information
499
503
 
500
504
  - [Sentry Documentation](https://docs.sentry.io/quickstart/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/rollup-plugin",
3
- "version": "2.2.2",
3
+ "version": "2.4.0",
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": "2.2.2",
52
+ "@sentry/bundler-plugin-core": "2.4.0",
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": "2.2.2",
65
- "@sentry-internal/sentry-bundler-plugin-tsconfig": "2.2.2",
64
+ "@sentry-internal/eslint-config": "2.4.0",
65
+ "@sentry-internal/sentry-bundler-plugin-tsconfig": "2.4.0",
66
66
  "@swc/core": "^1.2.205",
67
67
  "@swc/jest": "^0.2.21",
68
68
  "@types/jest": "^28.1.3",
@@ -78,6 +78,6 @@
78
78
  "extends": "../../package.json"
79
79
  },
80
80
  "engines": {
81
- "node": ">= 10"
81
+ "node": ">= 14"
82
82
  }
83
83
  }