@sentry/vite-plugin 2.16.1 → 2.18.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 +27 -1
  2. package/package.json +4 -4
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 add -D @sentry/vite-plugin
32
+ pnpm add @sentry/vite-plugin --save-dev
33
33
  ```
34
34
 
35
35
  ## Example
@@ -90,6 +90,8 @@ export default defineConfig({
90
90
  - [`uploadLegacySourcemaps`](#releaseuploadlegacysourcemaps)
91
91
  - [`reactComponentAnnotation`](#reactcomponentannotation)
92
92
  - [`enabled`](#reactcomponentannotationenabled)
93
+ - [`moduleMetadata`](#modulemetadata)
94
+ - [`applicationKey`](#applicationkey)
93
95
  - [`_experiments`](#_experiments)
94
96
  - [`injectBuildInformation`](#_experimentsinjectbuildinformation)
95
97
 
@@ -388,6 +390,8 @@ Remove all previously uploaded artifacts for this release on Sentry before the u
388
390
 
389
391
  Defaults to `false`.
390
392
 
393
+ **Deprecation Notice:** `cleanArtifacts` is deprecated and will does currently not do anything. Historically it was needed since uploading the same artifacts twice was not allowed. Nowadays, when uploading artifacts with the same name more than once to the same release on Sentry, Sentry will prefer the most recent artifact for source mapping.
394
+
391
395
  ### `release.uploadLegacySourcemaps`
392
396
 
393
397
  Type: `string | IncludeEntry | Array<string | IncludeEntry>`
@@ -400,6 +404,8 @@ Each path can be given as a string or an object with more specific options.
400
404
  The modern version of doing source maps upload is more robust and way easier to get working but has to inject a very small snippet of JavaScript into your output bundles.
401
405
  In situations where this leads to problems (e.g subresource integrity) you can use this option as a fallback.
402
406
 
407
+ Please note that this option will not interact with any settings provided in the `sourcemaps` option. Using `uploadLegacySourcemaps` is a completely separate upload mechanism we provide for backwards-compatibility.
408
+
403
409
  The `IncludeEntry` type looks as follows:
404
410
 
405
411
  ```ts
@@ -504,6 +510,26 @@ Type: `boolean`
504
510
 
505
511
  Whether the component name annotate plugin should be enabled or not.
506
512
 
513
+ ### `moduleMetadata`
514
+
515
+ Type: `Record<string, any> | (args: { org?: string; project?: string; release?: string; }) => Record<string, any>`
516
+
517
+ Metadata that should be associated with the built application.
518
+
519
+ The metadata is serialized and can be looked up at runtime from within the SDK (for example in the `beforeSend`, event processors, or the transport), allowing for custom event filtering logic or routing of events.
520
+
521
+ Metadata can either be passed directly or alternatively a callback can be provided that will be called with the following parameters:
522
+
523
+ - `org`: The organization slug.
524
+ - `project`: The project slug.
525
+ - `release`: The release name.
526
+
527
+ ### `applicationKey`
528
+
529
+ Type: `string`
530
+
531
+ A key which will embedded in all the bundled files. The SDK will be able to use the key to apply filtering rules, for example using the `thirdPartyErrorFilterIntegration`.
532
+
507
533
  ### `_experiments`
508
534
 
509
535
  Type: `string`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/vite-plugin",
3
- "version": "2.16.1",
3
+ "version": "2.18.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.16.1",
51
+ "@sentry/bundler-plugin-core": "2.18.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.16.1",
61
- "@sentry-internal/sentry-bundler-plugin-tsconfig": "2.16.1",
60
+ "@sentry-internal/eslint-config": "2.18.0",
61
+ "@sentry-internal/sentry-bundler-plugin-tsconfig": "2.18.0",
62
62
  "@swc/core": "^1.2.205",
63
63
  "@swc/jest": "^0.2.21",
64
64
  "@types/jest": "^28.1.3",