@ledge/errors
Advanced tools
+50
-45
| { | ||
| "name": "@ledge/errors", | ||
| "version": "3.0.0", | ||
| "description": "Error utils for Node.js", | ||
| "homepage": "https://github.com/zackschuster/errors", | ||
| "author": "Zack Schuster (https://github.com/zackschuster)", | ||
| "repository": "zackschuster/errors", | ||
| "bugs": { | ||
| "url": "https://github.com/zackschuster/errors/issues" | ||
| }, | ||
| "license": "GPL-3.0", | ||
| "files": [ | ||
| "index.ts", | ||
| "src" | ||
| ], | ||
| "main": "index.ts", | ||
| "types": "index.ts", | ||
| "engines": { | ||
| "node": ">= 8.3.0" | ||
| }, | ||
| "scripts": { | ||
| "test": "ava test/*.ts" | ||
| }, | ||
| "devDependencies": { | ||
| "@ledge/configs": "10.0.1", | ||
| "@ledge/types": "4.1.0", | ||
| "ava": "1.0.0-beta.8", | ||
| "ts-node": "7.0.1", | ||
| "tslint": "5.11.0", | ||
| "typescript": "3.0.3" | ||
| }, | ||
| "keywords": [ | ||
| "error", | ||
| "errors", | ||
| "errnoexception", | ||
| "typescript" | ||
| ], | ||
| "ava": { | ||
| "compileEnhancements": false, | ||
| "extensions": [ | ||
| "ts" | ||
| ], | ||
| "require": [ | ||
| "ts-node/register" | ||
| ] | ||
| } | ||
| "name": "@ledge/errors", | ||
| "version": "3.0.1", | ||
| "description": "Error utils for Node.js", | ||
| "homepage": "https://github.com/zackschuster/errors", | ||
| "author": "Zack Schuster (https://github.com/zackschuster)", | ||
| "repository": "zackschuster/errors", | ||
| "bugs": { | ||
| "url": "https://github.com/zackschuster/errors/issues" | ||
| }, | ||
| "license": "GPL-3.0", | ||
| "files": [ | ||
| "index.ts", | ||
| "src" | ||
| ], | ||
| "main": "index.ts", | ||
| "types": "index.ts", | ||
| "engines": { | ||
| "node": ">= 8.3.0" | ||
| }, | ||
| "scripts": { | ||
| "test": "ava test/*.ts" | ||
| }, | ||
| "dependencies": { | ||
| "@ledge/is-windows": "2.0.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@ledge/configs": "11.0.0", | ||
| "@ledge/types": "4.1.0", | ||
| "ava": "1.0.0-beta.8", | ||
| "esm": "3.0.84", | ||
| "ts-node": "7.0.1", | ||
| "tslint": "5.11.0", | ||
| "typescript": "3.1.3" | ||
| }, | ||
| "keywords": [ | ||
| "error", | ||
| "errors", | ||
| "errnoexception", | ||
| "typescript" | ||
| ], | ||
| "ava": { | ||
| "compileEnhancements": false, | ||
| "extensions": [ | ||
| "ts" | ||
| ], | ||
| "require": [ | ||
| "esm", | ||
| "./test/_register.js" | ||
| ] | ||
| } | ||
| } |
+6
-4
@@ -0,5 +1,7 @@ | ||
| import isWindows from '@ledge/is-windows'; | ||
| /** | ||
| * System error codes | ||
| */ | ||
| export enum Errno { | ||
| export const enum Errno { | ||
| EHOSTDOWN = 'EHOSTDOWN', | ||
@@ -81,3 +83,3 @@ EOF = 'EOF', | ||
| EMLINK = 'EMLINK', | ||
| }; | ||
| } | ||
@@ -170,3 +172,3 @@ /** | ||
| // Fortunately, its value is always 64 so it's possible albeit icky to hard-code it. | ||
| EHOSTDOWN = process.platform === 'win32' || process.env.OSTYPE === 'cygwin' || process.env.OSTYPE === 'msys' ? -4031 : -64, | ||
| }; | ||
| EHOSTDOWN = isWindows() ? -4031 : -64, | ||
| } |
@@ -12,9 +12,9 @@ import { Errno, UVErrno } from './enums'; | ||
| super(message); | ||
| }; | ||
| } | ||
| } | ||
| export function errnoException( | ||
| message: string = 'An exception occurred.', | ||
| path: string = __dirname, | ||
| code: Errno = Errno.EIO | ||
| message = 'An exception occurred.', | ||
| path = __dirname, | ||
| code = Errno.EIO, | ||
| ) { | ||
@@ -21,0 +21,0 @@ const error = new ErrnoException('ErrnoException', message, path, code, UVErrno[code]); |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
203
0.5%2
-50%0
-100%7806
-0.55%1
Infinity%7
16.67%+ Added
+ Added