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.7.0 to 2.0.0

8

CHANGELOG.md

@@ -0,1 +1,9 @@

# Chokidar 2.0.0 (Dec 29, 2017)
* Breaking: Upgrade globbing dependencies which require globs to be more strict and always use POSIX-style slashes because Windows-style slashes are used as escape sequences
* Update tests to work with upgraded globbing dependencies
* Add ability to log FSEvents require error by setting `CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR` env
* Fix for handling braces in globs
* Add node 8 & 9 to CI configs
* Allow node 0.10 failures on Windows
# Chokidar 1.7.0 (May 8, 2017)

@@ -2,0 +10,0 @@ * Add `disableGlobbing` option

37

index.js

@@ -11,2 +11,4 @@ 'use strict';

var inherits = require('inherits');
var braces = require('braces');
var normalizePath = require('normalize-path')

@@ -427,3 +429,7 @@ var NodeFsHandler = require('./lib/nodefs-handler');

if (!hasGlob) return false;
var parts = sysPath.relative(watchPath, path).split(/[\/\\]/);
var parts = [];
var expandedPath = braces.expand(path);
expandedPath.forEach(function(path) {
parts.push(sysPath.relative(watchPath, path).split(/[\/\\]/));
});
return parts;

@@ -433,3 +439,7 @@ };

var dirParts = getDirParts(path);
if (dirParts && dirParts.length > 1) dirParts.pop();
if (dirParts) {
dirParts.forEach(function(parts) {
if (parts.length > 1) parts.pop();
});
}
var unmatchedGlob;

@@ -441,5 +451,7 @@

var globstar = false;
unmatchedGlob = !dirParts.every(function(part, i) {
if (part === '**') globstar = true;
return globstar || !entryParts[i] || anymatch(part, entryParts[i]);
unmatchedGlob = !dirParts.some(function(parts) {
return parts.every(function(part, i) {
if (part === '**') globstar = true;
return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i]);
});
});

@@ -582,2 +594,3 @@ }

FSWatcher.prototype.add = function(paths, _origAdd, _internal) {
var disableGlobbing = this.options.disableGlobbing;
var cwd = this.options.cwd;

@@ -592,9 +605,17 @@ this.closed = false;

if (cwd) paths = paths.map(function(path) {
var absPath;
if (isAbsolute(path)) {
return path;
absPath = path;
} else if (path[0] === '!') {
return '!' + sysPath.join(cwd, path.substring(1));
absPath = '!' + sysPath.join(cwd, path.substring(1));
} else {
return sysPath.join(cwd, path);
absPath = sysPath.join(cwd, path);
}
// Check `path` instead of `absPath` because the cwd portion can't be a glob
if (disableGlobbing || !isGlob(path)) {
return absPath;
} else {
return normalizePath(absPath);
}
});

@@ -601,0 +622,0 @@

@@ -7,3 +7,5 @@ 'use strict';

var fsevents;
try { fsevents = require('fsevents'); } catch (error) {}
try { fsevents = require('fsevents'); } catch (error) {
if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error)
}

@@ -10,0 +12,0 @@ // fsevents instance helper functions

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

@@ -26,3 +26,4 @@ "fs",

"test": "istanbul test node_modules/mocha/bin/_mocha",
"ci-test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"
"ci-test": "istanbul cover _mocha",
"coveralls": "cat ./coverage/lcov.info | coveralls"
},

@@ -41,3 +42,4 @@ "files": [

"sinon": "^1.10.3",
"sinon-chai": "^2.6.0"
"sinon-chai": "^2.6.0",
"upath": "1.0.0"
},

@@ -48,8 +50,10 @@ "optionalDependencies": {

"dependencies": {
"anymatch": "^1.3.0",
"anymatch": "^2.0.0",
"async-each": "^1.0.0",
"glob-parent": "^2.0.0",
"braces": "^2.3.0",
"glob-parent": "^3.1.0",
"inherits": "^2.0.1",
"is-binary-path": "^1.0.0",
"is-glob": "^2.0.0",
"is-glob": "^4.0.0",
"normalize-path": "^2.1.1",
"path-is-absolute": "^1.0.0",

@@ -56,0 +60,0 @@ "readdirp": "^2.0.0"

@@ -1,2 +0,2 @@

# Chokidar [![Mac/Linux Build Status](https://img.shields.io/travis/paulmillr/chokidar/master.svg?label=Mac%20OSX%20%26%20Linux)](https://travis-ci.org/paulmillr/chokidar) [![Windows Build status](https://img.shields.io/appveyor/ci/es128/chokidar/master.svg?label=Windows)](https://ci.appveyor.com/project/es128/chokidar/branch/master) [![Coverage Status](https://coveralls.io/repos/paulmillr/chokidar/badge.svg)](https://coveralls.io/r/paulmillr/chokidar) [![Join the chat at https://gitter.im/paulmillr/chokidar](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/paulmillr/chokidar?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# Chokidar [![Mac/Linux Build Status](https://img.shields.io/travis/paulmillr/chokidar/master.svg?label=Mac%20OSX%20%26%20Linux)](https://travis-ci.org/paulmillr/chokidar) [![Windows Build status](https://img.shields.io/appveyor/ci/paulmillr/chokidar/master.svg?label=Windows)](https://ci.appveyor.com/project/paulmillr/chokidar/branch/master) [![Coverage Status](https://coveralls.io/repos/paulmillr/chokidar/badge.svg)](https://coveralls.io/r/paulmillr/chokidar) [![Join the chat at https://gitter.im/paulmillr/chokidar](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/paulmillr/chokidar?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

@@ -3,0 +3,0 @@ > A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.

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