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

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 1.0.3 to 1.0.4

3

CHANGELOG.md

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

# Chokidar 1.0.4 (15 July 2015)
* Fix bug with `ignored` files/globs while `cwd` option is set
# Chokidar 1.0.3 (4 June 2015)

@@ -2,0 +5,0 @@ * Fix race issue with `alwaysStat` option and removed files

40

index.js

@@ -209,13 +209,21 @@ 'use strict';

// create the anymatch fn if it doesn't already exist
this._userIgnored = this._userIgnored || anymatch(this._globIgnored
.concat(this.options.ignored)
.concat(arrify(this.options.ignored)
.filter(function(path) {
return typeof path === 'string' && !isglob(path);
}).map(function(path) {
return path + '/**/*';
})
)
);
if (!this._userIgnored) {
var cwd = this.options.cwd;
var ignored = this.options.ignored;
if (cwd && ignored) {
ignored = arrify(ignored).map(function (path) {
return isAbsolute(path) ? path : sysPath.join(cwd, path);
});
}
this._userIgnored = anymatch(this._globIgnored
.concat(ignored)
.concat(arrify(ignored)
.filter(function(path) {
return typeof path === 'string' && !isglob(path);
}).map(function(path) {
return path + '/**/*';
})
)
);
}

@@ -384,3 +392,9 @@ return this._userIgnored([path, stats]);

if (cwd) paths = paths.map(function(path) {
return isAbsolute(path) ? path : sysPath.join(cwd, path);
if (isAbsolute(path)) {
return path;
} else if (path[0] === '!') {
return '!' + sysPath.join(cwd, path.substring(1));
} else {
return sysPath.join(cwd, path);
}
});

@@ -417,3 +431,3 @@

}.bind(this), function(error, results) {
results.forEach(function(item){
results.forEach(function(item) {
if (!item) return;

@@ -420,0 +434,0 @@ this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));

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

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

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