@pnpm/default-reporter
Advanced tools
Comparing version 6.0.0 to 6.1.0
@@ -18,3 +18,3 @@ "use strict"; | ||
function reportError(logObj) { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
if (logObj['err']) { | ||
@@ -48,7 +48,11 @@ const err = logObj['err']; | ||
default: | ||
// Errors with known error codes are printed w/o stack trace | ||
if ((_b = (_a = err.code) === null || _a === void 0 ? void 0 : _a.startsWith) === null || _b === void 0 ? void 0 : _b.call(_a, 'ERR_PNPM_')) { | ||
return formatErrorSummary(err.message); | ||
// Errors with unknown error codes are printed with stack trace | ||
if (!((_b = (_a = err.code) === null || _a === void 0 ? void 0 : _a.startsWith) === null || _b === void 0 ? void 0 : _b.call(_a, 'ERR_PNPM_'))) { | ||
return formatGenericError((_c = err.message) !== null && _c !== void 0 ? _c : logObj['message'], err.stack); | ||
} | ||
return formatGenericError(err.message || logObj['message'], err.stack); | ||
const errorSummary = formatErrorSummary(err.message); | ||
if (!logObj['message']['pkgsStack']) { | ||
return errorSummary; | ||
} | ||
return `${errorSummary}${constants_1.EOL}${formatPkgsStack(logObj['message']['pkgsStack'])}`; | ||
} | ||
@@ -59,2 +63,7 @@ } | ||
exports.default = reportError; | ||
function formatPkgsStack(pkgsStack) { | ||
return 'This error happened while installing the dependencies of ' + | ||
`${pkgsStack[0].name}@${pkgsStack[0].version}` + | ||
pkgsStack.slice(1).map(({ name, version }) => `${constants_1.EOL} at ${name}@${version}`); | ||
} | ||
function formatNoMatchingVersion(err, msg) { | ||
@@ -61,0 +70,0 @@ const meta = msg['packageMeta']; |
{ | ||
"name": "@pnpm/default-reporter", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "The default reporter of pnpm", | ||
@@ -37,5 +37,5 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@pnpm/config": "8.1.0", | ||
"@pnpm/config": "8.1.1", | ||
"@pnpm/core-loggers": "4.0.1", | ||
"@pnpm/error": "1.0.0", | ||
"@pnpm/error": "1.1.0", | ||
"@pnpm/types": "5.0.0", | ||
@@ -42,0 +42,0 @@ "@zkochan/zen-push": "1.0.0", |
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
65558
1582
+ Added@pnpm/config@8.1.1(transitive)
+ Added@pnpm/error@1.1.0(transitive)
- Removed@pnpm/config@8.1.0(transitive)
- Removed@pnpm/error@1.0.0(transitive)
Updated@pnpm/config@8.1.1
Updated@pnpm/error@1.1.0