mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-03 15:01:48 -04:00
fix: improve the error messages related to trustPolicy mismatch (#10203)
--------- Co-authored-by: Zoltan Kochan <z@kochan.io>
This commit is contained in:
5
.changeset/public-feet-hide.md
Normal file
5
.changeset/public-feet-hide.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/npm-resolver": patch
|
||||
---
|
||||
|
||||
Improve the error messages related to `trustPolicy` mismatch.
|
||||
@@ -52,7 +52,9 @@ export function failIfTrustDowngraded (
|
||||
'TRUST_DOWNGRADE',
|
||||
`High-risk trust downgrade for "${meta.name}@${version}" (possible package takeover)`,
|
||||
{
|
||||
hint: `Earlier versions had ${prettyPrintTrustEvidence(strongestEvidencePriorToRequestedVersion)}, ` +
|
||||
hint: 'Trust checks are based solely on publish date, not semver. ' +
|
||||
'A package cannot be installed if any earlier-published version had stronger trust evidence. ' +
|
||||
`Earlier versions had ${prettyPrintTrustEvidence(strongestEvidencePriorToRequestedVersion)}, ` +
|
||||
`but this version has ${prettyPrintTrustEvidence(currentTrustEvidence)}. ` +
|
||||
'A trust downgrade may indicate a supply chain incident.',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user