Socket
Socket
Sign inDemoInstall

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.5.3 to 0.6.0

5

CHANGELOG.md

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

# Chokidar 0.6.0 (March 10, 2012)
* File attributes (stat()) are now passed to `add` and `change` events
as second arguments.
* Changed default polling interval for binary files to 300ms.
# Chokidar 0.5.3 (January 13, 2012)

@@ -2,0 +7,0 @@ * Removed emitting of `change` events before `unlink`.

14

lib/index.js

@@ -67,3 +67,3 @@ // Generated by CoffeeScript 1.4.0

if ((_ref4 = (_base4 = this.options).binaryInterval) == null) {
_base4.binaryInterval = 100;
_base4.binaryInterval = 300;
}

@@ -154,3 +154,3 @@ this.enableBinaryInterval = this.options.binaryInterval !== this.options.interval;

if (curr.mtime.getTime() > prev.mtime.getTime()) {
return callback(item);
return callback(item, curr);
}

@@ -161,3 +161,3 @@ });

FSWatcher.prototype._handleFile = function(file, initialAdd) {
FSWatcher.prototype._handleFile = function(file, stats, initialAdd) {
var _this = this;

@@ -167,7 +167,7 @@ if (initialAdd == null) {

}
this._watch(file, 'file', function(file) {
return _this.emit('change', file);
this._watch(file, 'file', function(file, newStats) {
return _this.emit('change', file, newStats);
});
if (!(initialAdd && this.options.ignoreInitial)) {
return this.emit('add', file);
return this.emit('add', file, stats);
}

@@ -228,3 +228,3 @@ };

if (stats.isFile()) {
_this._handleFile(item, initialAdd);
_this._handleFile(item, stats, initialAdd);
}

@@ -231,0 +231,0 @@ if (stats.isDirectory()) {

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

@@ -32,5 +32,4 @@ "fs",

"scripts": {
"prepublish": "node setup.js prepublish",
"postpublish": "node setup.js postpublish",
"test": "node setup.js test"
"prepublish": "coffee -o lib/ src/",
"test": "mocha --compilers coffee:coffee-script --require test/common.js --colors"
},

@@ -37,0 +36,0 @@ "dependencies": {},

@@ -43,2 +43,8 @@ # Chokidar

// 'add' and 'change' events also receive stat() results as second argument.
// http://nodejs.org/api/fs.html#fs_class_fs_stats
watcher.on('change', function(path, stats) {
console.log('File', path, 'changed size to', stats.size);
});
watcher.add('new-file');

@@ -62,3 +68,3 @@ watcher.add(['new-file-2', 'new-file-3']);

* `options.interval` (default: `100`). Interval of file system polling.
* `options.binaryInterval` (default: `100`). Interval of file system polling for binary files.
* `options.binaryInterval` (default: `300`). Interval of file system polling for binary files (see extensions in src/is-binary).

@@ -77,3 +83,3 @@ `chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`:

Copyright (c) 2012 Paul Miller (http://paulmillr.com)
Copyright (c) 2013 Paul Miller (http://paulmillr.com)

@@ -80,0 +86,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of

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