@sentry/webpack-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/webpack-plugin --dev
29
29
  Using pnpm:
30
30
 
31
31
  ```bash
32
- pnpm install @sentry/webpack-plugin --dev
32
+ pnpm add @sentry/webpack-plugin --save-dev
33
33
  ```
34
34
 
35
35
  ## Example
@@ -84,6 +84,8 @@ module.exports = {
84
84
  - [`uploadLegacySourcemaps`](#releaseuploadlegacysourcemaps)
85
85
  - [`reactComponentAnnotation`](#reactcomponentannotation)
86
86
  - [`enabled`](#reactcomponentannotationenabled)
87
+ - [`moduleMetadata`](#modulemetadata)
88
+ - [`applicationKey`](#applicationkey)
87
89
  - [`_experiments`](#_experiments)
88
90
  - [`injectBuildInformation`](#_experimentsinjectbuildinformation)
89
91
 
@@ -382,6 +384,8 @@ Remove all previously uploaded artifacts for this release on Sentry before the u
382
384
 
383
385
  Defaults to `false`.
384
386
 
387
+ **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.
388
+
385
389
  ### `release.uploadLegacySourcemaps`
386
390
 
387
391
  Type: `string | IncludeEntry | Array<string | IncludeEntry>`
@@ -394,6 +398,8 @@ Each path can be given as a string or an object with more specific options.
394
398
  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.
395
399
  In situations where this leads to problems (e.g subresource integrity) you can use this option as a fallback.
396
400
 
401
+ 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.
402
+
397
403
  The `IncludeEntry` type looks as follows:
398
404
 
399
405
  ```ts
@@ -498,6 +504,26 @@ Type: `boolean`
498
504
 
499
505
  Whether the component name annotate plugin should be enabled or not.
500
506
 
507
+ ### `moduleMetadata`
508
+
509
+ Type: `Record<string, any> | (args: { org?: string; project?: string; release?: string; }) => Record<string, any>`
510
+
511
+ Metadata that should be associated with the built application.
512
+
513
+ 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.
514
+
515
+ Metadata can either be passed directly or alternatively a callback can be provided that will be called with the following parameters:
516
+
517
+ - `org`: The organization slug.
518
+ - `project`: The project slug.
519
+ - `release`: The release name.
520
+
521
+ ### `applicationKey`
522
+
523
+ Type: `string`
524
+
525
+ 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`.
526
+
501
527
  ### `_experiments`
502
528
 
503
529
  Type: `string`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/webpack-plugin",
3
- "version": "2.16.1",
3
+ "version": "2.18.0",
4
4
  "description": "Official Sentry Webpack 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/webpack-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
  "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-commonjs": "22.0.1",
61
- "@sentry-internal/eslint-config": "2.16.1",
62
- "@sentry-internal/sentry-bundler-plugin-tsconfig": "2.16.1",
61
+ "@sentry-internal/eslint-config": "2.18.0",
62
+ "@sentry-internal/sentry-bundler-plugin-tsconfig": "2.18.0",
63
63
  "@swc/core": "^1.2.205",
64
64
  "@swc/jest": "^0.2.21",
65
65
  "@types/jest": "^28.1.3",