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

@file-services/node

Package Overview
Dependencies
Maintainers
2
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 1.0.0 to 1.0.1

28

cjs/node-fs.js

@@ -5,11 +5,17 @@ "use strict";

};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = __importDefault(require("path"));
const fs_1 = __importDefault(require("fs"));
const util_1 = require("util");
const process_1 = require("process");
const fs_1 = __importStar(require("fs"));
const utils_1 = require("@file-services/utils");
const watch_service_1 = require("./watch-service");
const { promises, existsSync, exists } = fs_1.default;
const caseSensitive = !existsSync(__filename.toUpperCase());
const caseSensitive = !fs_1.existsSync(__filename.toUpperCase());
function createNodeFs(options) {

@@ -22,3 +28,17 @@ return utils_1.createFileSystem(createBaseNodeFs(options));

chdir: process_1.chdir,
cwd: process_1.cwd, watchService: new watch_service_1.NodeWatchService(options && options.watchOptions), caseSensitive }, fs_1.default, { promises: Object.assign({}, promises, { exists: util_1.promisify(exists) }) });
cwd: process_1.cwd, watchService: new watch_service_1.NodeWatchService(options && options.watchOptions), caseSensitive }, fs_1.default, { promises: {
copyFile: util_1.promisify(fs_1.copyFile),
lstat: util_1.promisify(fs_1.lstat),
mkdir: util_1.promisify(fs_1.mkdir),
readFile: util_1.promisify(fs_1.readFile),
readdir: util_1.promisify(fs_1.readdir),
readlink: util_1.promisify(fs_1.readlink),
realpath: util_1.promisify(fs_1.realpath),
rename: util_1.promisify(fs_1.rename),
rmdir: util_1.promisify(fs_1.rmdir),
stat: util_1.promisify(fs_1.stat),
unlink: util_1.promisify(fs_1.unlink),
writeFile: util_1.promisify(fs_1.writeFile),
exists: util_1.promisify(fs_1.exists)
} });
}

@@ -25,0 +45,0 @@ exports.createBaseNodeFs = createBaseNodeFs;

3

cjs/watch-service.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("util");
const path_1 = require("path");
const fs_1 = require("fs");
const utils_1 = require("@file-services/utils");
const { stat } = fs_1.promises;
const stat = util_1.promisify(fs_1.stat);
class NodeWatchService {

@@ -8,0 +9,0 @@ /**

{
"name": "@file-services/node",
"description": "Node.js file system implementation.",
"version": "1.0.0",
"version": "1.0.1",
"main": "cjs/index.js",

@@ -10,5 +10,2 @@ "types": "cjs/index.d.ts",

"build": "ts-build ./src --cjs",
"lint": "run-p lint:src lint:test",
"lint:src": "tslint -p src",
"lint:test": "tslint -p test",
"test": "mocha -r @ts-tools/node/r \"test/**/*.spec.ts?(x)\" --watch-extensions ts,tsx --colors --timeout 10000",

@@ -18,4 +15,4 @@ "prepack": "yarn build"

"dependencies": {
"@file-services/types": "^1.0.0",
"@file-services/utils": "^1.0.0"
"@file-services/types": "^1.0.1",
"@file-services/utils": "^1.0.1"
},

@@ -36,3 +33,3 @@ "files": [

},
"gitHead": "b7770933845945aa3e9fe054c4ecbfb46b0c12c9"
"gitHead": "81f93fdc7b06ba209ae43cfd5dc34d87c33c6638"
}
import path from 'path';
import fs from 'fs';
import { promisify } from 'util';
import { chdir, cwd } from 'process';
import fs, {
copyFile,
existsSync,
exists,
lstat,
mkdir,
readFile,
readdir,
readlink,
realpath,
rename,
rmdir,
stat,
unlink,
writeFile
} from 'fs';

@@ -10,4 +25,2 @@ import { createFileSystem } from '@file-services/utils';

const { promises, existsSync, exists } = fs;
const caseSensitive = !existsSync(__filename.toUpperCase());

@@ -32,3 +45,14 @@

promises: {
...promises,
copyFile: promisify(copyFile),
lstat: promisify(lstat),
mkdir: promisify(mkdir),
readFile: promisify(readFile),
readdir: promisify(readdir),
readlink: promisify(readlink),
realpath: promisify(realpath),
rename: promisify(rename),
rmdir: promisify(rmdir),
stat: promisify(stat),
unlink: promisify(unlink),
writeFile: promisify(writeFile),
exists: promisify(exists)

@@ -35,0 +59,0 @@ }

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

import { promisify } from 'util';
import { join } from 'path';
import { promises, watch, FSWatcher } from 'fs';
import { stat as statCb, watch, FSWatcher } from 'fs';
import { IWatchService, WatchEventListener, IWatchEvent, IFileSystemStats } from '@file-services/types';
import { SetMultiMap } from '@file-services/utils';
const { stat } = promises;
const stat = promisify(statCb);

@@ -8,0 +9,0 @@ export interface INodeWatchServiceOptions {

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