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 5.3.1 to 5.4.0

4

dist/index.d.ts
import type { IFileSystem } from '@file-services/types';
export * from './node-fs';
export * from './watch-service';
export * from './node-fs.js';
export * from './watch-service.js';
export declare const nodeFs: IFileSystem;
export default nodeFs;
//# sourceMappingURL=index.d.ts.map

@@ -14,7 +14,7 @@ "use strict";

exports.nodeFs = void 0;
const node_fs_1 = require("./node-fs");
__exportStar(require("./node-fs"), exports);
__exportStar(require("./watch-service"), exports);
exports.nodeFs = node_fs_1.createNodeFs();
const node_fs_js_1 = require("./node-fs.js");
__exportStar(require("./node-fs.js"), exports);
__exportStar(require("./watch-service.js"), exports);
exports.nodeFs = (0, node_fs_js_1.createNodeFs)();
exports.default = exports.nodeFs;
//# sourceMappingURL=index.js.map
import type { IBaseFileSystem, IFileSystem } from '@file-services/types';
import { INodeWatchServiceOptions } from './watch-service';
import { INodeWatchServiceOptions } from './watch-service.js';
export interface ICreateNodeFsOptions {

@@ -4,0 +4,0 @@ watchOptions?: INodeWatchServiceOptions;

@@ -12,6 +12,6 @@ "use strict";

const utils_1 = require("@file-services/utils");
const watch_service_1 = require("./watch-service");
const watch_service_js_1 = require("./watch-service.js");
const caseSensitive = !fs_1.default.existsSync(__filename.toUpperCase());
function createNodeFs(options) {
return utils_1.createFileSystem(createBaseNodeFs(options));
return (0, utils_1.createFileSystem)(createBaseNodeFs(options));
}

@@ -24,3 +24,3 @@ exports.createNodeFs = createNodeFs;

cwd: process_1.cwd,
watchService: new watch_service_1.NodeWatchService(options && options.watchOptions),
watchService: new watch_service_js_1.NodeWatchService(options && options.watchOptions),
caseSensitive,

@@ -30,3 +30,3 @@ ...fs_1.default,

...fs_1.default.promises,
exists: util_1.promisify(fs_1.default.exists),
exists: (0, util_1.promisify)(fs_1.default.exists),
},

@@ -33,0 +33,0 @@ };

@@ -124,3 +124,3 @@ "use strict";

if (pathStats.isFile()) {
const fileWatcher = fs_1.watch(path, watchOptions, (type) => this.onPathEvent(type, path));
const fileWatcher = (0, fs_1.watch)(path, watchOptions, (type) => this.onPathEvent(type, path));
fileWatcher.once('error', (e) => {

@@ -132,3 +132,3 @@ this.onWatchError(e, path);

else if (pathStats.isDirectory()) {
const directoryWatcher = fs_1.watch(path, watchOptions, (type, fileName) => {
const directoryWatcher = (0, fs_1.watch)(path, watchOptions, (type, fileName) => {
this.onDirectoryEvent(type, path, fileName).catch;

@@ -158,3 +158,3 @@ });

const directoryStats = await this.statSafe(directoryPath);
this.onPathEvent(eventType, directoryStats ? path_1.join(directoryPath, fileName) : directoryPath);
this.onPathEvent(eventType, directoryStats ? (0, path_1.join)(directoryPath, fileName) : directoryPath);
}

@@ -161,0 +161,0 @@ async statSafe(nodePath) {

{
"name": "@file-services/node",
"description": "Node.js file system implementation.",
"version": "5.3.1",
"version": "5.4.0",
"main": "dist/index.js",

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

"dependencies": {
"@file-services/types": "^5.3.1",
"@file-services/utils": "^5.3.1"
"@file-services/types": "^5.4.0",
"@file-services/utils": "^5.4.0"
},

@@ -22,3 +22,3 @@ "files": [

"engines": {
"node": ">=10.12.0"
"node": ">=12"
},

@@ -25,0 +25,0 @@ "license": "MIT",

@@ -1,8 +0,8 @@

import { createNodeFs } from './node-fs';
import { createNodeFs } from './node-fs.js';
import type { IFileSystem } from '@file-services/types';
export * from './node-fs';
export * from './watch-service';
export * from './node-fs.js';
export * from './watch-service.js';
export const nodeFs: IFileSystem = createNodeFs();
export default nodeFs;

@@ -8,3 +8,3 @@ import fs from 'fs';

import type { IBaseFileSystem, IFileSystem, IFileSystemPath } from '@file-services/types';
import { NodeWatchService, INodeWatchServiceOptions } from './watch-service';
import { NodeWatchService, INodeWatchServiceOptions } from './watch-service.js';

@@ -11,0 +11,0 @@ const caseSensitive = !fs.existsSync(__filename.toUpperCase());

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