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

cpr

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cpr - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

7

lib/index.js

@@ -71,3 +71,6 @@ var fs = require('graceful-fs');

tree.forEach(function(item) {
var to = options.toHash[item];
dirs[path.dirname(item)] = true;
options.stats[path.dirname(item)] = fs.statSync(path.dirname(item));
options.toHash[path.dirname(item)] = path.dirname(to);
});

@@ -84,2 +87,3 @@

var createDirs = function(dirs, to, options, callback) {

@@ -246,5 +250,8 @@ var stack = new Stack();

proc();
}
} else {
callback('From should be a directory');
}
});
};

7

package.json

@@ -5,3 +5,3 @@ {

"author": "Dav Glass <davglass@gmail.com>",
"version": "0.0.5",
"version": "0.0.6",
"dependencies": {

@@ -23,4 +23,5 @@ "graceful-fs": "~1.1.14",

"scripts": {
"pretest": "jshint --config ./node_modules/yui-lint/jshint.json ./lib/*.js",
"test": "istanbul cover --print both -- vows --spec ./tests/*.js"
"pretest": "jshint --config ./node_modules/yui-lint/jshint.json ./lib/",
"windows-test": "vows --spec ./tests/full.js",
"test": "istanbul cover --print both -- vows --spec ./tests/full.js"
},

@@ -27,0 +28,0 @@ "bugs": { "url" : "http://github.com/davglass/cpr/issues" },

@@ -226,2 +226,18 @@ var vows = require('vows'),

}
},
"should fail on from not a dir": {
topic: function() {
var self = this;
cpr.cpr(__filename, path.join(to, 'does/not/matter'), function(err, status) {
self.callback(null, {
err: err,
status: status
});
});
},
"should return an error in the callback": function(topic) {
assert.isUndefined(topic.status);
assert.ok(topic.err);
assert.equal('From should be a directory', topic.err);
}
}

@@ -228,0 +244,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