Skip to content

Support PNPM Auto Fix#1296

Open
orto17 wants to merge 7 commits intojfrog:v3_erfrom
orto17:pnpm_fix
Open

Support PNPM Auto Fix#1296
orto17 wants to merge 7 commits intojfrog:v3_erfrom
orto17:pnpm_fix

Conversation

@orto17
Copy link
Copy Markdown
Contributor

@orto17 orto17 commented May 4, 2026

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.
  • Update documentation about new features / new supported technologies

This PR adds support for PNPM auto-fix:

  1. The pnpm updater reada every package.json path from vulnerability evidence (same shared logic as npm), but only for paths whose basename is package.json, and skip anything under node_modules.
  2. Drops evidence entries that look like pkg@version/package.json (not real files). If nothing is left, error out.
  3. For each remaining package.json — Write the suggested fixed version into dependencies / devDependencies / optionalDependencies / overrides (keeping a backup of the file bytes).
  4. Lockfile — If pnpm-lock.yaml next to that manifest is tracked in git, cd to that folder and run pnpm install --lockfile-only --ignore-scripts --no-frozen-lockfile (with the pnpm-specific env, including Corepack workaround) so the lockfile matches the updated manifest. If that command fails, restore package.json from the backup.
  5. If the lockfile is not tracked — Leave package.json updated and skip lock regeneration (no pnpm install).

Examples for pull-requests created by the new pnpm package updater:
orto17/pnpm_example#3
orto17/pnpm_example#2

@orto17 orto17 added the safe to test Approve running integration tests on a pull request label May 4, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label May 4, 2026
@orto17 orto17 added the safe to test Approve running integration tests on a pull request label May 4, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label May 4, 2026
@orto17 orto17 added the safe to test Approve running integration tests on a pull request label May 4, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant