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

@file-services/node

Package Overview
Dependencies
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@file-services/node - npm Package Compare versions

Comparing version 7.2.3 to 7.2.4

13

dist/watch-service.js

@@ -6,2 +6,3 @@ "use strict";

const fs_1 = require("fs");
const events_1 = require("events");
const utils_1 = require("@file-services/utils");

@@ -42,4 +43,10 @@ const { stat } = fs_1.promises;

this.fsWatchers.delete(path);
await (0, events_1.once)(fsWatcher, 'close');
}
}
const pendingEvent = this.pendingEvents.get(path);
if (pendingEvent) {
clearTimeout(pendingEvent.timerId);
this.pendingEvents.delete(path);
}
}

@@ -50,4 +57,10 @@ async unwatchAllPaths() {

}
for (const { timerId } of this.pendingEvents.values()) {
clearTimeout(timerId);
}
const watcherCloseEvents = Array.from(this.fsWatchers.values(), (watcher) => (0, events_1.once)(watcher, 'close'));
this.pendingEvents.clear();
this.fsWatchers.clear();
this.watchedPaths.clear();
await Promise.all(watcherCloseEvents);
}

@@ -54,0 +67,0 @@ addGlobalListener(listener) {

6

package.json
{
"name": "@file-services/node",
"description": "Node.js file system implementation.",
"version": "7.2.3",
"version": "7.2.4",
"main": "dist/index.js",

@@ -11,4 +11,4 @@ "scripts": {

"dependencies": {
"@file-services/types": "^7.2.3",
"@file-services/utils": "^7.2.3"
"@file-services/types": "^7.2.4",
"@file-services/utils": "^7.2.4"
},

@@ -15,0 +15,0 @@ "files": [

import { join } from 'path';
import { promises as fsPromises, watch, FSWatcher } from 'fs';
import { once } from 'events';
import type { IWatchService, WatchEventListener, IWatchEvent, IFileSystemStats } from '@file-services/types';

@@ -76,4 +77,10 @@ import { SetMultiMap } from '@file-services/utils';

this.fsWatchers.delete(path);
await once(fsWatcher, 'close');
}
}
const pendingEvent = this.pendingEvents.get(path);
if (pendingEvent) {
clearTimeout(pendingEvent.timerId);
this.pendingEvents.delete(path);
}
}

@@ -85,4 +92,10 @@

}
for (const { timerId } of this.pendingEvents.values()) {
clearTimeout(timerId);
}
const watcherCloseEvents = Array.from(this.fsWatchers.values(), (watcher) => once(watcher, 'close'));
this.pendingEvents.clear();
this.fsWatchers.clear();
this.watchedPaths.clear();
await Promise.all(watcherCloseEvents);
}

@@ -89,0 +102,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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