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 4.1.0 to 5.0.0

dist/callbackify.d.ts

19

package.json
{
"name": "@file-services/utils",
"description": "Common file system utility functions.",
"version": "4.1.0",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "esm/index.d.ts",
"scripts": {
"clean": "rimraf ./cjs ./esm",
"build": "ts-build ./src --cjs --esm"
},
"version": "5.0.0",
"main": "dist/index.js",
"dependencies": {
"@file-services/types": "^4.1.0"
"@file-services/types": "^5.0.0"
},
"files": [
"cjs",
"esm",
"src"
"dist",
"!dist/test",
"src",
"!*/tsconfig.{json,tsbuildinfo}"
],

@@ -20,0 +15,0 @@ "license": "MIT",

@@ -84,3 +84,3 @@ import type {

} catch (e) {
const code = (e as NodeJS.ErrnoException)?.code;
const code = (e as { code?: string })?.code;
if (code === 'EISDIR') {

@@ -107,3 +107,3 @@ return;

} catch (e) {
const code = (e as NodeJS.ErrnoException)?.code;
const code = (e as { code?: string })?.code;
const isDirectoryExistsError = code === 'EISDIR' || (code === 'EEXIST' && directoryExistsSync(directoryPath));

@@ -150,3 +150,3 @@ if (!isDirectoryExistsError) {

function findFilesSync(rootDirectory: string, options: IWalkOptions = {}, filePaths: string[] = []): string[] {
const { filterFile = returnsTrue, filterDirectory = returnsTrue, printErrors } = options;
const { filterFile = returnsTrue, filterDirectory = returnsTrue } = options;

@@ -164,6 +164,3 @@ for (const nodeName of readdirSync(rootDirectory)) {

} catch (e) {
if (printErrors) {
// eslint-disable-next-line no-console
console.error(e);
}
/**/
}

@@ -284,3 +281,3 @@ }

} catch (e) {
const code = (e as NodeJS.ErrnoException)?.code;
const code = (e as { code?: string })?.code;
if (code === 'EISDIR') {

@@ -307,3 +304,3 @@ return;

} catch (e) {
const code = (e as NodeJS.ErrnoException)?.code;
const code = (e as { code?: string })?.code;
const isDirectoryExistsError =

@@ -353,3 +350,3 @@ code === 'EISDIR' || (code === 'EEXIST' && (await directoryExists(directoryPath)));

): Promise<string[]> {
const { filterFile = returnsTrue, filterDirectory = returnsTrue, printErrors } = options;
const { filterFile = returnsTrue, filterDirectory = returnsTrue } = options;

@@ -367,6 +364,3 @@ for (const nodeName of await readdir(rootDirectory)) {

} catch (e) {
if (printErrors) {
// eslint-disable-next-line no-console
console.error(e);
}
/**/
}

@@ -437,1 +431,7 @@ }

}
// to avoid having to include @types/node
interface TracedErrorConstructor extends ErrorConstructor {
stackTraceLimit?: number;
}
declare let Error: TracedErrorConstructor;
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