Socket
Socket
Sign inDemoInstall

watchpack

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watchpack - npm Package Compare versions

Comparing version 2.0.0-beta.12 to 2.0.0-beta.13

23

lib/DirectoryWatcher.js

@@ -67,2 +67,4 @@ /*

this.files = new Map();
/** @type {Map<string, number>} */
this.filesWithoutCase = new Map();
this.directories = new Map();

@@ -158,4 +160,11 @@ this.lastWatchEvent = 0;

this.files.delete(itemPath);
const key = withoutCase(itemPath);
const count = this.filesWithoutCase.get(key) - 1;
if (count <= 0) {
this.filesWithoutCase.delete(key);
this.forEachWatcher(itemPath, w => w.emit("remove", type));
} else {
this.filesWithoutCase.set(key, count);
}
this.forEachWatcher(itemPath, w => w.emit("remove", type));
if (!initial) {

@@ -203,2 +212,14 @@ this.forEachWatcher(this.path, w =>

if (!old) {
const key = withoutCase(filePath);
const count = this.filesWithoutCase.get(key);
this.filesWithoutCase.set(key, (count || 0) + 1);
if (count !== undefined) {
// There is already a file with case-insenstive-equal name
// On a case-insenstive filesystem we may miss the renaming
// when only casing is changed.
// To be sure that our information is correct
// we trigger a rescan here
this.doScan(false);
}
this.forEachWatcher(filePath, w => {

@@ -205,0 +226,0 @@ if (!initial || w.checkStartTime(safeTime, initial)) {

2

package.json
{
"name": "watchpack",
"version": "2.0.0-beta.12",
"version": "2.0.0-beta.13",
"description": "",

@@ -5,0 +5,0 @@ "main": "./lib/watchpack.js",

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