Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deterministric yarn global install? #3823

Closed
goodwillcoding opened this issue Jul 4, 2017 · 3 comments
Closed

Deterministric yarn global install? #3823

goodwillcoding opened this issue Jul 4, 2017 · 3 comments

Comments

@goodwillcoding
Copy link

Apologies if this is the wrong forum to ask this in, but I am wondering if there has been discussion on a deterministic yarn global install with it's own lockfile. I am fairly new to Node so forgive if below is nonsense.

Need
Installing completely identical tools (and their dependencies) into global via yarn can address a number of development concerns.

Argument for it
Since global install exists, it is common in the community to use to install tools that help in development but are not necessarily every project specific. A number of these tools are superset of any project and are needed before the project is setup (npm, yarn itself being an example). Yarn would be useful for this since it would bring lock file style installs to such globals install that will help avoid issues caused by different version of the tools and their dependencies.

Argument against it
Arguably, such tools should be in devDependencies or maybe peerDependencies and are project specific.

@BYK
Copy link
Member

BYK commented Jul 5, 2017

Hey @goodwillcoding!

This looks like a feature request but not so clearly defined. I'd encourage you to have a look at https://github.com/yarnpkg/rfcs/blob/master/README.md and try submitting a refined RFC for this.

That said, I personally don't think this would be accepted nor it is a great idea. If I had a similar problem (I actually did :D), I'd collect those general tools in a common package/repo and make all project depend on that. Both problems solved. What do you think?

@swansontec
Copy link

swansontec commented Jul 11, 2017

I think yarn already does what you want. The yarn global command creates a package.json and yarn.lock file in ~/.config/yarn/global. Apart from being in a system-wide location, yarn global works in basically the same way as for any other local package. All you have to do is share ~/.config/yarn/global/yarn.lock with your team members using some method of your choice.

@goodwillcoding
Copy link
Author

@swansontec excellent point, thank you. closing issue

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

No branches or pull requests

3 participants