Socket
Socket
Sign inDemoInstall

watch

Package Overview
Dependencies
0
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.9.0 to 0.10.0

10

main.js

@@ -108,3 +108,3 @@ // Copyright 2010-2011 Mikeal Rogers

var prevFile = {file: null,action: null};
var prevFile = {file: null,action: null,stat: null};
exports.watchTree(root, options, function (f, curr, prev) {

@@ -116,12 +116,10 @@ if (typeof f == "object" && prev == null && curr === null) {

if (prev === null && (prevFile.file != f || prevFile.action != "created")) {
prevFile = { file: f, action: "created" };
prevFile = { file: f, action: "created", stat: curr };
return monitor.emit("created", f, curr);
}
if (curr.nlink === 0 && (prevFile.file != f || prevFile.action != "removed")) {
prevFile = { file: f, action: "removed" };
prevFile = { file: f, action: "removed", stat: curr };
return monitor.emit("removed", f, curr);
}
if (prevFile.file != null) {
prevFile = {file: null,action: null};
} else {
if (prevFile.file === null || prevFile.stat.mtime.getTime() !== curr.mtime.getTime()) {
monitor.emit("changed", f, curr, prev);

@@ -128,0 +126,0 @@ }

2

package.json

@@ -10,3 +10,3 @@ {

],
"version": "0.9.0",
"version": "0.10.0",
"homepage": "https://github.com/mikeal/watch",

@@ -13,0 +13,0 @@ "bugs": {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc