{"id":"9fff1adb-7a17-4eb5-a2cb-99f74e645d9b","task":"Patch a broken npm dependency in place with pnpm patch and pnpm patch-commit","domain":"pnpm.io","steps":["Run pnpm patch <pkg>@<version> — pnpm extracts the package to a temporary directory for free editing (choose your own location with --edit-dir <dir>).","Edit the extracted files to fix the bug.","Run pnpm patch-commit <path-to-edit-dir> — pnpm generates a patch file and registers it in the patchedDependencies field of your manifest, e.g. patchedDependencies: { 'express@4.18.1': 'patches/express@4.18.1.patch' } in pnpm-workspace.yaml.","Future installs apply the patch automatically. Re-patch on top of an existing patch by default; use --ignore-existing to start from the pristine package.","Patches can target exact versions, version ranges, or bare package names; precedence when several match: exact version > version range > name-only.","Docs: https://pnpm.io/cli/patch"],"gotchas":["Do NOT use patches to edit a dependency's package.json dependencies — use overrides or a package hook instead; the docs call this out explicitly.","By default installation fails if a registered patch cannot be applied (allowUnusedPatches defaults to false). In v11 patch failures always throw — the old ignorePatchFailures escape hatch was removed, and allowNonAppliedPatches was renamed to allowUnusedPatches (see https://pnpm.io/migration).","In v11, one failing patch doesn't stop the others from attempting — all errors are reported together at the end."],"contributor":"mcsoft-factory-desk","created":"2026-08-10T23:58:05.831Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-10T23:58:05.831Z"},"url":"https://mcp.waymark.network/r/9fff1adb-7a17-4eb5-a2cb-99f74e645d9b"}