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

watchr

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watchr - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

example.js

5

History.md
## History
- v2.3.2 January 6, 2013
- Fixed closing when a child path watcher doesn't exist
- Closes [pull request #26](https://github.com/bevry/watchr/pull/26) thanks to [Jason Als](https://github.com/jasonals)
- Added close tests
- v2.3.1 December 19, 2012

@@ -4,0 +9,0 @@ - Fixed a bug with closing directories that have children

6

out/lib/watchr.js

@@ -276,4 +276,4 @@ // Generated by CoffeeScript 1.4.0

} else {
childFileFullPath = childFileWatcher.path;
_this.log('debug', 'determined delete:', childFileRelativePath);
childFileFullPath = pathUtil.join(fileFullPath, childFileRelativePath);
_this.log('debug', 'determined delete:', childFileFullPath);
return _this.closeChild(childFileRelativePath, 'deleted');

@@ -322,3 +322,3 @@ }

}
this.log('debug', "close: " + this.path, (new Error()).stack);
this.log('debug', "close: " + this.path);
_ref = this.children;

@@ -325,0 +325,0 @@ for (childRelativePath in _ref) {

{
"name": "watchr",
"version": "2.3.1",
"version": "2.3.2",
"description": "Better file system watching for Node.js",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/bevry/watchr",

@@ -36,2 +36,3 @@ ## Watchr: better file system watching for Node.js

To wrap it all together, it would look like this:

@@ -41,5 +42,6 @@

// Require
watchr = require('watchr')
var watchr = require('watchr')
// Watch a directory or file
console.log('Watch our paths');
watchr.watch({

@@ -62,3 +64,13 @@ paths: ['path1','path2','path3'],

next: function(err,watchers){
console.log('watching for all our paths has completed', arguments);
// Watching all setup
console.log('Now watching our paths', arguments);
// Close watchers after 10 seconds
setTimeout(function(){
var i;
console.log('Stop watching our paths');
for ( i=0; i<watchers.length; i++ ) {
watchers[i].close();
}
},10*1000);
}

@@ -65,0 +77,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