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

@file-services/utils

Package Overview
Dependencies
Maintainers
4
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@file-services/utils - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

34

dist/create-extended-api.js

@@ -102,13 +102,9 @@ "use strict";

const { filterFile = returnsTrue, filterDirectory = returnsTrue } = options;
for (const nodeName of readdirSync(rootDirectory)) {
const nodePath = join(rootDirectory, nodeName);
const nodeStats = statSync(nodePath, statsNoThrowOptions);
if (!nodeStats) {
continue;
}
const nodeDesc = { name: nodeName, path: nodePath, stats: nodeStats };
if (nodeStats.isFile() && filterFile(nodeDesc)) {
for (const item of readdirSync(rootDirectory, { withFileTypes: true })) {
const nodePath = join(rootDirectory, item.name);
const nodeDesc = { name: item.name, path: nodePath };
if (item.isFile() && filterFile(nodeDesc)) {
filePaths.push(nodePath);
}
else if (nodeStats.isDirectory() && filterDirectory(nodeDesc)) {
else if (item.isDirectory() && filterDirectory(nodeDesc)) {
findFilesSync(nodePath, options, filePaths);

@@ -259,16 +255,10 @@ }

const { filterFile = returnsTrue, filterDirectory = returnsTrue } = options;
for (const nodeName of await readdir(rootDirectory)) {
const nodePath = join(rootDirectory, nodeName);
try {
const nodeStats = await stat(nodePath);
const nodeDesc = { name: nodeName, path: nodePath, stats: nodeStats };
if (nodeStats.isFile() && filterFile(nodeDesc)) {
filePaths.push(nodePath);
}
else if (nodeStats.isDirectory() && filterDirectory(nodeDesc)) {
await findFiles(nodePath, options, filePaths);
}
for (const item of await readdir(rootDirectory, { withFileTypes: true })) {
const nodePath = join(rootDirectory, item.name);
const nodeDesc = { name: item.name, path: nodePath };
if (item.isFile() && filterFile(nodeDesc)) {
filePaths.push(nodePath);
}
catch (e) {
/**/
else if (item.isDirectory() && filterDirectory(nodeDesc)) {
await findFiles(nodePath, options, filePaths);
}

@@ -275,0 +265,0 @@ }

{
"name": "@file-services/utils",
"description": "Common file system utility functions.",
"version": "7.0.0",
"version": "7.0.1",
"main": "dist/index.js",
"dependencies": {
"@file-services/types": "^7.0.0"
"@file-services/types": "^7.0.1"
},

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

@@ -115,12 +115,8 @@ import type {

for (const nodeName of readdirSync(rootDirectory)) {
const nodePath = join(rootDirectory, nodeName);
const nodeStats = statSync(nodePath, statsNoThrowOptions);
if (!nodeStats) {
continue;
}
const nodeDesc: IFileSystemDescriptor = { name: nodeName, path: nodePath, stats: nodeStats };
if (nodeStats.isFile() && filterFile(nodeDesc)) {
for (const item of readdirSync(rootDirectory, { withFileTypes: true })) {
const nodePath = join(rootDirectory, item.name);
const nodeDesc: IFileSystemDescriptor = { name: item.name, path: nodePath };
if (item.isFile() && filterFile(nodeDesc)) {
filePaths.push(nodePath);
} else if (nodeStats.isDirectory() && filterDirectory(nodeDesc)) {
} else if (item.isDirectory() && filterDirectory(nodeDesc)) {
findFilesSync(nodePath, options, filePaths);

@@ -296,14 +292,9 @@ }

for (const nodeName of await readdir(rootDirectory)) {
const nodePath = join(rootDirectory, nodeName);
try {
const nodeStats = await stat(nodePath);
const nodeDesc: IFileSystemDescriptor = { name: nodeName, path: nodePath, stats: nodeStats };
if (nodeStats.isFile() && filterFile(nodeDesc)) {
filePaths.push(nodePath);
} else if (nodeStats.isDirectory() && filterDirectory(nodeDesc)) {
await findFiles(nodePath, options, filePaths);
}
} catch (e) {
/**/
for (const item of await readdir(rootDirectory, { withFileTypes: true })) {
const nodePath = join(rootDirectory, item.name);
const nodeDesc: IFileSystemDescriptor = { name: item.name, path: nodePath };
if (item.isFile() && filterFile(nodeDesc)) {
filePaths.push(nodePath);
} else if (item.isDirectory() && filterDirectory(nodeDesc)) {
await findFiles(nodePath, options, filePaths);
}

@@ -310,0 +301,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