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 1.0.0 to 1.1.0

bin/cpr

6

package.json

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

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

@@ -13,2 +13,3 @@ "graceful-fs": "~4.1.2",

"main": "./lib/index.js",
"bin": "./bin/cpr",
"devDependencies": {

@@ -27,3 +28,4 @@ "istanbul": "~0.4.0",

"Brian J Brennan <brianloveswords@gmail.com>",
"Elijah Insua <tmpvar@gmail.com>"
"Elijah Insua <tmpvar@gmail.com>",
"Jonny Reeves <github@jonnyreeves.co.uk>"
],

@@ -30,0 +32,0 @@ "keywords": [

@@ -63,2 +63,8 @@ CPR (cp -R)

CLI
---
`cpr` can also be used from the command line which is useful for cross platform support.
![cpr](../master/cpr.jpg?raw=true)

@@ -7,2 +7,3 @@ var vows = require('vows'),

cpr = require('../lib'),
exec = require('child_process').exec,
to = path.join(__dirname, './out/'),

@@ -368,2 +369,40 @@ from = path.join(__dirname, '../node_modules');

}
},
"should work as a standalone bin": {
"and should copy node_modules": {
topic: function() {
var out = path.join(to, '4'),
self = this;
this.outDir = out;
exec('node ./bin/cpr ' + from + ' ' + out, function(err) {
var t = {
dirs: {
from: fs.readdirSync(from).sort(),
to: fs.readdirSync(out).sort()
}
};
self.callback(err, t);
});
},
'has ./out/4': function(topic) {
var stat = fs.statSync(this.outDir);
assert.ok(stat.isDirectory());
},
'and dirs are equal': function(topic) {
assert.deepEqual(topic.dirs.to, topic.dirs.from);
},
'and from directory has graceful-fs dir': function(topic) {
var fromHasGFS = topic.dirs.from.some(function(item) {
return (item === 'graceful-fs');
});
assert.isTrue(fromHasGFS);
},
'and to directory has graceful-fs dir': function(topic) {
var toHasGFS = topic.dirs.to.some(function(item) {
return (item === 'graceful-fs');
});
assert.isTrue(toHasGFS);
}
}
}

@@ -370,0 +409,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