gemini-faildump
Advanced tools
Comparing version 1.0.3 to 2.0.0
# Changelog | ||
## 2.0.0 | ||
* major: Add supporting of imagePath instead of image field in fail data | ||
## 1.0.3 | ||
* Check for existing save image method | ||
## 1.0.2 | ||
* Use Base error type if it is impossible to save image | ||
## 1.0.0 | ||
* Initial release |
'use strict'; | ||
var q = require('q'), | ||
temp = require('temp'), | ||
tempFS = require('../temp-fs'), | ||
@@ -10,14 +10,9 @@ BaseError = require('./base-error'), | ||
temp.track(); | ||
exports.buildError = function(data, geminiConfig, options) { | ||
if (!data.image && !data.saveDiffTo) { | ||
exports.buildError = function (data, geminiConfig, options) { | ||
if (!data.imagePath && !data.saveDiffTo) { | ||
return q(new BaseError(data, geminiConfig)); | ||
} | ||
var tempDir = temp.mkdirSync('gemini-fails'), | ||
imagePath = temp.path({dir: tempDir, suffix: '.png'}), | ||
saveImg = data.image | ||
? data.image.save.bind(data.image) | ||
: data.saveDiffTo.bind(data); | ||
var imagePath = data.imagePath || tempFS.resolveImagePath(), | ||
saveImg = data.imagePath ? q : data.saveDiffTo.bind(data); | ||
@@ -24,0 +19,0 @@ return saveImg(imagePath) |
{ | ||
"name": "gemini-faildump", | ||
"version": "1.0.3", | ||
"version": "2.0.0", | ||
"description": "Fail information plugin", | ||
@@ -47,2 +47,3 @@ "keywords": [ | ||
"chai": "^3.4.1", | ||
"clear-require": "^1.0.1", | ||
"coveralls": "^2.11.4", | ||
@@ -49,0 +50,0 @@ "istanbul": "^0.3.20", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
8374
10
183
9
1