Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.0 to 2.0.0-beta.1

10

lib/DirectoryWatcher.js

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

const EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({});
let FS_ACCURACY = 1000;

@@ -500,3 +502,3 @@

if(err2) {
if(err2.code === "ENOENT" || err2.code === "EPERM" || err.code === "EBUSY") {
if(err2.code === "ENOENT" || err2.code === "EPERM" || err2.code === "EBUSY") {
this.setMissing(itemPath, initial, "scan (" + err2.code + ")")

@@ -590,5 +592,5 @@ } else {

// No additional info about this directory
map.set(dir, {});
map.set(dir, EXISTANCE_ONLY_TIME_ENTRY);
}
map.set(this.path, {});
map.set(this.path, EXISTANCE_ONLY_TIME_ENTRY);
}

@@ -634,2 +636,3 @@ if(!this.initialScan) {

module.exports = DirectoryWatcher;
module.exports.EXISTANCE_ONLY_TIME_ENTRY = EXISTANCE_ONLY_TIME_ENTRY;

@@ -639,2 +642,3 @@ function fixupEntryAccuracy(entry) {

entry.safeTime = entry.safeTime - entry.accuracy + FS_ACCURACY;
entry.accuracy = FS_ACCURACY;
}

@@ -641,0 +645,0 @@ }

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

let EXISTANCE_ONLY_TIME_ENTRY; // lazy required
function addWatchersToSet(watchers, set) {

@@ -82,2 +84,5 @@ for(const w of watchers) {

getTimeInfoEntries() {
if(EXISTANCE_ONLY_TIME_ENTRY === undefined) {
EXISTANCE_ONLY_TIME_ENTRY = require("./DirectoryWatcher").EXISTANCE_ONLY_TIME_ENTRY;
}
const directoryWatchers = new Set();

@@ -90,2 +95,11 @@ addWatchersToSet(this.fileWatchers, directoryWatchers);

for(const [path, entry] of times) {
if(map.has(path)) {
if(entry === EXISTANCE_ONLY_TIME_ENTRY) continue;
const value = map.get(path);
if(value === entry) continue;
if(value !== EXISTANCE_ONLY_TIME_ENTRY) {
map.set(path, Object.assign({}, value, entry));
continue;
}
}
map.set(path, entry);

@@ -92,0 +106,0 @@ }

{
"name": "watchpack",
"version": "2.0.0-beta.0",
"version": "2.0.0-beta.1",
"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