mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-12 10:11:42 -04:00
Fixes #11439. When `strictPeerDependencies: true` causes `ERR_PNPM_PEER_DEP_ISSUES`, the peer dependency issues are again rendered inline — using the **same format as `pnpm peers check`** — so users (and CI tools like Renovate) can see what failed without running another command. The non-strict warning path is unchanged: it still emits the short "Run `pnpm peers check`" hint. ### Behavior `strictPeerDependencies: true`: ``` ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies ✕ unmet peer react Installed: 17.0.2 Wanted: ^18.2.0: react-dom@18.2.0 hint: To disable failing on peer dependency issues, add the following to pnpm-workspace.yaml in your project root: strictPeerDependencies: false ``` `strictPeerDependencies: false` (unchanged): ``` WARN Issues with peer dependencies found. Run "pnpm peers check" to list them. ``` ### Implementation - Added a new `@pnpm/deps.inspection.peers-issues-renderer` package at `deps/inspection/peers-issues-renderer/`, alongside its data producer `@pnpm/deps.inspection.peers-checker`. It exposes a single `renderPeerIssues()` that emits the flat issue list previously inlined in `pnpm peers check`. - Removed the duplicated formatter from `deps/inspection/commands/src/peers.ts` and made the `pnpm peers check` command consume the new renderer. - `cli/default-reporter/src/reportError.ts`: `reportPeerDependencyIssuesError` now calls the shared `renderPeerIssues()` and prefixes the hint block with the rendered output. Tests strip ANSI escapes before substring assertions so they stay correct under `FORCE_COLOR=1`. Result: a single renderer is shared between the install error and the `pnpm peers check` command — output is identical between the two paths.
79 lines
2.3 KiB
JSON
79 lines
2.3 KiB
JSON
{
|
|
"name": "@pnpm/cli.default-reporter",
|
|
"version": "1100.0.7",
|
|
"description": "The default reporter of pnpm",
|
|
"keywords": [
|
|
"pnpm",
|
|
"pnpm11",
|
|
"pnpm-reporter"
|
|
],
|
|
"license": "MIT",
|
|
"funding": "https://opencollective.com/pnpm",
|
|
"repository": "https://github.com/pnpm/pnpm/tree/main/cli/default-reporter",
|
|
"homepage": "https://github.com/pnpm/pnpm/tree/main/cli/default-reporter#readme",
|
|
"bugs": {
|
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
},
|
|
"type": "module",
|
|
"main": "lib/index.js",
|
|
"types": "lib/index.d.ts",
|
|
"exports": {
|
|
".": "./lib/index.js"
|
|
},
|
|
"files": [
|
|
"lib",
|
|
"!*.map"
|
|
],
|
|
"scripts": {
|
|
"start": "tsgo --watch",
|
|
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
"test": "pn compile && pn .test",
|
|
"prepublishOnly": "tsgo --build",
|
|
"compile": "tsgo --build && pn lint --fix",
|
|
".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest"
|
|
},
|
|
"dependencies": {
|
|
"@pnpm/cli.meta": "workspace:*",
|
|
"@pnpm/config.reader": "workspace:*",
|
|
"@pnpm/core-loggers": "workspace:*",
|
|
"@pnpm/deps.inspection.peers-issues-renderer": "workspace:*",
|
|
"@pnpm/error": "workspace:*",
|
|
"@pnpm/installing.dedupe.issues-renderer": "workspace:*",
|
|
"@pnpm/installing.dedupe.types": "workspace:*",
|
|
"@pnpm/types": "workspace:*",
|
|
"@pnpm/util.lex-comparator": "catalog:",
|
|
"ansi-diff": "catalog:",
|
|
"boxen": "catalog:",
|
|
"chalk": "catalog:",
|
|
"cli-truncate": "catalog:",
|
|
"normalize-path": "catalog:",
|
|
"pretty-bytes": "catalog:",
|
|
"pretty-ms": "catalog:",
|
|
"ramda": "catalog:",
|
|
"rxjs": "catalog:",
|
|
"semver": "catalog:",
|
|
"stacktracey": "catalog:",
|
|
"string-length": "catalog:"
|
|
},
|
|
"peerDependencies": {
|
|
"@pnpm/logger": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@jest/globals": "catalog:",
|
|
"@pnpm/cli.default-reporter": "workspace:*",
|
|
"@pnpm/logger": "workspace:*",
|
|
"@types/normalize-path": "catalog:",
|
|
"@types/ramda": "catalog:",
|
|
"@types/semver": "catalog:",
|
|
"ghooks": "catalog:",
|
|
"load-json-file": "catalog:",
|
|
"normalize-newline": "catalog:"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.13"
|
|
},
|
|
"jest": {
|
|
"preset": "@pnpm/jest-config"
|
|
}
|
|
}
|