Migrate from Yarn v1 to Yarn v3#846
Merged
Merged
Conversation
709a65a to
4598935
Compare
652bc29 to
0da8306
Compare
mcmire
reviewed
Jun 7, 2022
Contributor
mcmire
left a comment
There was a problem hiding this comment.
One small thing, but I ran yarn install after switching to this branch and ran yarn lint, yarn test, and yarn build without a hitch. Granted, I already had v3 installed globally because of the work I've been doing, so I'd be curious to see what someone who only has v1 sees.
mcmire
reviewed
Jun 13, 2022
Contributor
mcmire
left a comment
There was a problem hiding this comment.
Noted a thing I found while working with the monorepo POC branch. I also discovered that Prettier will attempt to lint .yarnrc.yml. Should we make this change in package.json?
- "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' '**/*.yml' --ignore-path .gitignore",
+ "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' '**/*.yml' '!.yarnrc.yml' --ignore-path .gitignore",The package manager used has been upgraded from Yarn v1 to Yarn v3. All of the steps in the migration guide [1] have been followed. Effectively everything should work the same way it did before. Closes #847 [1]: https://yarnpkg.com/getting-started/migration
The old `setup` script has been replaced with a Yarn v3 plugin that will automatically run `allow-scripts` after install. We can now use `yarn install` again as normal. This was done to address a problem that happened when running `yarn setup` for the first time. If Yarn 3 wasn't installed already, it would throw an error. Yarn 3 doesn't automatically install itself until you run the `install` command directly. The `setup` script has been left behind for now so that it still works if people run it accidentally. We can remove it later once we've become accustomed to this new workflow.
This file gets auto-generated by Yarn, so there is no need for us to lint it.
The plugin has been reinstalled from the LavaMoat repository. Comments have also been removed from the `.yarnrc.yml` file.
36afcd4 to
57696ea
Compare
Member
Author
Good idea! Done. |
This was referenced Jan 9, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The package manager used has been upgraded from Yarn v1 to Yarn v3. All of the steps in the migration guide have been followed. Effectively everything should work the same way it did before.
Closes #847