Comparing version 1.1.50 to 1.1.51
var path = require('path'); | ||
var fs = require('fs'); | ||
var readdirp = require('readdirp'); | ||
var is_windows = process.platform === 'win32'; | ||
var use_fs_watch = process.platform === 'win32' || process.env.USE_FS_WATCH; | ||
@@ -53,3 +53,3 @@ module.exports = function() { | ||
function unwatchAll() { | ||
if (is_windows) { | ||
if (use_fs_watch) { | ||
Object.keys(watched_files).forEach(function(key) { | ||
@@ -104,3 +104,3 @@ watched_files[key].close(); | ||
if (!watched_files[file.fullPath]) { | ||
if (is_windows) { | ||
if (use_fs_watch) { | ||
(function() { | ||
@@ -107,0 +107,0 @@ watched_files[file.fullPath] = fs.watch(file.fullPath, function() { |
{ | ||
"name": "monocle", | ||
"version": "1.1.50", | ||
"version": "1.1.51", | ||
"description": "a tool for watching directories for file changes", | ||
@@ -16,3 +16,3 @@ "main": "monocle.js", | ||
"scripts": { | ||
"test": "mocha test -R spec -t 5000" | ||
"test": "mocha test -R spec -t 2000" | ||
}, | ||
@@ -19,0 +19,0 @@ "repository": { |
@@ -70,2 +70,6 @@ [![Build Status](https://travis-ci.org/samccone/monocle.png?branch=master)](https://travis-ci.org/samccone/monocle) | ||
### Force to use fs.watch | ||
You can use the USE_FS_WATCH env variable set to true, to force this behavior regardless of platform. | ||
## Why not just use fs.watch ? | ||
@@ -72,0 +76,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85
10143
5
169
1