@sentry/webpack-plugin 1.19.1 → 1.20.1

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  - "Would I rather be feared or loved? Easy. Both. I want people to be afraid of how much they love me." — Michael Scott
4
4
 
5
+ ## 1.20.1
6
+
7
+ - fix: Update Webpack plugin to 1.75.1 to fix bug in Angular source maps (#439)
8
+ - fix: Update @sentry/cli to 1.75.0 to fix ansi-regex security warning (#427)
9
+ - build(deps): bump loader-utils from 1.1.0 to 1.4.1 in /example
10
+
11
+ ## 1.20.0
12
+
13
+ - build: Bump `@sentry/cli` version to `1.74.6` (#406)
14
+ - feat: Add a means to detect if the CLI binary exists (#402)
15
+ - feat: Add pipeline argument (#403)
16
+
5
17
  ## 1.19.1
6
18
 
7
19
  - fix(deps): Add `webpack-sources` dependency (#397)
package/README.md CHANGED
@@ -42,11 +42,11 @@ https://docs.sentry.io/cli/configuration.
42
42
  ### Usage
43
43
 
44
44
  ```js
45
- const SentryCliPlugin = require('@sentry/webpack-plugin');
45
+ const SentryWebpackPlugin = require('@sentry/webpack-plugin');
46
46
 
47
47
  const config = {
48
48
  plugins: [
49
- new SentryCliPlugin({
49
+ new SentryWebpackPlugin({
50
50
  include: '.',
51
51
  ignoreFile: '.sentrycliignore',
52
52
  ignore: ['node_modules', 'webpack.config.js'],
@@ -89,7 +89,7 @@ Also, check the [example](example) directory.
89
89
  | silent | `boolean` | optional | Suppresses all logs (useful for `--json` option). Defaults to `false`. |
90
90
  | cleanArtifacts | `boolean` | optional | Remove all the artifacts in the release before the upload. Defaults to `false`. |
91
91
  | errorHandler | `function(err: Error, invokeErr: function(): void, compilation: Compilation): void` | optional | Function to call a when CLI error occurs. Webpack compilation failure can be triggered by calling `invokeErr` callback. Can emit a warning rather than an error (allowing compilation to continue) by setting this to `(err, invokeErr, compilation) => { compilation.warnings.push('Sentry CLI Plugin: ' + err.message) }`. Defaults to `(err, invokeErr) => { invokeErr() }`. |
92
- | setCommits | `Object` | optional | Adds commits to Sentry. See [table below](#setCommits) for details. |
92
+ | setCommits | `Object` | optional | Adds commits to Sentry. See [table below](#optionssetcommits) for details. |
93
93
  | deploy | `Object` | optional | Creates a new release deployment in Sentry. See [table below](#deploy) for details. |
94
94
 
95
95
  #### <a name="include"></a>options.include:
@@ -110,11 +110,11 @@ Also, check the [example](example) directory.
110
110
  Example:
111
111
 
112
112
  ```js
113
- const SentryCliPlugin = require('@sentry/webpack-plugin');
113
+ const SentryWebpackPlugin = require('@sentry/webpack-plugin');
114
114
 
115
115
  const config = {
116
116
  plugins: [
117
- new SentryCliPlugin({
117
+ new SentryWebpackPlugin({
118
118
  include: [
119
119
  {
120
120
  paths: ['./packages'],
package/index.d.ts CHANGED
@@ -130,6 +130,7 @@ declare namespace SentryCliPlugin {
130
130
  declare class SentryCliPlugin implements WebpackPluginInstance {
131
131
  options: SentryCliPlugin.SentryCliPluginOptions;
132
132
  constructor(options: SentryCliPlugin.SentryCliPluginOptions);
133
+ static cliBinaryExists(): string;
133
134
  apply(compiler: Compiler): void;
134
135
  }
135
136
 
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "source-map"
9
9
  ],
10
10
  "author": "Sentry",
11
- "version": "1.19.1",
11
+ "version": "1.20.1",
12
12
  "license": "MIT",
13
13
  "repository": "git@github.com:getsentry/sentry-webpack-plugin.git",
14
14
  "homepage": "https://github.com/getsentry/sentry-webpack-plugin",
@@ -18,7 +18,7 @@
18
18
  "node": ">= 8"
19
19
  },
20
20
  "dependencies": {
21
- "@sentry/cli": "^1.74.4",
21
+ "@sentry/cli": "^1.75.1",
22
22
  "webpack-sources": "^2.0.0 || ^3.0.0"
23
23
  },
24
24
  "devDependencies": {
@@ -45,5 +45,9 @@
45
45
  "test:integration": "cd example && yarn && yarn test",
46
46
  "test:watch": "jest --watch --notify",
47
47
  "codecov": "codecov"
48
+ },
49
+ "volta": {
50
+ "node": "10.24.1",
51
+ "yarn": "1.22.19"
48
52
  }
49
53
  }
package/src/index.js CHANGED
@@ -1,11 +1,16 @@
1
1
  const SentryCli = require('@sentry/cli');
2
+ const fs = require('fs');
2
3
  const path = require('path');
3
4
  const util = require('util');
4
5
  const { RawSource } = require('webpack-sources');
6
+ const pjson = require('../package.json');
5
7
 
6
8
  const SENTRY_LOADER = path.resolve(__dirname, 'sentry.loader.js');
7
9
  const SENTRY_MODULE = path.resolve(__dirname, 'sentry-webpack.module.js');
8
10
 
11
+ // Set the User-Agent string.
12
+ process.env.SENTRY_PIPELINE = `webpack-plugin/${pjson.version}`;
13
+
9
14
  /**
10
15
  * Helper function that ensures an object key is defined. This mutates target!
11
16
  *
@@ -193,6 +198,10 @@ class SentryCliPlugin {
193
198
  return this.options.dryRun === true;
194
199
  }
195
200
 
201
+ static cliBinaryExists() {
202
+ return fs.existsSync(SentryCli.getPath());
203
+ }
204
+
196
205
  /** Creates a new Sentry CLI instance. */
197
206
  getSentryCli() {
198
207
  const cli = new SentryCli(this.options.configFile, {