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.6.1 to 1.7.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# Chokidar 1.7.0 (May 8, 2017)
* Add `disableGlobbing` option
* Add ability to force interval value by setting CHOKIDAR_INTERVAL env
variable
* Fix issue with `.close()` being called before `ready`
# Chokidar 1.6.0 (Jun 22, 2016)

@@ -2,0 +8,0 @@ * Added ability for force `usePolling` mode by setting `CHOKIDAR_USEPOLLING`

11

index.js

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

if (undef('binaryInterval')) opts.binaryInterval = 300;
if (undef('disableGlobbing')) opts.disableGlobbing = false;
this.enableBinaryInterval = opts.binaryInterval !== opts.interval;

@@ -108,2 +109,6 @@

}
var envInterval = process.env.CHOKIDAR_INTERVAL;
if (envInterval) {
opts.interval = parseInt(envInterval);
}

@@ -382,3 +387,3 @@ // Editor atomic write normalization enabled by default with fs.watch

path = path.replace(replacerRe, '');
var watchPath = depth || !isGlob(path) ? path : globParent(path);
var watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path);
var fullWatchPath = sysPath.resolve(watchPath);

@@ -471,3 +476,3 @@ var hasGlob = watchPath !== path;

add: function(item) {
if (item !== '.') this._items[item] = true;
if (item !== '.' && item !== '..') this._items[item] = true;
},

@@ -626,3 +631,3 @@ remove: function(item) {

results.forEach(function(item) {
if (!item) return;
if (!item || this.closed) return;
this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));

@@ -629,0 +634,0 @@ }, this);

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

var initWatch = function(error, realPath) {
if (this.closed) return;
var closer = this._watchWithFsEvents(

@@ -379,0 +380,0 @@ wh.watchPath,

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

@@ -37,3 +37,3 @@ "fs",

"istanbul": "^0.3.20",
"mocha": "^2.0.0",
"mocha": "^3.0.0",
"rimraf": "^2.4.3",

@@ -40,0 +40,0 @@ "sinon": "^1.10.3",

@@ -64,3 +64,3 @@ # 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)

// One-liner for current directory, ignores .dotfiles
chokidar.watch('.', {ignored: /[\/\\]\./}).on('all', (event, path) => {
chokidar.watch('.', {ignored: /(^|[\/\\])\../}).on('all', (event, path) => {
console.log(event, path);

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

var watcher = chokidar.watch('file, dir, glob, or array', {
ignored: /[\/\\]\./,
ignored: /(^|[\/\\])\../,
persistent: true

@@ -125,2 +125,3 @@ });

cwd: '.',
disableGlobbing: false,

@@ -174,2 +175,4 @@ usePolling: true,

derived. Paths emitted with events will be relative to this.
* `disableGlobbing` (default: `false`). If set to `true` then the strings passed to `.watch()` and `.add()` are treated as
literal path names, even if they look like globs.

@@ -187,3 +190,4 @@ #### Performance

* _Polling-specific settings_ (effective when `usePolling: true`)
* `interval` (default: `100`). Interval of file system polling.
* `interval` (default: `100`). Interval of file system polling. You may also
set the CHOKIDAR_INTERVAL env variable to override this option.
* `binaryInterval` (default: `300`). Interval of file system

@@ -204,3 +208,3 @@ polling for binary files.

* `awaitWriteFinish` (default: `false`).
By default, the `add` event will fire when a file first appear on disk, before
By default, the `add` event will fire when a file first appears on disk, before
the entire file has been written. Furthermore, in some cases some `change`

@@ -207,0 +211,0 @@ events will be emitted while the file is being written. In some cases,

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