@sentry/webpack-plugin
Advanced tools
Comparing version 1.1.2 to 1.2.0
@@ -11,3 +11,3 @@ { | ||
"author": "Sentry", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"license": "MIT", | ||
@@ -17,13 +17,23 @@ "repository": "git@github.com:getsentry/sentry-webpack-plugin.git", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"precommit": "lint-staged" | ||
"engines": { | ||
"node": ">= 6.0.0" | ||
}, | ||
"dependencies": { | ||
"@sentry/cli": "^1.27.0" | ||
"@sentry/cli": "^1.28.0" | ||
}, | ||
"devDependencies": { | ||
"codecov": "^3.0.0", | ||
"husky": "^0.14.3", | ||
"lint-staged": "^4.2.3", | ||
"prettier": "^1.7.4" | ||
"jest": "^22.0.4", | ||
"lint-staged": "^6.0.0", | ||
"prettier": "^1.9.2" | ||
}, | ||
"scripts": { | ||
"precommit": "lint-staged && npm test", | ||
"test": "jest", | ||
"codecov": "codecov" | ||
}, | ||
"jest": { | ||
"collectCoverage": true | ||
}, | ||
"prettier": { | ||
@@ -30,0 +40,0 @@ "singleQuote": true, |
@@ -10,2 +10,3 @@ <p align="center"> | ||
[![Travis](https://img.shields.io/travis/getsentry/sentry-webpack-plugin.svg?maxAge=2592000)](https://travis-ci.org/getsentry/sentry-webpack-plugin) | ||
[![codecov](https://codecov.io/gh/getsentry/sentry-webpack-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/getsentry/sentry-webpack-plugin) | ||
[![npm version](https://img.shields.io/npm/v/@sentry/webpack-plugin.svg)](https://www.npmjs.com/package/@sentry/webpack-plugin) | ||
@@ -47,5 +48,2 @@ [![npm dm](https://img.shields.io/npm/dm/@sentry/webpack-plugin.svg)](https://www.npmjs.com/package/@sentry/webpack-plugin) | ||
new SentryCliPlugin({ | ||
release: function(hash) { | ||
return hash.slice(0, 5); | ||
}, | ||
include: '.', | ||
@@ -62,3 +60,3 @@ ignoreFile: '.sentrycliignore', | ||
* `release [required]` - unique name of a release, can be either a `string` or a `function` which will expose you a compilation hash as it's first argument, which is 20-char long string, unique for a given codebase | ||
* `release [optional]` - unique name of a release, can be either a `string` or a `function` which will expose you a compilation hash as it's first argument, which is 20-char long string, unique for a given codebase, defaults to `sentry-cli releases propose-version` command which should always return the correct version | ||
* `include [required]` - `string` or `array`, one or more paths that Sentry CLI should scan recursively for sources. It will upload all `.map` files and match associated `.js` files | ||
@@ -65,0 +63,0 @@ * `ignoreFile [optional]` - `string`, path to a file containing list of files/directories to ignore. Can point to `.gitignore` or anything with same format |
@@ -25,3 +25,2 @@ var SentryCli = require('@sentry/cli'); | ||
if (!release) return handleError('`release` option is required', cb); | ||
if (!include) return handleError('`include` option is required', cb); | ||
@@ -31,12 +30,19 @@ | ||
release = release(compilation.hash); | ||
options.release = release; | ||
} | ||
return sentryCli | ||
.createRelease(release) | ||
var versionPromise = Promise.resolve(release); | ||
if (typeof release === 'undefined') { | ||
versionPromise = sentryCli.releases.proposeVersion(); | ||
} | ||
return versionPromise | ||
.then(function(proposedVersion) { | ||
options.release = proposedVersion; | ||
return sentryCli.releases.new(options.release); | ||
}) | ||
.then(function() { | ||
return sentryCli.uploadSourceMaps(options); | ||
return sentryCli.releases.uploadSourceMaps(options.release, options); | ||
}) | ||
.then(function() { | ||
return sentryCli.finalizeRelease(release); | ||
return sentryCli.releases.finalize(options.release); | ||
}) | ||
@@ -43,0 +49,0 @@ .then(function() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117417
8
206
5
71
Updated@sentry/cli@^1.28.0