@pnpm/cli.default-reporter 1100.0.7 → 1100.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/reportError.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { renderPeerIssues } from '@pnpm/deps.inspection.peers-issues-renderer';
|
|
1
2
|
import { renderDedupeCheckIssues } from '@pnpm/installing.dedupe.issues-renderer';
|
|
2
3
|
import chalk from 'chalk';
|
|
3
4
|
import { equals } from 'ramda';
|
|
@@ -216,7 +217,7 @@ function formatGenericError(errorMessage, stack) {
|
|
|
216
217
|
return { title: errorMessage };
|
|
217
218
|
}
|
|
218
219
|
function formatErrorSummary(message, code) {
|
|
219
|
-
return `${chalk.bgRed.
|
|
220
|
+
return `${chalk.bgRed.red('[')}${chalk.bgRed.black(code ?? 'ERROR')}${chalk.bgRed.red(']')} ${chalk.red(message)}`;
|
|
220
221
|
}
|
|
221
222
|
function reportModifiedDependency(msg) {
|
|
222
223
|
return {
|
|
@@ -341,9 +342,7 @@ function hideSecureInfo(key, value) {
|
|
|
341
342
|
}
|
|
342
343
|
function reportPeerDependencyIssuesError(err, msg) {
|
|
343
344
|
const hasMissingPeers = getHasMissingPeers(msg.issuesByProjects);
|
|
344
|
-
const hints = [
|
|
345
|
-
'Run "pnpm peers check" to list the peer dependency issues.',
|
|
346
|
-
];
|
|
345
|
+
const hints = [];
|
|
347
346
|
if (hasMissingPeers) {
|
|
348
347
|
hints.push(`To auto-install peer dependencies, add the following to "pnpm-workspace.yaml" in your project root:
|
|
349
348
|
|
|
@@ -351,11 +350,12 @@ function reportPeerDependencyIssuesError(err, msg) {
|
|
|
351
350
|
}
|
|
352
351
|
hints.push(`To disable failing on peer dependency issues, add the following to pnpm-workspace.yaml in your project root:
|
|
353
352
|
|
|
354
|
-
strictPeerDependencies: false
|
|
355
|
-
`);
|
|
353
|
+
strictPeerDependencies: false`);
|
|
354
|
+
const formattedHints = hints.map((hint) => `hint: ${hint}`).join('\n');
|
|
355
|
+
const rendered = renderPeerIssues(msg.issuesByProjects);
|
|
356
356
|
return {
|
|
357
357
|
title: err.message,
|
|
358
|
-
body:
|
|
358
|
+
body: rendered ? `${rendered}\n${formattedHints}` : formattedHints,
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
function getHasMissingPeers(issuesByProjects) {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
export function formatWarn(message) {
|
|
3
|
-
|
|
4
|
-
// It is used instead of ' ' because chalk (as of version 2.1.0)
|
|
5
|
-
// trims whitespace at the beginning
|
|
6
|
-
return `${chalk.bgYellow.black('\u2009WARN\u2009')} ${message}`;
|
|
3
|
+
return `${chalk.bgYellow.yellow('[')}${chalk.bgYellow.black('WARN')}${chalk.bgYellow.yellow(']')} ${message}`;
|
|
7
4
|
}
|
|
8
5
|
//# sourceMappingURL=formatWarn.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/cli.default-reporter",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.8",
|
|
4
4
|
"description": "The default reporter of pnpm",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -39,11 +39,12 @@
|
|
|
39
39
|
"stacktracey": "^2.2.0",
|
|
40
40
|
"string-length": "^7.0.1",
|
|
41
41
|
"@pnpm/cli.meta": "1100.0.2",
|
|
42
|
+
"@pnpm/core-loggers": "1100.0.1",
|
|
43
|
+
"@pnpm/deps.inspection.peers-issues-renderer": "1100.0.0",
|
|
42
44
|
"@pnpm/config.reader": "1101.1.4",
|
|
43
45
|
"@pnpm/error": "1100.0.0",
|
|
44
|
-
"@pnpm/core-loggers": "1100.0.1",
|
|
45
|
-
"@pnpm/installing.dedupe.types": "1100.0.1",
|
|
46
46
|
"@pnpm/installing.dedupe.issues-renderer": "1100.0.1",
|
|
47
|
+
"@pnpm/installing.dedupe.types": "1100.0.1",
|
|
47
48
|
"@pnpm/types": "1101.0.0"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
@@ -57,8 +58,8 @@
|
|
|
57
58
|
"ghooks": "2.0.4",
|
|
58
59
|
"load-json-file": "^7.0.1",
|
|
59
60
|
"normalize-newline": "5.0.0",
|
|
60
|
-
"@pnpm/
|
|
61
|
-
"@pnpm/
|
|
61
|
+
"@pnpm/logger": "1100.0.0",
|
|
62
|
+
"@pnpm/cli.default-reporter": "1100.0.8"
|
|
62
63
|
},
|
|
63
64
|
"engines": {
|
|
64
65
|
"node": ">=22.13"
|