Socket
Socket
Sign inDemoInstall

gaze

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gaze - npm Package Compare versions

Comparing version 0.6.3 to 0.6.4

22

index.js

@@ -9,12 +9,16 @@ /*

try {
// Attempt to resolve optional pathwatcher
require('bindings')('pathwatcher.node');
var version = process.versions.node.split('.');
module.exports = (version[0] === '0' && version[1] === '8')
? require('./lib/gaze04.js')
: require('./lib/gaze.js');
} catch (err) {
// Otherwise serve gaze04
// If on node v0.8, serve gaze04
var version = process.versions.node.split('.');
if (version[0] === '0' && version[1] === '8') {
module.exports = require('./lib/gaze04.js');
} else {
try {
// Check whether pathwatcher successfully built without running it
require('bindings')({ bindings: 'pathwatcher.node', path: true });
// If successfully built, give the better version
module.exports = require('./lib/gaze.js');
} catch (err) {
// Otherwise serve gaze04
module.exports = require('./lib/gaze04.js');
}
}

@@ -14,3 +14,3 @@ /*

var EE = require('events').EventEmitter;
var fs = require('fs');
var fs = require('graceful-fs');
var path = require('path');

@@ -82,3 +82,3 @@ var globule = require('globule');

// Set maxListeners
if (this.options.maxListeners) {
if (this.options.maxListeners != null) {
this.setMaxListeners(this.options.maxListeners);

@@ -265,2 +265,6 @@ Gaze.super_.prototype.setMaxListeners(this.options.maxListeners);

fs.readdir(dir, function(err, current) {
if (err) {
self.emit('error', err);
return;
}
helper.forEachSeries(current, function(file, next) {

@@ -267,0 +271,0 @@ var filepath = path.join(dir, file);

@@ -14,3 +14,3 @@ /*

var EE = require('events').EventEmitter;
var fs = require('fs');
var fs = require('graceful-fs');
var path = require('path');

@@ -77,3 +77,3 @@ var globule = require('globule');

// Set maxListeners
if (this.options.maxListeners) {
if (this.options.maxListeners != null) {
this.setMaxListeners(this.options.maxListeners);

@@ -80,0 +80,0 @@ Gaze.super_.prototype.setMaxListeners(this.options.maxListeners);

@@ -32,3 +32,3 @@ /*

fs = require('fs');
fs = require('graceful-fs');

@@ -35,0 +35,0 @@ path = require('path');

@@ -11,6 +11,6 @@ /*

try { var PathWatcher = require('./pathwatcher'); } catch (err) { }
var PathWatcher = null;
var statpoll = require('./statpoll.js');
var helper = require('./helper');
var fs = require('fs');
var fs = require('graceful-fs');
var path = require('path');

@@ -24,2 +24,6 @@

var platform = module.exports = function(file, cb) {
if (PathWatcher == null) {
PathWatcher = require('./pathwatcher');
}
// Ignore non-existent files

@@ -26,0 +30,0 @@ if (!fs.existsSync(file)) return;

@@ -11,3 +11,3 @@ /*

var fs = require('fs');
var fs = require('graceful-fs');
var nextback = require('nextback');

@@ -14,0 +14,0 @@ var helper = require('./helper');

{
"name": "gaze",
"description": "A globbing fs.watch wrapper built from the best parts of other fine watch libs.",
"version": "0.6.3",
"version": "0.6.4",
"homepage": "https://github.com/shama/gaze",

@@ -36,3 +36,4 @@ "author": {

"nan": "~0.8.0",
"absolute-path": "0.0.0"
"absolute-path": "0.0.0",
"graceful-fs": "~2.0.3"
},

@@ -39,0 +40,0 @@ "devDependencies": {

# gaze [![Build Status](http://img.shields.io/travis/shama/gaze.svg)](https://travis-ci.org/shama/gaze) [![gittip.com/shama](http://img.shields.io/gittip/shama.svg)](https://www.gittip.com/shama)
A globbing fs.watch wrapper built from the best parts of other fine watch libs.
Compatible with Node.js 0.11/0.10/0.8, Windows, OSX and Linux.
Compatible with Node.js 0.10/0.8, Windows, OSX and Linux.

@@ -89,3 +89,3 @@ ![gaze](http://dontkry.com/images/repos/gaze.png)

if (error) {
// Handle error if it occured while starting up
// Handle error if it occurred while starting up
}

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

## Release History
* 0.6.4 - Catch and emit error from readdir (@oconnore). Fix for 0 maxListeners. Use graceful-fs to avoid EMFILE errors in other places fs is used. Better method to determine if pathwatcher was built. Fix keeping process alive too much, only init pathwatcher if a file is being watched. Set min required to Windows Vista when building on Windows (@pvolok).
* 0.6.3 - Add support for node v0.11

@@ -192,0 +193,0 @@ * 0.6.2 - Fix argument error with watched(). Fix for erroneous added events on folders. Ignore msvs build error 4244.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc