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

Adds basic support for .yamlrc.yml (yarnPath only, v2) #7350

Merged
merged 1 commit into from Jun 20, 2019

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Jun 20, 2019

Summary

Ref: yarnpkg/berry#239

I'm planning to rename .yarnrc files into .yarnrc.yml in order to avoid problems where configuration for two different syntaxes / documentations would have to be used together. My hope is that it'll help the migration plan become smoother and less unpredictable.

This proposal has one drawback: the yarn-path settings. The v1 (which I expect to stay the version in the global path for some time) doesn't know how to read the .yarnrc.yml file, and to look for the yarn-path settings there. We could make the v2 write the yarn-path settings into the old .yarnrc file (rather than .yarnrc.yml), but that would require to have both .yarnrc and .yarnrc.yml at the same time when using the v2, which I'd prefer to avoid.

To solve this, my plan is to:

  1. continue to make the v1 reading the .yarnrc files
  2. update the v1 to also look for yarn-path in the .yarnrc.yml file
  3. make the v2 exclusively read/write from the .yarnrc.yml file
  4. update the v1 to make yarn policies set-version write a .yarnrc.yml when installing the v2

This diff solves 1, 2, and 3. The fourth point is optional and will be done at a later point if at all.

Test plan

Ran Yarn with a local .yarnrc.yml, worked successfully. Tests will validate that the old workflow also work.

@arcanis arcanis merged commit 11ec1bc into master Jun 20, 2019
@arcanis arcanis deleted the yarnrcyml-support branch September 18, 2019 11:42
VincentBailly pushed a commit to VincentBailly/yarn that referenced this pull request Jun 10, 2020
VincentBailly pushed a commit to VincentBailly/yarn that referenced this pull request Jun 10, 2020
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

Successfully merging this pull request may close these issues.

None yet

1 participant