@sentry/vite-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 +75 -71
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -29,7 +29,7 @@ yarn add @sentry/vite-plugin --dev
29
29
  Using pnpm:
30
30
 
31
31
  ```bash
32
- pnpm install @sentry/vite-plugin --dev
32
+ pnpm add -D @sentry/vite-plugin
33
33
  ```
34
34
 
35
35
  ## Example
@@ -63,42 +63,42 @@ export default defineConfig({
63
63
 
64
64
  ## Options
65
65
 
66
- - [`org`](#option-org)
67
- - [`project`](#option-project)
68
- - [`authToken`](#option-authtoken)
69
- - [`url`](#option-url)
70
- - [`headers`](#option-headers)
71
- - [`debug`](#option-debug)
72
- - [`silent`](#option-silent)
73
- - [`errorHandler`](#option-errorhandler)
74
- - [`telemetry`](#option-telemetry)
75
- - [`disable`](#option-disable)
76
- - [`sourcemaps`](#option-sourcemaps)
77
- - [`assets`](#option-sourcemaps-assets)
78
- - [`ignore`](#option-sourcemaps-ignore)
79
- - [`rewriteSources`](#option-sourcemaps-rewritesources)
80
- - [`deleteFilesAfterUpload`](#option-sourcemaps-deletefilesafterupload)
81
- - [`release`](#option-release)
82
- - [`name`](#option-release-name)
83
- - [`inject`](#option-release-inject)
84
- - [`create`](#option-release-create)
85
- - [`finalize`](#option-release-finalize)
86
- - [`dist`](#option-release-dist)
87
- - [`vcsRemote`](#option-release-vcsremote)
88
- - [`setCommits`](#option-release-setcommits)
89
- - [`deploy`](#option-release-deploy)
90
- - [`cleanArtifacts`](#option-release-cleanartifacts)
91
- - [`uploadLegacySourcemaps`](#option-release-uploadlegacysourcemaps)
92
- - [`_experiments`](#option-_experiments)
93
- - [`injectBuildInformation`](#option-_experiments-injectbuildinformation)
94
-
95
- ### <a name="option-org"></a>`org`
66
+ - [`org`](#org)
67
+ - [`project`](#project)
68
+ - [`authToken`](#authtoken)
69
+ - [`url`](#url)
70
+ - [`headers`](#headers)
71
+ - [`debug`](#debug)
72
+ - [`silent`](#silent)
73
+ - [`errorHandler`](#errorhandler)
74
+ - [`telemetry`](#telemetry)
75
+ - [`disable`](#disable)
76
+ - [`sourcemaps`](#sourcemaps)
77
+ - [`assets`](#sourcemapsassets)
78
+ - [`ignore`](#sourcemapsignore)
79
+ - [`rewriteSources`](#sourcemapsrewritesources)
80
+ - [`filesToDeleteAfterUpload`](#sourcemapsfilestodeleteafterupload)
81
+ - [`release`](#release)
82
+ - [`name`](#releasename)
83
+ - [`inject`](#releaseinject)
84
+ - [`create`](#releasecreate)
85
+ - [`finalize`](#releasefinalize)
86
+ - [`dist`](#releasedist)
87
+ - [`vcsRemote`](#releasevcsremote)
88
+ - [`setCommits`](#releasesetcommits)
89
+ - [`deploy`](#releasedeploy)
90
+ - [`cleanArtifacts`](#releasecleanartifacts)
91
+ - [`uploadLegacySourcemaps`](#releaseuploadlegacysourcemaps)
92
+ - [`_experiments`](#_experiments)
93
+ - [`injectBuildInformation`](#_experimentsinjectbuildinformation)
94
+
95
+ ### `org`
96
96
 
97
97
  Type: `string`
98
98
 
99
99
  The slug of the Sentry organization associated with the app.
100
100
 
101
- ### <a name="option-project"></a>`project`
101
+ ### `project`
102
102
 
103
103
 
104
104
 
@@ -106,7 +106,7 @@ The slug of the Sentry project associated with the app.
106
106
 
107
107
  This value can also be specified via the `SENTRY_PROJECT` environment variable.
108
108
 
109
- ### <a name="option-authtoken"></a>`authToken`
109
+ ### `authToken`
110
110
 
111
111
  Type: `string`
112
112
 
@@ -114,7 +114,7 @@ The authentication token to use for all communication with Sentry. Can be obtain
114
114
 
115
115
  This value can also be specified via the `SENTRY_AUTH_TOKEN` environment variable.
116
116
 
117
- ### <a name="option-url"></a>`url`
117
+ ### `url`
118
118
 
119
119
  Type: `string`
120
120
 
@@ -124,29 +124,29 @@ This value can also be set via the SENTRY_URL environment variable.
124
124
 
125
125
  Defaults to https://sentry.io/, which is the correct value for SaaS customers.
126
126
 
127
- ### <a name="option-headers"></a>`headers`
127
+ ### `headers`
128
128
 
129
129
  Type: `Record<string, string>`
130
130
 
131
131
  Headers added to every outgoing network request.
132
132
 
133
- ### <a name="option-debug"></a>`debug`
133
+ ### `debug`
134
134
 
135
135
  Type: `boolean`
136
136
 
137
137
  Print useful debug information. Defaults to `false`.
138
138
 
139
- ### <a name="option-silent"></a>`silent`
139
+ ### `silent`
140
140
 
141
141
  Type: `boolean`
142
142
 
143
143
  Suppresses all logs. Defaults to `false`.
144
144
 
145
- ### <a name="option-errorhandler"></a>`errorHandler`
145
+ ### `errorHandler`
146
146
 
147
147
  Type: `(err: Error) => void`
148
148
 
149
- When an error occurs during rlease creation or sourcemaps upload, the plugin will call this function.
149
+ When an error occurs during release creation or sourcemaps upload, the plugin will call this function.
150
150
 
151
151
  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.
152
152
 
@@ -159,7 +159,7 @@ errorHandler: (err) => {
159
159
  ```
160
160
 
161
161
 
162
- ### <a name="option-telemetry"></a>`telemetry`
162
+ ### `telemetry`
163
163
 
164
164
  Type: `boolean`
165
165
 
@@ -169,18 +169,18 @@ At Sentry we like to use Sentry ourselves to deliver faster and more stable prod
169
169
 
170
170
  Defaults to `true`.
171
171
 
172
- ### <a name="option-disable"></a>`disable`
172
+ ### `disable`
173
173
 
174
174
  Type: `boolean`
175
175
 
176
176
  Completely disables all functionality of the plugin. Defaults to `false`.
177
177
 
178
- ### <a name="option-sourcemaps"></a>`sourcemaps`
178
+ ### `sourcemaps`
179
179
 
180
180
 
181
181
 
182
182
  Options for source maps uploading. Leave this option undefined if you do not want to upload source maps to Sentry.
183
- ### <a name="option-sourcemaps-assets"></a>`sourcemaps.assets`
183
+ ### `sourcemaps.assets`
184
184
 
185
185
  Type: `string | string[]`
186
186
 
@@ -192,7 +192,7 @@ The globbing patterns follow the implementation of the `glob` package. (https://
192
192
 
193
193
  Use the `debug` option to print information about which files end up being uploaded.
194
194
 
195
- ### <a name="option-sourcemaps-ignore"></a>`sourcemaps.ignore`
195
+ ### `sourcemaps.ignore`
196
196
 
197
197
  Type: `string | string[]`
198
198
 
@@ -204,7 +204,7 @@ The globbing patterns follow the implementation of the `glob` package. (https://
204
204
 
205
205
  Use the `debug` option to print information about which files end up being uploaded.
206
206
 
207
- ### <a name="option-sourcemaps-rewritesources"></a>`sourcemaps.rewriteSources`
207
+ ### `sourcemaps.rewriteSources`
208
208
 
209
209
  Type: `(source: string, map: any) => string`
210
210
 
@@ -212,7 +212,7 @@ Hook to rewrite the `sources` field inside the source map before being uploaded
212
212
 
213
213
  Defaults to making all sources relative to `process.cwd()` while building.
214
214
 
215
- ### <a name="option-sourcemaps-deletefilesafterupload"></a>`sourcemaps.deleteFilesAfterUpload`
215
+ ### `sourcemaps.filesToDeleteAfterUpload`
216
216
 
217
217
  Type: `string | string[]`
218
218
 
@@ -222,14 +222,14 @@ The globbing patterns follow the implementation of the `glob` package. (https://
222
222
 
223
223
  Use the `debug` option to print information about which files end up being deleted.
224
224
 
225
- ### <a name="option-release"></a>`release`
225
+ ### `release`
226
226
 
227
227
 
228
228
 
229
229
  Options related to managing the Sentry releases for a build.
230
230
 
231
231
  More info: https://docs.sentry.io/product/releases/
232
- ### <a name="option-release-name"></a>`release.name`
232
+ ### `release.name`
233
233
 
234
234
  Type: `string`
235
235
 
@@ -241,7 +241,7 @@ Defaults to automatically detecting a value for your environment. This includes
241
241
 
242
242
  If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
243
243
 
244
- ### <a name="option-release-inject"></a>`release.inject`
244
+ ### `release.inject`
245
245
 
246
246
  Type: `boolean`
247
247
 
@@ -249,7 +249,7 @@ Whether the plugin should inject release information into the build for the SDK
249
249
 
250
250
  Defaults to `true`.
251
251
 
252
- ### <a name="option-release-create"></a>`release.create`
252
+ ### `release.create`
253
253
 
254
254
  Type: `boolean`
255
255
 
@@ -257,7 +257,7 @@ Whether the plugin should create a release on Sentry during the build. Note that
257
257
 
258
258
  Defaults to `true`.
259
259
 
260
- ### <a name="option-release-finalize"></a>`release.finalize`
260
+ ### `release.finalize`
261
261
 
262
262
  Type: `boolean`
263
263
 
@@ -265,13 +265,13 @@ Whether the Sentry release should be automatically finalized (meaning an end tim
265
265
 
266
266
  Defaults to `true`.
267
267
 
268
- ### <a name="option-release-dist"></a>`release.dist`
268
+ ### `release.dist`
269
269
 
270
270
  Type: `string`
271
271
 
272
272
  Unique identifier for the distribution, used to further segment your release.
273
273
 
274
- ### <a name="option-release-vcsremote"></a>`release.vcsRemote`
274
+ ### `release.vcsRemote`
275
275
 
276
276
  Type: `string`
277
277
 
@@ -281,12 +281,12 @@ This value can also be specified via the `SENTRY_VSC_REMOTE` environment variabl
281
281
 
282
282
  Defaults to 'origin'.
283
283
 
284
- ### <a name="option-release-setcommits"></a>`release.setCommits`
284
+ ### `release.setCommits`
285
285
 
286
286
 
287
287
 
288
288
  Option to associate the created release with its commits in Sentry.
289
- ### <a name="option-release-setcommits-previouscommit"></a>`release.setCommits.previousCommit`
289
+ ### `release.setCommits.previousCommit`
290
290
 
291
291
  Type: `string`
292
292
 
@@ -296,7 +296,7 @@ Defaults to the last commit of the previous release in Sentry.
296
296
 
297
297
  If there was no previous release, the last 10 commits will be used.
298
298
 
299
- ### <a name="option-release-setcommits-ignoremissing"></a>`release.setCommits.ignoreMissing`
299
+ ### `release.setCommits.ignoreMissing`
300
300
 
301
301
  Type: `boolean`
302
302
 
@@ -304,7 +304,7 @@ If the flag is to `true` and the previous release commit was not found in the re
304
304
 
305
305
  Defaults to `false`.
306
306
 
307
- ### <a name="option-release-setcommits-ignoreempty"></a>`release.setCommits.ignoreEmpty`
307
+ ### `release.setCommits.ignoreEmpty`
308
308
 
309
309
  Type: `boolean`
310
310
 
@@ -312,7 +312,7 @@ If this flag is set, the setCommits step will not fail and just exit silently if
312
312
 
313
313
  Defaults to `false`.
314
314
 
315
- ### <a name="option-release-setcommits-auto"></a>`release.setCommits.auto`
315
+ ### `release.setCommits.auto`
316
316
 
317
317
  Type: `boolean`
318
318
 
@@ -320,7 +320,7 @@ Automatically sets `commit` and `previousCommit`. Sets `commit` to `HEAD` and `p
320
320
 
321
321
  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`.
322
322
 
323
- ### <a name="option-release-setcommits-repo"></a>`release.setCommits.repo`
323
+ ### `release.setCommits.repo`
324
324
 
325
325
  Type: `string`
326
326
 
@@ -328,7 +328,7 @@ The full repo name as defined in Sentry.
328
328
 
329
329
  Required if the `auto` option is not set to `true`.
330
330
 
331
- ### <a name="option-release-setcommits-commit"></a>`release.setCommits.commit`
331
+ ### `release.setCommits.commit`
332
332
 
333
333
  Type: `string`
334
334
 
@@ -336,48 +336,48 @@ The current (last) commit in the release.
336
336
 
337
337
  Required if the `auto` option is not set to `true`.
338
338
 
339
- ### <a name="option-release-deploy"></a>`release.deploy`
339
+ ### `release.deploy`
340
340
 
341
341
 
342
342
 
343
343
  Adds deployment information to the release in Sentry.
344
- ### <a name="option-release-deploy-env"></a>`release.deploy.env`
344
+ ### `release.deploy.env`
345
345
 
346
346
  Type: `string`
347
347
 
348
348
  Environment for this release. Values that make sense here would be `production` or `staging`.
349
349
 
350
- ### <a name="option-release-deploy-started"></a>`release.deploy.started`
350
+ ### `release.deploy.started`
351
351
 
352
352
  Type: `number | string`
353
353
 
354
354
  Deployment start time in Unix timestamp (in seconds) or ISO 8601 format.
355
355
 
356
- ### <a name="option-release-deploy-finished"></a>`release.deploy.finished`
356
+ ### `release.deploy.finished`
357
357
 
358
358
  Type: `number | string`
359
359
 
360
360
  Deployment finish time in Unix timestamp (in seconds) or ISO 8601 format.
361
361
 
362
- ### <a name="option-release-deploy-time"></a>`release.deploy.time`
362
+ ### `release.deploy.time`
363
363
 
364
364
  Type: `number`
365
365
 
366
366
  Deployment duration (in seconds). Can be used instead of started and finished.
367
367
 
368
- ### <a name="option-release-deploy-name"></a>`release.deploy.name`
368
+ ### `release.deploy.name`
369
369
 
370
370
  Type: `string`
371
371
 
372
372
  Human readable name for the deployment.
373
373
 
374
- ### <a name="option-release-deploy-url"></a>`release.deploy.url`
374
+ ### `release.deploy.url`
375
375
 
376
376
  Type: `string`
377
377
 
378
378
  URL that points to the deployment.
379
379
 
380
- ### <a name="option-release-cleanartifacts"></a>`release.cleanArtifacts`
380
+ ### `release.cleanArtifacts`
381
381
 
382
382
  Type: `boolean`
383
383
 
@@ -385,7 +385,7 @@ Remove all previously uploaded artifacts for this release on Sentry before the u
385
385
 
386
386
  Defaults to `false`.
387
387
 
388
- ### <a name="option-release-uploadlegacysourcemaps"></a>`release.uploadLegacySourcemaps`
388
+ ### `release.uploadLegacySourcemaps`
389
389
 
390
390
  Type: `string | IncludeEntry | Array<string | IncludeEntry>`
391
391
 
@@ -485,12 +485,12 @@ type IncludeEntry = {
485
485
 
486
486
 
487
487
 
488
- ### <a name="option-_experiments"></a>`_experiments`
488
+ ### `_experiments`
489
489
 
490
490
  Type: `string`
491
491
 
492
492
  Options that are considered experimental and subject to change. This option does not follow semantic versioning and may change in any release.
493
- ### <a name="option-_experiments-injectbuildinformation"></a>`_experiments.injectBuildInformation`
493
+ ### `_experiments.injectBuildInformation`
494
494
 
495
495
  Type: `boolean`
496
496
 
@@ -500,6 +500,10 @@ Defaults to `false`.
500
500
 
501
501
 
502
502
 
503
+ ### Configuration File
504
+
505
+ As an additional configuration method, the Sentry Vite plugin will pick up environment variables configured inside a `.env.sentry-build-plugin` file located in the current working directory when building your app.
506
+
503
507
  ## More information
504
508
 
505
509
  - [Sentry Documentation](https://docs.sentry.io/quickstart/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/vite-plugin",
3
- "version": "2.2.2",
3
+ "version": "2.4.0",
4
4
  "description": "Official Sentry Vite 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/vite-plugin",
@@ -48,7 +48,7 @@
48
48
  "prepack": "ts-node ./src/prepack.ts"
49
49
  },
50
50
  "dependencies": {
51
- "@sentry/bundler-plugin-core": "2.2.2",
51
+ "@sentry/bundler-plugin-core": "2.4.0",
52
52
  "unplugin": "1.0.1"
53
53
  },
54
54
  "devDependencies": {
@@ -57,8 +57,8 @@
57
57
  "@babel/preset-typescript": "7.17.12",
58
58
  "@rollup/plugin-babel": "5.3.1",
59
59
  "@rollup/plugin-node-resolve": "13.3.0",
60
- "@sentry-internal/eslint-config": "2.2.2",
61
- "@sentry-internal/sentry-bundler-plugin-tsconfig": "2.2.2",
60
+ "@sentry-internal/eslint-config": "2.4.0",
61
+ "@sentry-internal/sentry-bundler-plugin-tsconfig": "2.4.0",
62
62
  "@swc/core": "^1.2.205",
63
63
  "@swc/jest": "^0.2.21",
64
64
  "@types/jest": "^28.1.3",
@@ -74,6 +74,6 @@
74
74
  "extends": "../../package.json"
75
75
  },
76
76
  "engines": {
77
- "node": ">= 10"
77
+ "node": ">= 14"
78
78
  }
79
79
  }