node-notifier
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -1,3 +0,2 @@ | ||
var child_process = require('child_process') | ||
, exec = child_process.exec | ||
var cp = require('child_process') | ||
, osVersionError = 'Incorrect OS. node-notify requires Mac OS 10.8 or higher' | ||
@@ -51,2 +50,6 @@ , shellwords = require('shellwords'); | ||
module.exports.getOSXVersion = function (cb) { | ||
return cp.exec("sw_vers -productVersion", cb); | ||
} | ||
module.exports.isMacOSX = function (cb) { | ||
@@ -56,8 +59,7 @@ if (process.platform != 'darwin') { | ||
} | ||
return exec("sw_vers -productVersion", function (error, stdout, stderr) { | ||
return module.exports.getOSXVersion(function (error, stdout, stderr) { | ||
if (error) { | ||
return cb(true, error, stderr); | ||
} | ||
if (stdout.split(".")[1] >= "8") { | ||
if (Number(stdout.split(".")[1]) >= 8) { | ||
return cb(false); | ||
@@ -64,0 +66,0 @@ } |
{ | ||
"name": "node-notifier", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A Node.js module for sending notifications on mac, windows and linux", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -186,2 +186,5 @@ # node-notifier [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url] | ||
### `v3.0.1` | ||
1. Fixes version check for Mac OS X Yosemite | ||
### `v3.0.0` | ||
@@ -188,0 +191,0 @@ 1. Updates terminal-notifier to version 1.6.0; adding support for appIcon and contentImage |
@@ -10,2 +10,4 @@ var NotificationCenter = require('../').NotificationCenter | ||
var originalUtils = utils.command; | ||
var originalIsMacOsX = utils.isMacOSX; | ||
var originalType = os.type; | ||
@@ -24,4 +26,9 @@ (function () { | ||
}; | ||
}) | ||
}); | ||
after(function () { | ||
os.type = originalType; | ||
utils.isMacOSX = originalIsMacOsX; | ||
}); | ||
describe('#notify()', function(){ | ||
@@ -28,0 +35,0 @@ |
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
492998
24
552
204
2