Skip to content

Add Yarn V3/4 Package Updater - #875

Merged
orto17 merged 5 commits into
jfrog:devfrom
orto17:feature/yarn-fix-support
Sep 14, 2026
Merged

orto17 merged 5 commits into
jfrog:devfrom
orto17:feature/yarn-fix-support

Conversation

@orto17

@orto17 orto17 commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Regenerates yarn.lock only via 'yarn install --mode=update-lockfile', rejecting Yarn 1.x/2.x and missing/broken yarn executables as unsupported rather than failing, and rolling back package.json on install failure. Runs from the workspace root so a fix in a member updates the single root yarn.lock, and cleans up install-time artifacts (.yarn/install-state.gz, .pnp.cjs, .yarn/cache) that '--mode=update-lockfile' can still leave behind.

  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....
  • All static analysis checks passed.
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • Updated the Contributing page / ReadMe page / CI Workflow files if needed.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

  • Adds YarnPackageUpdater: fixes a direct-dependency violation by editing package.json and regenerating yarn.lock only, via yarn install --mode=update-lockfile — no full install, no node_modules, no lifecycle scripts.
  • Supports Yarn 3.x/4.x only. Yarn 1.x/2.x, indirect-dependency violations, and a runner with no usable Yarn are reported as unsupported (ErrUnsupportedFix) rather than failing the run or being silently skipped.
  • Runs from the workspace root, not the descriptor's own directory — a fix in a workspace member updates that member's package.json and the single root yarn.lock.
  • Rolls back package.json if the install fails, leaving the working tree untouched.
  • Cleans up install-time bookkeeping (.yarn/install-state.gz, .pnp.cjs, .yarn/cache) that --mode=update-lockfile can still leave behind, when not already present before the fix.
  • Adds techutils.Yarn to SupportedFixTechnologies.

Regenerates yarn.lock only via 'yarn install --mode=update-lockfile',
rejecting Yarn 1.x/2.x and missing/broken yarn executables as unsupported
rather than failing, and rolling back package.json on install failure.
Runs from the workspace root so a fix in a member updates the single root
yarn.lock, and cleans up install-time artifacts (.yarn/install-state.gz,
.pnp.cjs, .yarn/cache) that '--mode=update-lockfile' can still leave behind.
@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 9668561e-aa84-478d-aa32-3a0503c8b7d5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@orto17 orto17 added new feature Automatically generated release notes safe to test Approve running integration tests on a pull request labels Sep 8, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Sep 8, 2026
@orto17 orto17 added the safe to test Approve running integration tests on a pull request label Sep 8, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Sep 8, 2026
@orto17 orto17 added the safe to test Approve running integration tests on a pull request label Sep 8, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Sep 8, 2026
@orto17 orto17 added the safe to test Approve running integration tests on a pull request label Sep 8, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Sep 8, 2026
Comment thread remediation_test.go Resolved
Comment thread remediation_test.go Resolved
Comment thread remediation_test.go Resolved
@orto17 orto17 added the safe to test Approve running integration tests on a pull request label Sep 10, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Sep 10, 2026
@orto17
orto17 requested a review from Jordanh1996 September 10, 2026 10:48
@orto17
orto17 merged commit 35aa4bf into jfrog:dev Sep 14, 2026
65 of 66 checks passed

This branch had an error being deployed

1 failed deployment
frogbot — 7b811485 Deployed Sep 10, 2026 by orto17 via scan-pull-request #4500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants