Socket
Socket
Sign inDemoInstall

wrench

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

wrench - npm Package Compare versions

Comparing version 1.3.9 to 1.4.0

tests/copydirsync_unix.js

13

lib/wrench.js

@@ -186,4 +186,9 @@ /* wrench.js

for(var i = 0; i < files.length; i++) {
// ignores all files or directories which match the RegExp in opts.filter
if(!opts.whitelist && opts.filter && files[i].match(opts.filter)) continue;
// if opts.whitelist is true every file or directory which doesn't match opts.filter will be ignored
if(opts.whitelist && opts.filter && !files[i].match(opts.filter)) continue;
if (opts.excludeHiddenUnix && /^\./.test(files[i])) continue;
var currFile = fs.lstatSync(sourceDir + "/" + files[i]);
if(currFile.isDirectory()) {

@@ -273,3 +278,3 @@ /* recursion this thing right on back. */

var file = dir+'/'+filename;
fs.stat(file, function(err, stat){
fs.lstat(file, function(err, stat){
if (err) return clbk(err);

@@ -369,2 +374,6 @@ if (stat.isDirectory())

exports.LineReader.prototype = {
close: function() {
return fs.closeSync(this.fd);
},
getBufferAndSetCurrentPosition: function(position) {

@@ -371,0 +380,0 @@ var res = fs.readSync(this.fd, this.bufferSize, position, "ascii");

2

package.json
{
"name": "wrench",
"description": "Recursive filesystem (and other) operations that Node *should* have.",
"version": "1.3.9",
"version": "1.4.0",
"author": "Ryan McGrath <ryan@venodesigns.net>",

@@ -6,0 +6,0 @@

@@ -48,2 +48,6 @@ wrench.js - Recursive file operations in Node.js

}
// Note: You will need to close that above line reader at some point, otherwise
// you will run into a "too many open files" error. f.close() or fs.closeSync(f.fd) are
// your friends, as only you know when it is safe to close.
```

@@ -58,5 +62,4 @@

});
```
Questions, comments? Hit me up. (ryan [at] venodesigns.net | http://twitter.com/ryanmcgrath)

@@ -10,7 +10,7 @@ var testCase = require('nodeunit').testCase;

test.equals(path.existsSync(dir), false, 'Dir shouldn\'t exist - clean it up manually?');
test.equals(fs.existsSync(dir), false, 'Dir shouldn\'t exist - clean it up manually?');
wrench.mkdirSyncRecursive(dir, 0777);
test.equals(path.existsSync(dir), true, 'Dir should exist now');
test.equals(fs.existsSync(dir), true, 'Dir should exist now');

@@ -17,0 +17,0 @@ // clean up

@@ -26,3 +26,3 @@ var testCase = require('nodeunit').testCase;

test.ok(path.existsSync(dir), 'Folders should exist');
test.ok(fs.existsSync(dir), 'Folders should exist');

@@ -37,3 +37,3 @@ var files = wrench.readdirSyncRecursive(dir);

test.ok(path.existsSync(dir), 'Folders should exist');
test.ok(fs.existsSync(dir), 'Folders should exist');

@@ -40,0 +40,0 @@ var allFiles = [];

@@ -6,3 +6,4 @@ // `nodeunit tests/runner`

group_mkdir: require('./mkdir'),
group_readdir: require('./readdir')
group_readdir: require('./readdir'),
group_copydir: require('./copydirsync_unix')
};
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