@file-services/utils
Advanced tools
Comparing version 4.1.0 to 5.0.0
{ | ||
"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; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64900
28
1145
1
+ Added@file-services/types@5.7.1(transitive)
- Removed@file-services/types@4.1.0(transitive)
Updated@file-services/types@^5.0.0