@knit/nice-errors
Advanced tools
+10
-15
@@ -1,7 +0,11 @@ | ||
| /* @flow weak */ | ||
| "use strict"; | ||
| const chalk = require("chalk"); | ||
| const log = require("@knit/logger"); | ||
| const { serializeError } = require("serialize-error"); | ||
| const { | ||
| serializeError | ||
| } = require("serialize-error"); | ||
| exports.niceStackTrace = stack => { | ||
@@ -11,3 +15,2 @@ const stackLines = stack.split("\n"); | ||
| const stackLineRx = /^.*?at ((.*) )?\(?(.*?)(:(.*?):(.*?))?\)?$/; | ||
| stackLines.forEach(line => { | ||
@@ -17,15 +20,7 @@ const match = stackLineRx.exec(line); | ||
| if (match && match.length >= 5) { | ||
| console.log( | ||
| " ", | ||
| chalk.yellow( | ||
| [match[3].split("/").pop(), match[5]].filter(Boolean).join(":") | ||
| ), | ||
| chalk.white(match[2]) | ||
| ); | ||
| console.log(" ", chalk.yellow([match[3].split("/").pop(), match[5]].filter(Boolean).join(":")), chalk.white(match[2])); | ||
| } | ||
| if (match && match.length >= 6) { | ||
| console.log( | ||
| " ", | ||
| chalk.grey([match[3], match[5], match[6]].filter(Boolean).join(":")) | ||
| ); | ||
| console.log(" ", chalk.grey([match[3], match[5], match[6]].filter(Boolean).join(":"))); | ||
| } | ||
@@ -45,2 +40,2 @@ }); | ||
| err.stack && exports.niceStackTrace(err.stack); | ||
| }; | ||
| }; |
+24
-2
| { | ||
| "homepage": "https://github.com/knitjs/knit#readme", | ||
| "license": "MIT", | ||
| "author": { | ||
| "name": "Shane Wilson" | ||
| }, | ||
| "bugs": { | ||
| "url": "https://github.com/knitjs/knit/issues" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/knitjs/knit.git" | ||
| }, | ||
| "engines": { | ||
| "node": ">=10", | ||
| "npm": ">=5" | ||
| }, | ||
| "private": false, | ||
| "name": "@knit/nice-errors", | ||
| "description": "Nice cli errors", | ||
| "version": "0.8.1" | ||
| "description": "Nicer cli errors", | ||
| "version": "0.8.2", | ||
| "dependencies": { | ||
| "@knit/logger": "0.8.2", | ||
| "chalk": "3.0.0-beta.1", | ||
| "serialize-error": "^5.0.0" | ||
| } | ||
| } |
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
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
No License Found
LicenseLicense information could not be found.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1838
27.82%0
-100%1
-66.67%1
-50%0
-100%3
Infinity%30
-21.05%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added