Skip to content

[Feature] Allow opting-out of vendoring berry's files #969

@aduh95

Description

@aduh95
  • I'd be willing to implement this feature
  • This feature can already be implemented through a plugin

Describe the user story

I am a Yarn user, I have run yarn set version berry on my repo. Now I would like not to commit .yarn/releases; it's not my code, I am not confortable having it on my CVS; also, upgrading to a new version produces huge diffs.
One of the reason I am using Yarn, it is to avoid storing vendor files; I feel forcing users to vendor is not the way to go.

Describe the solution you'd like

We could imagine yarn set version xx keeps the actual version number on the .yarnrc.yml; when running yarn, it will first check if the yarnPath file exists, and if not, checks if a yarnVersion is defined and download it from the network. Note that it doesn't change anything for projects that vendor the file, while providing an easy opt-out (adding .yarn/ to .gitignore).

Describe the drawbacks of your solution

Besides the debat vendoring vs using a package manager, I can't think of any.

Describe alternatives you've considered

Put the .yarn folder and the .yarnrc.yml to my .gitignore and put a note on the Getting Started section of the README to run yarn set version berry...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions