Socket
Socket
Sign inDemoInstall

@sentry/webpack-plugin

Package Overview
Dependencies
2
Maintainers
12
Versions
91
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.1 to 1.9.0

.snyk

6

CHANGELOG.md
# Changelog
## v1.9.0
- feat: Add `setCommits` options (#139)
- chore: Add `TypeScript` definition file (#137)
- meta: Bump sentry-cli to `1.48.0`
## v1.8.1

@@ -4,0 +10,0 @@

16

package.json

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

"author": "Sentry",
"version": "1.8.1",
"version": "1.9.0",
"license": "MIT",

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

"main": "src/index.js",
"types": "index.d.ts",
"engines": {

@@ -22,3 +23,4 @@ "node": ">= 6.0.0"

"dependencies": {
"@sentry/cli": "^1.47.1"
"@sentry/cli": "^1.48.0",
"snyk": "^1.231.0"
},

@@ -34,3 +36,4 @@ "devDependencies": {

"prettier": "^1.18.2",
"prettier-check": "^2.0.0"
"prettier-check": "^2.0.0",
"webpack": "^4.39.3"
},

@@ -47,4 +50,7 @@ "scripts": {

"test:watch": "jest --watch --notify",
"codecov": "codecov"
}
"codecov": "codecov",
"snyk-protect": "snyk protect",
"prepublish": "npm run snyk-protect"
},
"snyk": true
}

@@ -112,3 +112,9 @@ <p align="center">

set-commits options:
* `commit [optional]` - `string`, the current (last) commit in the release
* `previousCommit [optional]` - `string`, the commit before the beginning of this release (in other words, the last commit of the previous release). If omitted, this will default to the last commit of the previous release in Sentry. If there was no previous release, the last 10 commits will be used
* `repo [optional]` - `string`, the full repo name as defined in Sentry
* `auto [optional]` - `boolean`, automatically choose the associated commit (uses the current commit). Overrides other options
You can find more information about these options in our official docs:
https://docs.sentry.io/cli/releases/#sentry-cli-sourcemaps

@@ -12,2 +12,3 @@ /*eslint-disable*/

proposeVersion: jest.fn(() => Promise.resolve()),
setCommits: jest.fn(() => Promise.resolve()),
},

@@ -230,2 +231,45 @@ };

});
test('test setCommits with commits range', done => {
const sentryCliPlugin = new SentryCliPlugin({
include: 'src',
release: '42',
commit: '4d8656426ca13eab19581499da93408e30fdd9ef',
previousCommit: 'b6b0e11e74fd55836d3299cef88531b2a34c2514',
repo: 'group / repo',
// auto,
});
sentryCliPlugin.apply(compiler);
setImmediate(() => {
expect(mockCli.releases.setCommits).toBeCalledWith('42', {
repo: 'group / repo',
commit: '4d8656426ca13eab19581499da93408e30fdd9ef',
previousCommit: 'b6b0e11e74fd55836d3299cef88531b2a34c2514',
});
expect(compilationDoneCallback).toBeCalled();
done();
});
});
test('test setCommits with auto option', done => {
const sentryCliPlugin = new SentryCliPlugin({
include: 'src',
release: '42',
repo: 'group / repo',
auto: true,
});
sentryCliPlugin.apply(compiler);
setImmediate(() => {
expect(mockCli.releases.setCommits).toBeCalledWith('42', {
repo: 'group / repo',
auto: true,
});
expect(compilationDoneCallback).toBeCalled();
done();
});
});
});

@@ -232,0 +276,0 @@

@@ -154,2 +154,6 @@ const SentryCli = require('@sentry/cli');

},
setCommits: (release, config) => {
this.outputDebug('Calling set-commits with:\n', config);
return Promise.resolve(release, config);
},
},

@@ -321,2 +325,14 @@ };

.then(() => this.cli.releases.uploadSourceMaps(release, this.options))
.then(() => {
const { commit, previousCommit, repo, auto } = this.options;
if (repo && (commit || auto)) {
this.cli.releases.setCommits(release, {
commit,
previousCommit,
repo,
auto,
});
}
})
.then(() => this.cli.releases.finalize(release))

@@ -323,0 +339,0 @@ .catch(err =>

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc