Yarn: Local Yarn configurations

Created on 2 Jun 2017  路  5Comments  路  Source: yarnpkg/yarn

This is a feature proposal.

Currently yarn configuration is global. E.g. yarn config list and yarn config set version-tag-prefix will affect how yarn operates on the users system. I proposal that these instead affect local configuration just like add et al. do. Configuring global configuration would changed to be consistent with how it works for said add et al, e.g.: yarn global add .... This would have the benefit of allowing different standards co-exist on the users system. For example some projects might standardize on a v prefix before version numbers while others do not. Or varying standards around the version commit message itself. It would also allow teams to ensure all collaborators have configuration parity without any overhead. I'm sure there are other use cases.

Am I the only one with this use case? Thoughts?

cat-feature good first issue help wanted triaged

Most helpful comment

As a workaround you can manually create / edit a .yarnrc file in your project, but you don't get the convenience of being able to use the yarn config commands.

It would have been nice to have yarn config work on the local project and yarn global config to set things globally, but in the interest of backward compatibility, I'm not sure that is a change that could be made.

All 5 comments

As a workaround you can manually create / edit a .yarnrc file in your project, but you don't get the convenience of being able to use the yarn config commands.

It would have been nice to have yarn config work on the local project and yarn global config to set things globally, but in the interest of backward compatibility, I'm not sure that is a change that could be made.

@rally25rs Totally understand, it would be a tough change as I proposed! Thanks for the tip.

Yeah, that would be very convenient.
Send a PR!

Very similar to or possible duplicate of #1037.

Actually, I think this is a duplicate so closing. Reopen or contribute to the other ticket if you have more to say please :)

Was this page helpful?
0 / 5 - 0 ratings