@pnpm/render-peer-issues
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -24,5 +24,7 @@ "use strict"; | ||
for (const [peerName, issues] of Object.entries(bad)) { | ||
for (const { parents, foundVersion, wantedRange } of issues) { | ||
// eslint-disable-next-line | ||
createTree(projects[projectId], parents, `${chalk_1.default.red('✕ unmet peer')} ${formatNameAndRange(peerName, wantedRange)}: found ${foundVersion}`); | ||
for (const issue of issues) { | ||
createTree(projects[projectId], issue.parents, formatUnmetPeerMessage({ | ||
peerName, | ||
...issue, | ||
})); | ||
} | ||
@@ -48,6 +50,17 @@ } | ||
const title = chalk_1.default.white(projectKey); | ||
return `${(0, archy_1.default)(toArchyData(title, project))}${summaries.join('\n')}`; | ||
}).join('\n\n'); | ||
let summariesConcatenated = summaries.join('\n'); | ||
if (summariesConcatenated) { | ||
summariesConcatenated += '\n'; | ||
} | ||
return `${(0, archy_1.default)(toArchyData(title, project))}${summariesConcatenated}`; | ||
}).join('\n'); | ||
} | ||
exports.default = default_1; | ||
function formatUnmetPeerMessage({ foundVersion, peerName, wantedRange, resolvedFrom }) { | ||
const nameAndRange = formatNameAndRange(peerName, wantedRange); | ||
if (resolvedFrom && resolvedFrom.length > 0) { | ||
return `✕ unmet peer ${nameAndRange}: found ${foundVersion} in ${resolvedFrom[resolvedFrom.length - 1].name}`; | ||
} | ||
return `${chalk_1.default.yellowBright('✕ unmet peer')} ${nameAndRange}: found ${foundVersion}`; | ||
} | ||
function formatNameAndRange(name, range) { | ||
@@ -54,0 +67,0 @@ if (range.includes(' ') || range === '*') { |
{ | ||
"name": "@pnpm/render-peer-issues", | ||
"description": "Visualizes peer dependency issues", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"bugs": { | ||
@@ -25,3 +25,3 @@ "url": "https://github.com/pnpm/pnpm/issues" | ||
"dependencies": { | ||
"@pnpm/types": "7.7.1", | ||
"@pnpm/types": "7.8.0", | ||
"archy": "^1.0.0", | ||
@@ -28,0 +28,0 @@ "chalk": "^4.1.0", |
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
10809
97
+ Added@pnpm/types@7.8.0(transitive)
- Removed@pnpm/types@7.7.1(transitive)
Updated@pnpm/types@7.8.0