Comparing version 0.0.12 to 0.0.13
@@ -11,5 +11,6 @@ /*! | ||
var | ||
fs = require('fs'), | ||
path = require('path'), | ||
_c = require('constants'); | ||
fs = require('fs'), | ||
path = require('path'), | ||
exists = fs.exists || path.exists, | ||
_c = require('constants'); | ||
@@ -126,4 +127,4 @@ /** | ||
// check whether the path exists then retry if needed | ||
path.exists(name, function _pathExists(exists) { | ||
if (exists) { | ||
exists(name, function _pathExists(pathExists) { | ||
if (pathExists) { | ||
if (tries-- > 0) return _getUniqueName(); | ||
@@ -130,0 +131,0 @@ |
{ | ||
"name": "tmp", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "Temporary file and directory creator", | ||
@@ -39,4 +39,4 @@ "author": "KARASZI István <github@spam.raszi.hu> (http://raszi.hu/)", | ||
"devDependencies": { | ||
"vows": "~0.5.11" | ||
"vows": "~0.6.3" | ||
} | ||
} |
@@ -5,4 +5,5 @@ var | ||
path = require('path'), | ||
fs = require('fs'), | ||
path = require('path'), | ||
fs = require('fs'), | ||
existsSync = fs.existsSync || path.existsSync, | ||
@@ -15,3 +16,3 @@ tmp = require('../lib/tmp.js'), | ||
return function _testDirGenerated(err, name) { | ||
assert.ok(path.existsSync(name), 'Should exist'); | ||
assert.ok(existsSync(name), 'Should exist'); | ||
@@ -60,3 +61,3 @@ var stat = fs.statSync(name); | ||
topic: function () { | ||
tmp.dir({ template: tmp.tmpdir.concat('clike-XXXXXX-postfix') }, this.callback); | ||
tmp.dir({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }, this.callback); | ||
}, | ||
@@ -121,5 +122,5 @@ | ||
'should not exist': function(err, name) { | ||
assert.ok(!path.existsSync(name), "Directory should be removed"); | ||
assert.ok(!existsSync(name), "Directory should be removed"); | ||
} | ||
} | ||
}).export(module); |
@@ -5,4 +5,5 @@ var | ||
path = require('path'), | ||
fs = require('fs'), | ||
path = require('path'), | ||
fs = require('fs'), | ||
existsSync = fs.existsSync || path.existsSync, | ||
@@ -15,3 +16,3 @@ tmp = require('../lib/tmp.js'), | ||
return function _testFileGenerated(err, name, fd) { | ||
assert.ok(path.existsSync(name), 'Should exist'); | ||
assert.ok(existsSync(name), 'Should exist'); | ||
@@ -71,3 +72,3 @@ var stat = fs.statSync(name); | ||
topic: function () { | ||
tmp.file({ template: tmp.tmpdir.concat('clike-XXXXXX-postfix') }, this.callback); | ||
tmp.file({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }, this.callback); | ||
}, | ||
@@ -132,3 +133,3 @@ | ||
'should not exist': function(err, name) { | ||
assert.ok(!path.existsSync(name), "File should be removed"); | ||
assert.ok(!existsSync(name), "File should be removed"); | ||
} | ||
@@ -135,0 +136,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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
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
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
17813
449
1
1