Socket
Socket
Sign inDemoInstall

@sentry/webpack-plugin

Package Overview
Dependencies
Maintainers
9
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/webpack-plugin - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

package.json

@@ -11,3 +11,3 @@ {

"author": "Sentry",
"version": "1.1.0",
"version": "1.1.1",
"license": "MIT",

@@ -21,3 +21,3 @@ "repository": "git@github.com:getsentry/sentry-webpack-plugin.git",

"dependencies": {
"@sentry/cli": "^1.26.0"
"@sentry/cli": "^1.27.0"
},

@@ -24,0 +24,0 @@ "devDependencies": {

@@ -18,3 +18,2 @@ <p align="center">

A webpack plugin acting as an interface to [Sentry CLI](https://docs.sentry.io/learn/cli/).

@@ -43,17 +42,17 @@

```js
const SentryCliPlugin = require('@sentry/webpack-plugin')
const SentryCliPlugin = require('@sentry/webpack-plugin');
const config = {
plugins: [
new SentryCliPlugin({
release: function (hash) {
return hash.slice(0, 5)
},
include: '.',
ignoreFile: '.sentrycliignore',
ignore: ['node_modules', 'webpack.config.js'],
configFile: 'sentry.properties'
})
]
}
plugins: [
new SentryCliPlugin({
release: function(hash) {
return hash.slice(0, 5);
},
include: '.',
ignoreFile: '.sentrycliignore',
ignore: ['node_modules', 'webpack.config.js'],
configFile: 'sentry.properties'
})
]
};
```

@@ -68,1 +67,8 @@

* `configFile [optional]` - `string`, path to Sentry CLI config properties, as described in https://docs.sentry.io/learn/cli/configuration/#properties-files. By default, the config file is looked for upwards from the current path and defaults from `~/.sentryclirc` are always loaded
* `ext [optional]` - `string`, adds an additional file extension to be considered. By default the following file extensions are processed: js, map, jsbundle and bundle.
* `urlPrefix [optional]` - `string`, this sets an URL prefix in front of all files. This defaults to ~/ but you might want to set this to the full URL. This is also useful if your files are stored in a sub folder. eg: --url-prefix '~/static/js'
* `validate [optional]` - `boolean`, this attempts sourcemap validation before upload when rewriting is not enabled. It will spot a variety of issues with source maps and cancel the upload if any are found. This is not the default as this can cause false positives.
* `stripPrefix | stripCommonPrefix [optional]` - `string`, when paired with `--rewrite` this will chop-off a prefix from uploaded files. For instance you can use this to remove a path that is build machine specific.
* `noSourceMapReference [optional]` - `boolean`, this prevents the automatic detection of sourcemap references.
You can find more information about these options in our official docs: https://docs.sentry.io/learn/cli/releases/#upload-source-maps
var SentryCli = require('@sentry/cli');
function SentryCliPlugin(options) {
options = options || {};
this.release = options.release;
this.include =
function SentryCliPlugin(options = {}) {
this.options = options;
this.options.release = options.release;
this.options.include =
options.include &&
(Array.isArray(options.include) ? options.include : [options.include]);
this.configFile = options.configFile;
this.ignoreFile = options.ignoreFile;
this.ignore =
this.options.ignore =
options.ignore && (Array.isArray(options.ignore) ? options.ignore : [options.ignore]);

@@ -16,7 +14,5 @@ }

SentryCliPlugin.prototype.apply = function(compiler) {
var sentryCli = new SentryCli(this.configFile);
var release = this.release;
var include = this.include;
var ignoreFile = this.ignoreFile;
var ignore = this.ignore;
var sentryCli = new SentryCli(this.options.configFile);
var release = this.options.release;
var include = this.options.include;

@@ -39,8 +35,3 @@ compiler.plugin('after-emit', function(compilation, cb) {

.then(function() {
return sentryCli.uploadSourceMaps({
release: release,
include: include,
ignoreFile: ignoreFile,
ignore: ignore
});
return sentryCli.uploadSourceMaps(this.options);
})

@@ -47,0 +38,0 @@ .then(function() {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc