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

gulp-notify

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-notify - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

14

lib/extra_api.js

@@ -1,3 +0,3 @@

var through = require("through2");
var gutil = require("gulp-util");
var fancyLog = require('fancy-log');
var colors = require('ansi-colors');
var notifier = require("node-notifier");

@@ -12,3 +12,3 @@ var report = require("./report");

// Default logger
var fnLog = gutil.log;
var fnLog = fancyLog;

@@ -20,6 +20,6 @@ var logError = module.exports.logError = function (options, isError) {

color = isError ? "red" : "green";
if (!gutil.colors[color]) return;
fnLog(gutil.colors.cyan('gulp-notify') + ':',
'[' + gutil.colors.blue(options.title) + ']',
gutil.colors[color].call(gutil.colors, options.message)
if (!colors[color]) return;
fnLog(colors.cyan('gulp-notify') + ':',
'[' + colors.blue(options.title) + ']',
colors[color].call(colors, options.message)
);

@@ -26,0 +26,0 @@ };

var template = require("lodash.template");
var gutil = require("gulp-util");
var PluginError = require('plugin-error');
var api = require("./extra_api");

@@ -23,3 +23,3 @@ var extend = require("node.extend");

callback = callback || function () {};
if (!reporter) return callback(new gutil.PluginError("gulp-notify", "No reporter specified."));
if (!reporter) return callback(new PluginError("gulp-notify", "No reporter specified."));

@@ -34,7 +34,7 @@ // Try/catch the only way to go to ensure catching all errors? Domains?

reporter(options, function (err) {
if (err) return callback(new gutil.PluginError("gulp-notify", err));
if (err) return callback(new PluginError("gulp-notify", err));
return callback();
});
} catch (err) {
return callback(new gutil.PluginError("gulp-notify", err));
return callback(new PluginError("gulp-notify", err));
}

@@ -71,7 +71,7 @@ };

return extend(defaults.regular, outputData, {
title: gutil.template(title, {
title: template(title)({
file: object,
options: templateOptions
}),
message: gutil.template(message, {
message: template(message)({
file: object,

@@ -111,3 +111,3 @@ options: templateOptions

}
if (typeof outputData.subtitle === "function") {

@@ -118,3 +118,3 @@ subtitle = outputData.subtitle(object);

}
if (typeof outputData.open === "function") {

@@ -125,3 +125,3 @@ open = outputData.open(object);

}
if (typeof outputData.message === "function") {

@@ -128,0 +128,0 @@ message = outputData.message(object);

@@ -1,2 +0,2 @@

var gutil = require("gulp-util");
var PluginError = require('plugin-error');
var api = require("./extra_api");

@@ -6,3 +6,3 @@ var notify = require("./notify");

module.exports = function (reporter) {
if (!reporter) throw new gutil.PluginError("gulp-notify", "No custom reporter defined.");
if (!reporter) throw new PluginError("gulp-notify", "No custom reporter defined.");

@@ -9,0 +9,0 @@ var inner = function (options) {

{
"name": "gulp-notify",
"version": "3.0.0",
"version": "3.1.0",
"description": "gulp plugin to send messages based on Vinyl Files or Errors to Mac OS X, Linux or Windows using the node-notifier module. Fallbacks to Growl or simply logging",

@@ -34,6 +34,8 @@ "keywords": [

"dependencies": {
"gulp-util": "^3.0.8",
"ansi-colors": "^1.0.1",
"fancy-log": "^1.3.2",
"lodash.template": "^4.4.0",
"node-notifier": "^5.0.1",
"node.extend": "^1.1.6",
"plugin-error": "^0.1.2",
"through2": "^2.0.3"

@@ -45,3 +47,4 @@ },

"mocha": "^3.2.0",
"should": "^11.2.0"
"should": "^11.2.0",
"vinyl": "^2.1.0"
},

@@ -48,0 +51,0 @@ "engines": {

@@ -8,3 +8,4 @@ /*global describe, it*/

plumber = require('gulp-plumber'),
gutil = require('gulp-util'),
PluginError = require('plugin-error'),
Vinyl = require('vinyl'),
join = require('path').join,

@@ -56,3 +57,3 @@ fs = require('fs'),

var expectedFile = new gutil.File({
var expectedFile = new Vinyl({
path: "test/fixtures/1.txt",

@@ -84,3 +85,3 @@ cwd: "test/",

var expectedFile = new gutil.File({
var expectedFile = new Vinyl({
path: "test/fixtures/1.txt",

@@ -263,3 +264,3 @@ cwd: "test/",

var testString = "some exception",
expectedFile = new gutil.File({
expectedFile = new Vinyl({
path: "test/fixtures/1.txt",

@@ -385,3 +386,3 @@ cwd: "test/",

it('should handle streamed files', function (done) {
var expectedFile = new gutil.File({
var expectedFile = new Vinyl({
path: "test/fixtures/1.txt",

@@ -421,3 +422,3 @@ cwd: "test/",

it('should support lodash template for titles and messages', function (done) {
var expectedFile = new gutil.File({
var expectedFile = new Vinyl({
path: "test/fixtures/1.txt",

@@ -581,3 +582,3 @@ cwd: "test/",

.pipe(through.obj(function (file, enc, cb) {
this.emit("error", new gutil.PluginError("testPlugin", "foo"));
this.emit("error", new PluginError("testPlugin", "foo"));
cb();

@@ -606,3 +607,3 @@ }))

.pipe(through.obj(function (file, enc, cb) {
this.emit("error", new gutil.PluginError("testPlugin", "foo"));
this.emit("error", new PluginError("testPlugin", "foo"));
cb();

@@ -660,3 +661,3 @@ }))

.pipe(through.obj(function (file, enc, cb) {
this.emit("error", new gutil.PluginError("testPlugin", testMessage));
this.emit("error", new PluginError("testPlugin", testMessage));
cb();

@@ -685,3 +686,3 @@ }))

.pipe(through.obj(function (file, enc, cb) {
this.emit("error", new gutil.PluginError("testPlugin", testMessage));
this.emit("error", new PluginError("testPlugin", testMessage));
cb();

@@ -712,3 +713,3 @@ }))

.pipe(through.obj(function (file, enc, cb) {
this.emit("error", new gutil.PluginError("testPlugin", testMessage));
this.emit("error", new PluginError("testPlugin", testMessage));
cb();

@@ -736,3 +737,3 @@ }))

icon: expectedIcon,
})(new gutil.PluginError("testPlugin", testMessage));
})(new PluginError("testPlugin", testMessage));
});

@@ -753,3 +754,3 @@

icon: expectedIcon,
})(new gutil.PluginError("testPlugin", testMessage));
})(new PluginError("testPlugin", testMessage));
});

@@ -776,3 +777,3 @@

.pipe(through.obj(function (file, enc, cb) {
this.emit("error", new gutil.PluginError("testPlugin", "test"));
this.emit("error", new PluginError("testPlugin", "test"));
cb();

@@ -779,0 +780,0 @@ }))

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