@sentry/esbuild-plugin 4.0.1 → 4.1.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 +62 -31
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -115,10 +115,13 @@ This value can also be specified via the `SENTRY_PROJECT` environment variable.
115
115
 
116
116
  Type: `string`
117
117
 
118
- The authentication token to use for all communication with Sentry. Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/.
118
+ The authentication token to use for all communication with Sentry.
119
+ Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/.
119
120
 
120
121
  This value can also be specified via the `SENTRY_AUTH_TOKEN` environment variable.
121
122
 
123
+ Check out the docs on organization tokens: https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
124
+
122
125
  ### `url`
123
126
 
124
127
  Type: `string`
@@ -133,19 +136,19 @@ Defaults to https://sentry.io/, which is the correct value for SaaS customers.
133
136
 
134
137
  Type: `Record<string, string>`
135
138
 
136
- Headers added to every outgoing network request.
139
+ Additional headers to send with every outgoing request to Sentry.
137
140
 
138
141
  ### `debug`
139
142
 
140
143
  Type: `boolean`
141
144
 
142
- Print useful debug information. Defaults to `false`.
145
+ Enable debug information logs during build-time. Enabling this will give you, for example, logs about source maps. Defaults to `false`.
143
146
 
144
147
  ### `silent`
145
148
 
146
149
  Type: `boolean`
147
150
 
148
- Suppresses all logs. Defaults to `false`.
151
+ Suppresses all build logs (all log levels, including errors). Defaults to `false`.
149
152
 
150
153
  ### `errorHandler`
151
154
 
@@ -168,9 +171,9 @@ errorHandler: (err) => {
168
171
 
169
172
  Type: `boolean`
170
173
 
171
- If set to true, internal plugin errors and performance data will be sent to Sentry.
174
+ 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.
172
175
 
173
- 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.
176
+ 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.
174
177
 
175
178
  Defaults to `true`.
176
179
 
@@ -184,16 +187,16 @@ Completely disables all functionality of the plugin. Defaults to `false`.
184
187
 
185
188
 
186
189
 
187
- Options for uploading source maps.
190
+ Options related to source maps upload and processing.
188
191
  ### `sourcemaps.assets`
189
192
 
190
193
  Type: `string | string[]`
191
194
 
192
- A glob or an array of globs that specifies the build artifacts that should be uploaded to Sentry.
195
+ A glob or an array of globs that specify the build artifacts and source maps that will be uploaded to Sentry.
193
196
 
194
- If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
197
+ The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
195
198
 
196
- The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
199
+ If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
197
200
 
198
201
  Use the `debug` option to print information about which files end up being uploaded.
199
202
 
@@ -203,12 +206,12 @@ Type: `string | string[]`
203
206
 
204
207
  A glob or an array of globs that specifies which build artifacts should not be uploaded to Sentry.
205
208
 
206
- Default: `[]`
207
-
208
- The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
209
+ The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
209
210
 
210
211
  Use the `debug` option to print information about which files end up being uploaded.
211
212
 
213
+ Default: `[]`
214
+
212
215
  ### `sourcemaps.rewriteSources`
213
216
 
214
217
  Type: `(source: string, map: any) => string`
@@ -246,7 +249,9 @@ Type: `string | string[] | Promise<string | string[]>`
246
249
 
247
250
  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.
248
251
 
249
- The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
252
+ 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).
253
+
254
+ The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
250
255
 
251
256
  Use the `debug` option to print information about which files end up being deleted.
252
257
 
@@ -254,7 +259,7 @@ Use the `debug` option to print information about which files end up being delet
254
259
 
255
260
  Type: `boolean`
256
261
 
257
- Disables all functionality related to sourcemaps.
262
+ If this flag is `true`, any functionality related to source maps will be disabled.
258
263
 
259
264
  Defaults to `false`.
260
265
 
@@ -273,9 +278,9 @@ Unique identifier for the release you want to create.
273
278
 
274
279
  This value can also be specified via the `SENTRY_RELEASE` environment variable.
275
280
 
276
- 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
+ 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).
277
282
 
278
- If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
283
+ If no `name` is provided and the plugin can't automatically detect one, no release will be created.
279
284
 
280
285
  ### `release.inject`
281
286
 
@@ -289,7 +294,9 @@ Defaults to `true`.
289
294
 
290
295
  Type: `boolean`
291
296
 
292
- Whether the plugin should create a release on Sentry during the build. 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
+ Whether the plugin should create a release on Sentry during the build.
298
+
299
+ 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)
293
300
 
294
301
  Defaults to `true`.
295
302
 
@@ -297,7 +304,7 @@ Defaults to `true`.
297
304
 
298
305
  Type: `boolean`
299
306
 
300
- Whether the Sentry release should be automatically finalized (meaning an end timestamp is added) after the build ends.
307
+ Whether to automatically finalize the release. The release is finalized by adding an end timestamp after the build ends.
301
308
 
302
309
  Defaults to `true`.
303
310
 
@@ -305,13 +312,15 @@ Defaults to `true`.
305
312
 
306
313
  Type: `string`
307
314
 
308
- Unique identifier for the distribution, used to further segment your release.
315
+ Unique distribution identifier for the release. Used to further segment the release.
316
+
317
+ Usually your build number.
309
318
 
310
319
  ### `release.vcsRemote`
311
320
 
312
321
  Type: `string`
313
322
 
314
- Version control system remote name.
323
+ Version control system (VCS) remote name.
315
324
 
316
325
  This value can also be specified via the `SENTRY_VSC_REMOTE` environment variable.
317
326
 
@@ -321,7 +330,11 @@ Defaults to 'origin'.
321
330
 
322
331
 
323
332
 
324
- Option to associate the created release with its commits in Sentry. Defaults to `{ auto: true }`. Set to `false` to disable.
333
+ Configuration for associating the release with its commits in Sentry.
334
+
335
+ Set to `false` to disable commit association.
336
+
337
+ Defaults to `{ auto: true }`.
325
338
  ### `release.setCommits.previousCommit`
326
339
 
327
340
  Type: `string`
@@ -376,7 +389,7 @@ Required if the `auto` option is not set to `true`.
376
389
 
377
390
 
378
391
 
379
- Adds deployment information to the release in Sentry.
392
+ Configuration for adding deployment information to the release in Sentry.
380
393
  ### `release.deploy.env`
381
394
 
382
395
  Type: `string`
@@ -529,52 +542,70 @@ type IncludeEntry = {
529
542
 
530
543
 
531
544
 
532
- Options related to bundle size optimizations. These options will allow you to optimize and reduce the bundle size of the Sentry SDK.
545
+ Options for bundle size optimizations by excluding certain features.
533
546
  ### `bundleSizeOptimizations.excludeDebugStatements`
534
547
 
535
548
  Type: `boolean`
536
549
 
537
- If set to `true`, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK.
538
- Note that the success of this depends on tree shaking being enabled in your build tooling.
550
+ Exclude debug statements from the bundle, thus disabling features like the SDK's `debug` option.
551
+
552
+ If set to `true`, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK during the build.
553
+ Note that the success of this depends on tree-shaking being enabled in your build tooling.
539
554
 
540
- Setting this option to `true` will disable features like the SDK's `debug` option.
555
+ Defaults to `false`.
541
556
 
542
557
  ### `bundleSizeOptimizations.excludeTracing`
543
558
 
544
559
  Type: `boolean`
545
560
 
561
+ Exclude tracing functionality from the bundle, thus disabling features like performance monitoring.
562
+
546
563
  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.
547
- Note that the success of this depends on tree shaking being enabled in your build tooling.
564
+ Note that the success of this depends on tree-shaking being enabled in your build tooling.
548
565
 
549
566
  **Notice:** Do not enable this when you're using any performance monitoring-related SDK features (e.g. `Sentry.startTransaction()`).
550
567
 
568
+ Defaults to `false`.
569
+
551
570
  ### `bundleSizeOptimizations.excludeReplayShadowDom`
552
571
 
553
572
  Type: `boolean`
554
573
 
574
+ Exclude Replay Shadow DOM functionality from the bundle.
575
+
555
576
  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.
556
- Note that the success of this depends on tree shaking being enabled in your build tooling.
577
+ Note that the success of this depends on tree-shaking being enabled in your build tooling.
557
578
 
558
579
  This option is safe to be used when you do not want to capture any Shadow DOM activity via Sentry Session Replay.
559
580
 
581
+ Defaults to `false`.
582
+
560
583
  ### `bundleSizeOptimizations.excludeReplayIframe`
561
584
 
562
585
  Type: `boolean`
563
586
 
587
+ Exclude Replay iFrame functionality from the bundle.
588
+
564
589
  If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay `iframe` recording functionality.
565
- Note that the success of this depends on tree shaking being enabled in your build tooling.
590
+ Note that the success of this depends on tree-shaking being enabled in your build tooling.
566
591
 
567
592
  You can safely do this when you do not want to capture any `iframe` activity via Sentry Session Replay.
568
593
 
594
+ Defaults to `false`.
595
+
569
596
  ### `bundleSizeOptimizations.excludeReplayWorker`
570
597
 
571
598
  Type: `boolean`
572
599
 
600
+ Exclude Replay worker functionality from the bundle.
601
+
573
602
  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.
574
- Note that the success of this depends on tree shaking being enabled in your build tooling.
603
+ Note that the success of this depends on tree-shaking being enabled in your build tooling.
575
604
 
576
605
  **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.
577
606
 
607
+ Defaults to `false`.
608
+
578
609
 
579
610
  ### `moduleMetadata`
580
611
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/esbuild-plugin",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "description": "Official Sentry esbuild 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/esbuild-plugin",
@@ -48,7 +48,7 @@
48
48
  "prepack": "ts-node ./src/prepack.ts"
49
49
  },
50
50
  "dependencies": {
51
- "@sentry/bundler-plugin-core": "4.0.1",
51
+ "@sentry/bundler-plugin-core": "4.1.0",
52
52
  "unplugin": "1.0.1",
53
53
  "uuid": "^9.0.0"
54
54
  },
@@ -58,8 +58,8 @@
58
58
  "@babel/preset-typescript": "7.17.12",
59
59
  "@rollup/plugin-babel": "5.3.1",
60
60
  "@rollup/plugin-node-resolve": "13.3.0",
61
- "@sentry-internal/eslint-config": "4.0.1",
62
- "@sentry-internal/sentry-bundler-plugin-tsconfig": "4.0.1",
61
+ "@sentry-internal/eslint-config": "4.1.0",
62
+ "@sentry-internal/sentry-bundler-plugin-tsconfig": "4.1.0",
63
63
  "@swc/core": "^1.2.205",
64
64
  "@swc/jest": "^0.2.21",
65
65
  "@types/jest": "^28.1.3",