Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gemini-faildump

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gemini-faildump - npm Package Compare versions

Comparing version 1.0.3 to 2.0.0

lib/temp-fs.js

12

CHANGELOG.md
# 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

15

lib/errors/error-factory.js
'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",

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