Skip to content
Snippets Groups Projects

sg: use `package.json` `packageManager` field to check `yarn` version

Created by: valerybugakov

Context

We install yarn v1 via asdf and then use yarn v3 because of the package.json packageManager field. See more context in the yarn upgrade PR.

This PR changes the logic of the sg setup -check command for the yarn version. It parses package.json and extracts the yarn version specified in the packageManager field and compares it to the output of the yarn --version command.

Test plan

  1. yarn install
  2. ensure that yarn --version outputs 3.2.3.
  3. go run ./dev/sg setup -check passed without errors.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading