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

Use yarn 3 #12599

Merged
merged 19 commits into from
May 6, 2022
Merged

Use yarn 3 #12599

merged 19 commits into from
May 6, 2022

Conversation

fisker
Copy link
Member

@fisker fisker commented Apr 6, 2022

Description

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker fisker mentioned this pull request Apr 6, 2022
4 tasks
@kachkaev
Copy link
Member

kachkaev commented Apr 6, 2022

The diff makes sense!

I’m using Yarn 3 in a few side projects – it works quite well with nodeLinker: node-modules. PnP support is still a bit rough, but we don’t need to use it right away.

Here is an example of a two-step migration from Yarn 1 to Yarn 3 + PnP, just for comparison:

Step 1 looks very similar to this PR.

Before we decide to use Yarn 3 in the main branch, we need to make a decision on Dependabot. Unfortunately, it does not support Yarn 3 ATM (dependabot/dependabot-core#1297). We’ll have to wait or switch to Rennovate I guess.

@kachkaev
Copy link
Member

kachkaev commented Apr 6, 2022

Do we need to keep multiple yarn.lock files? Yarn 3 has an improved ‘focus mode’ for workspaces, if I remember correctly. In theory, there can be just one yarn.lock at the top of the repo, but we'll be still able to install dependencies selectively. Maybe I'm wrong though.

@fisker
Copy link
Member Author

fisker commented Apr 6, 2022

Do we need to keep multiple yarn.lock files?

I think we do, we run release script from scripts/release and during the release it removes the one in root and reinstall everything. But I'm not sure.

@fisker
Copy link
Member Author

fisker commented Apr 6, 2022

Before we decide to use Yarn 3 in the main branch

Unfortunately, the CI log is telling us we can't, it seems yarn 3 don't support Node.js 10.

@kachkaev
Copy link
Member

kachkaev commented Apr 6, 2022

Yarn 3 don't support Node.js 10

Yeah, that's a shame. We can probably finish this PR after Prettier v3 is out then. We'll have an opportunity to drop Node 10 and 12 I guess.

@fisker fisker changed the base branch from main to next May 6, 2022 10:56
fisker added 9 commits May 6, 2022 19:09
# Conflicts:
#	.github/workflows/prod-test.yml
#	.github/workflows/validate-vendors.yml
#	scripts/release/yarn.lock
#	tests/config/install-prettier.js
#	vendors/string-width.js
#	vendors/tempy.js
#	website/yarn.lock
#	yarn.lock
@fisker fisker marked this pull request as ready for review May 6, 2022 12:27
@fisker fisker merged commit fcc8c48 into prettier:next May 6, 2022
@fisker fisker deleted the yarn-3 branch May 6, 2022 12:27
@fisker fisker mentioned this pull request May 6, 2022
4 tasks
medikoo pushed a commit to medikoo/prettier-elastic that referenced this pull request Jan 12, 2024
medikoo pushed a commit to medikoo/prettier-elastic that referenced this pull request Jan 12, 2024
medikoo pushed a commit to medikoo/prettier-elastic that referenced this pull request Jan 12, 2024
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

2 participants