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

Migrate from Yarn v1 to Yarn v3 #846

Merged
merged 5 commits into from
Jun 24, 2022
Merged

Migrate from Yarn v1 to Yarn v3 #846

merged 5 commits into from
Jun 24, 2022

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jun 5, 2022

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

@Gudahtt Gudahtt force-pushed the upgrade-to-yarn-3 branch 4 times, most recently from 709a65a to 4598935 Compare June 6, 2022 14:09
@Gudahtt Gudahtt marked this pull request as ready for review June 6, 2022 22:59
@Gudahtt Gudahtt requested a review from a team as a code owner June 6, 2022 22:59
Copy link
Contributor

@mcmire mcmire left a 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.

README.md Outdated Show resolved Hide resolved
mcmire
mcmire previously approved these changes Jun 7, 2022
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mcmire mcmire mentioned this pull request Jun 13, 2022
37 tasks
Copy link
Contributor

@mcmire mcmire left a 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",

.yarnrc.yml Outdated Show resolved Hide resolved
Gudahtt and others added 5 commits June 22, 2022 18:20
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.
@Gudahtt
Copy link
Member Author

Gudahtt commented Jun 23, 2022

I also discovered that Prettier will attempt to lint .yarnrc.yml. Should we make this change in package.json?

Good idea! Done.

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Gudahtt Gudahtt merged commit d92bec0 into main Jun 24, 2022
@Gudahtt Gudahtt deleted the upgrade-to-yarn-3 branch June 24, 2022 10:56
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* 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]>
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* 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]>
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.

Migrate to Yarn 3
2 participants