question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue
  • 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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
larixercommented, Nov 24, 2020

I have written the tool that works almost the way the topic starter @aduh95 described, it computes and stores URL of the Yarn 2 bundle and URLs of official plugins in a JSON file .pinyarn.json, it also writes a small (less than 4Kb) wrapper .pinyarn.js which you can easily review. The wrapper is responsible for downloading Yarn bundle and Yarn plugin if they have not been downloaded yet, because the wrapper is very small it does not affect Yarn 2 boot time: https://github.com/sysgears/pinyarn

3reactions
merceyzcommented, Oct 31, 2020

For the CLI you can use corepack https://github.com/nodejs/corepack. Uninstall yarn, run npm install corepack -g, and add "packageManager": "yarn@2.3.3" to your package.json and corepack will handle downloading and running the correct version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating to Yarn 2 - Heroku Dev Center
Use this article to migrate your app code locally to Yarn 2, as well your application on Heroku. The following will reference checking...
Read more >
Untitled
... used to allow you to use the Services and their features and to assist in ... advertisers offer a way to opt...
Read more >
CPRA Draft Regulations – Next Round(s)
Opt -Out Signals (Still?) Must be Honored · Businesses would no longer be required to display the “status” of one's opt-out preference signal....
Read more >
National Defense Authorization Act for Fiscal Year 2020
1263]] (B) allow Federal Government entities outside the Department of ... (I) specifies individual features for Department of Defense microelectronics; ...
Read more >
QuickBooks Online: Tag tricks you need to know - BerryDunn
The tags feature in QuickBooks Online is an easy-to-use, ... Your expense total appears in the money out (by tag) box above it....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found