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

chokidar

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chokidar - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

3

CHANGELOG.md

@@ -0,1 +1,4 @@

# Chokidar 0.6.2 (19 March 2013)
* Fixed watching initially empty directories with `ignoreInitial` option.
# Chokidar 0.6.1 (19 March 2013)

@@ -2,0 +5,0 @@ * Added node.js 0.10 support.

22

lib/index.js

@@ -172,6 +172,6 @@ // Generated by CoffeeScript 1.4.0

FSWatcher.prototype._handleDir = function(directory) {
FSWatcher.prototype._handleDir = function(directory, initialAdd) {
var read,
_this = this;
read = function(directory) {
read = function(directory, initialAdd) {
return fs.readdir(directory, function(error, current) {

@@ -194,8 +194,10 @@ var previous;

}).forEach(function(file) {
return _this._handle(sysPath.join(directory, file), previous.length === 0);
return _this._handle(sysPath.join(directory, file), initialAdd);
});
});
};
read(directory);
return this._watch(directory, 'directory', read);
read(directory, initialAdd);
return this._watch(directory, 'directory', function(dir) {
return read(dir, false);
});
};

@@ -205,5 +207,2 @@

var _this = this;
if (initialAdd == null) {
initialAdd = false;
}
if (this._ignored(item)) {

@@ -230,3 +229,3 @@ return;

if (stats.isDirectory()) {
return _this._handleDir(item);
return _this._handleDir(item, initialAdd);
}

@@ -247,6 +246,9 @@ });

FSWatcher.prototype.add = function(files) {
var _this = this;
if (!Array.isArray(files)) {
files = [files];
}
files.forEach(this._handle);
files.forEach(function(file) {
return _this._handle(file, true);
});
return this;

@@ -253,0 +255,0 @@ };

{
"name": "chokidar",
"description": "A neat wrapper around node.js fs.watch / fs.watchFile.",
"version": "0.6.1",
"version": "0.6.2",
"keywords": [

@@ -6,0 +6,0 @@ "fs",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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