@rushstack/node-core-library
Advanced tools
Comparing version 3.47.0 to 3.48.0
@@ -652,2 +652,6 @@ /// <reference types="node" /> | ||
/** | ||
* Returns true if the error object indicates the target is a directory (`EISDIR`). | ||
*/ | ||
static isDirectoryError(error: Error): boolean; | ||
/** | ||
* Returns true if the error object indicates that the `unlink` system call failed | ||
@@ -654,0 +658,0 @@ * due to a permissions issue (`EPERM`). |
@@ -946,2 +946,8 @@ "use strict"; | ||
/** | ||
* Returns true if the error object indicates the target is a directory (`EISDIR`). | ||
*/ | ||
static isDirectoryError(error) { | ||
return FileSystem.isErrnoException(error) && error.code === 'EISDIR'; | ||
} | ||
/** | ||
* Returns true if the error object indicates that the `unlink` system call failed | ||
@@ -1076,2 +1082,6 @@ * due to a permissions issue (`EPERM`). | ||
} | ||
else if (FileSystem.isDirectoryError(error)) { | ||
// eslint-disable-line @typescript-eslint/no-use-before-define | ||
error.message = `Target is a folder, not a file: ${error.path}\n${error.message}`; | ||
} | ||
} | ||
@@ -1078,0 +1088,0 @@ } |
{ | ||
"name": "@rushstack/node-core-library", | ||
"version": "3.47.0", | ||
"version": "3.48.0", | ||
"description": "Core libraries that every NodeJS toolchain project should use", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@rushstack/eslint-config": "2.6.1", | ||
"@rushstack/eslint-config": "2.6.2", | ||
"@rushstack/heft": "0.45.6", | ||
@@ -28,0 +28,0 @@ "@rushstack/heft-node-rig": "1.9.7", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
979191
12904