@dbpath/files
Advanced tools
Comparing version 0.2.8 to 0.2.9
import { ErrorsAnd } from "@dbpath/utils"; | ||
export declare function findInParent(directory: string, acceptor: (filename: string) => boolean): string | undefined; | ||
export declare function findDirectoryHoldingFileOrError(directory: string, file: string): ErrorsAnd<string>; | ||
export declare function loadFileInDirectory(cwd: string, marker: string, filename: string): any; | ||
export declare function loadFileInDirectory(cwd: string, errorString: string, marker: string, filename: string): any; | ||
export declare function findDirectoryHoldingFileOrThrow(directory: string, file: string): string; | ||
export declare function findFileInParentsOrError(directory: string, file: string): ErrorsAnd<string>; | ||
export declare function readTestFile(dir: any, file: string): string; |
@@ -53,3 +53,3 @@ "use strict"; | ||
exports.findDirectoryHoldingFileOrError = findDirectoryHoldingFileOrError; | ||
function loadFileInDirectory(cwd, marker, filename) { | ||
function loadFileInDirectory(cwd, errorString, marker, filename) { | ||
const dir = findDirectoryHoldingFileOrError(cwd, marker); | ||
@@ -65,7 +65,7 @@ if ((0, utils_1.hasErrors)(dir)) | ||
catch (e) { | ||
return [`Error parsing ${file}: ${e.message}`]; | ||
return [`Error parser ${errorString} from ${file}: ${e.message}`]; | ||
} | ||
} | ||
catch (e) { | ||
return [`Error reading ${file}: ${e.message}`]; | ||
return [`Error loading ${errorString} from ${file}: ${e.message}`]; | ||
} | ||
@@ -72,0 +72,0 @@ } |
{ | ||
"name": "@dbpath/files", | ||
"description": "", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"main": "dist/index", | ||
@@ -6,0 +6,0 @@ "types": "dist/index", |
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
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
9310