-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
Migrate from Yarn v1 to Yarn v3 #846
Conversation
709a65a
to
4598935
Compare
652bc29
to
0da8306
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Co-authored-by: Elliot Winkler <[email protected]>
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
Good idea! Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Migrate from Yarn v1 to Yarn v3 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 * Replace `setup` script with new Yarn plugin 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. * Fix typo Co-authored-by: Elliot Winkler <[email protected]> * Skip linting `.yarnrc.yml` This file gets auto-generated by Yarn, so there is no need for us to lint it. * Replace plugin with "official" version The plugin has been reinstalled from the LavaMoat repository. Comments have also been removed from the `.yarnrc.yml` file. Co-authored-by: Elliot Winkler <[email protected]>
* Migrate from Yarn v1 to Yarn v3 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 * Replace `setup` script with new Yarn plugin 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. * Fix typo Co-authored-by: Elliot Winkler <[email protected]> * Skip linting `.yarnrc.yml` This file gets auto-generated by Yarn, so there is no need for us to lint it. * Replace plugin with "official" version The plugin has been reinstalled from the LavaMoat repository. Comments have also been removed from the `.yarnrc.yml` file. Co-authored-by: Elliot Winkler <[email protected]>
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