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 9.3.0 to 9.3.1

dist/recursive-fs-watcher.d.ts

6

package.json
{
"name": "@file-services/node",
"description": "Node.js file system implementation.",
"version": "9.3.0",
"version": "9.3.1",
"main": "./dist/fs-node.cjs",

@@ -20,4 +20,4 @@ "types": "./dist/index.d.ts",

"dependencies": {
"@file-services/types": "^9.3.0",
"@file-services/utils": "^9.3.0"
"@file-services/types": "^9.3.1",
"@file-services/utils": "^9.3.1"
},

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

@@ -6,5 +6,6 @@ import fs from "node:fs";

import type { IBaseFileSystem, IFileSystem } from "@file-services/types";
import type { IBaseFileSystem, IFileSystem, WatchOptions } from "@file-services/types";
import { createFileSystem } from "@file-services/utils";
import { INodeWatchServiceOptions, NodeWatchService } from "./watch-service";
import { RecursiveFSWatcher } from "./recursive-fs-watcher";

@@ -23,2 +24,4 @@ const caseSensitive = !fs.existsSync(argv[0]!.toUpperCase());

export function createBaseNodeFs(options?: ICreateNodeFsOptions): IBaseFileSystem {
const originalWatch = fs.watch;
const watch = process.platform === "linux" ? wrapWithOwnRecursiveImpl(originalWatch) : originalWatch;
return {

@@ -31,2 +34,3 @@ ...path,

...fs,
watch,
promises: {

@@ -38,1 +42,10 @@ ...fs.promises,

}
function wrapWithOwnRecursiveImpl(originalWatch: typeof fs.watch) {
return (targetPath: string, options?: WatchOptions) => {
if (options?.recursive) {
return new RecursiveFSWatcher(targetPath, options);
}
return originalWatch(targetPath, options);
};
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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