Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/public-feet-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@pnpm/npm-resolver": patch
---

Improve the error messages related to `trustPolicy` mismatch.
2 changes: 1 addition & 1 deletion pkg-manifest/read-package-json/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pnpm add @pnpm/read-package-json
## Usage

```ts
import readPackageJson from '@pnpm/read-package-json'
import { readPackageJson } from '@pnpm/read-package-json'

const pkgJson = await readPackageJson('package.json')
```
Expand Down
4 changes: 3 additions & 1 deletion resolving/npm-resolver/src/trustChecks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
}
Expand Down
Loading