Socket
Socket
Sign inDemoInstall

chokidar

Package Overview
Dependencies
Maintainers
2
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 2.0.3 to 2.0.4

9

index.js

@@ -276,9 +276,14 @@ 'use strict';

var throttled = this._throttled[action];
if (path in throttled) return false;
if (path in throttled) {
throttled[path].count++;
return false;
}
function clear() {
var count = throttled[path] ? throttled[path].count : 0;
delete throttled[path];
clearTimeout(timeoutObject);
return count;
}
var timeoutObject = setTimeout(clear, timeout);
throttled[path] = {timeoutObject: timeoutObject, clear: clear};
throttled[path] = {timeoutObject: timeoutObject, clear: clear, count: 0};
return throttled[path];

@@ -285,0 +290,0 @@ };

@@ -90,2 +90,3 @@ 'use strict';

watcher.on('error', function(error) {
container.watcherUnusable = true; // documented since Node 10.4.1
// Workaround for https://github.com/joyent/node/issues/4337

@@ -122,3 +123,5 @@ if (process.platform === 'win32' && error.code === 'EPERM') {

if (!Object.keys(container.listeners).length) {
container.watcher.close();
if (!container.watcherUnusable) { // check to protect against issue #730
container.watcher.close();
}
delete FsWatchInstances[fullPath];

@@ -385,3 +388,3 @@ }

}.bind(this)).on('end', function() {
if (throttler) throttler.clear();
var wasThrottled = throttler ? throttler.clear() : false;
if (done) done();

@@ -404,2 +407,5 @@

}, this);
// one more time for any missed in case changes came in extremely quickly
if (wasThrottled) read(directory, false);
}.bind(this)).on('error', this._handleError.bind(this));

@@ -406,0 +412,0 @@ }.bind(this);

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

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

"scripts": {
"test": "istanbul test node_modules/mocha/bin/_mocha",
"ci-test": "istanbul cover _mocha",
"coveralls": "cat ./coverage/lcov.info | coveralls"
"test": "nyc mocha --exit",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
},

@@ -36,6 +35,6 @@ "files": [

"chai": "^3.2.0",
"coveralls": "^2.11.2",
"coveralls": "^3.0.1",
"graceful-fs": "4.1.4",
"istanbul": "^0.3.20",
"mocha": "^3.0.0",
"mocha": "^5.2.0",
"nyc": "^11.8.0",
"rimraf": "^2.4.3",

@@ -46,3 +45,3 @@ "sinon": "^1.10.3",

"optionalDependencies": {
"fsevents": "^1.1.2"
"fsevents": "^1.2.2"
},

@@ -57,7 +56,8 @@ "dependencies": {

"is-glob": "^4.0.0",
"lodash.debounce": "^4.0.8",
"normalize-path": "^2.1.1",
"path-is-absolute": "^1.0.0",
"readdirp": "^2.0.0",
"upath": "^1.0.0"
"upath": "^1.0.5"
}
}
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