envelop icon indicating copy to clipboard operation
envelop copied to clipboard

Upgrade to Yarn v3

Open EmrysMyrddin opened this issue 3 years ago • 9 comments

Description

Upgrade to yarn V3 and replaces most simple external tools by yarn new features when possible.

Fixes #874

Type of change

Only the tooling of the project changes, nothing should change from user side.

How Has This Been Tested?

Tried every scripts localy runable and watched the CI logs if anything looks odd.

Checklist:

  • [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented on my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

Further comments

  • [x] Upgrade to yarn V3
  • [x] Ignore logs about incompatible dependencies. They are normal (esbuild-{arch})
  • [x] Fix examples peer dependency issues
  • [x] Use patch procol instead of patch-package

EmrysMyrddin avatar Oct 25 '21 16:10 EmrysMyrddin

⚠️ No Changeset found

Latest commit: 5f2f49b96b028a12b07ae90d94d25e205773cae6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Oct 25 '21 16:10 changeset-bot[bot]

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/theguild/envelop/H3Rb4eR4f4ZcgnwxLB1RXdAQYfX7
✅ Preview: https://envelop-git-fork-cuillerejs-yarn-v3-theguild.vercel.app

vercel[bot] avatar Oct 25 '21 16:10 vercel[bot]

There is stil a lot of warning about peer dependencies. This warnings are caused by missing or off range dependency in some packages we depends on.

There is 2 ways of cleaning this warning:

  • Fix the deps upstream. Should be fine for most guild packages but can be dificult for others.
  • Use the resolutions field to fix for our repo the depencies

The last solution is to just leave the warning, hoping the maintners will fix there denpendencies in the future.

Which one do you prefere ?

EmrysMyrddin avatar Oct 25 '21 16:10 EmrysMyrddin

There is stil a lot of warning about peer dependencies. This warnings are caused by missing or off range dependency in some packages we depends on.

There is 2 ways of cleaning this warning:

  • Fix the deps upstream. Should be fine for most guild packages but can be dificult for others.
  • Use the resolutions field to fix for our repo the depencies

The last solution is to just leave the warning, hoping the maintners will fix there denpendencies in the future.

Which one do you prefere ?

I think we can go with option 2 because it seems simpler and we have more control over it. @n1ru4l thoughts?

dotansimha avatar Oct 27 '21 14:10 dotansimha

yarn3 does sound cool and we tried it in https://github.com/dotansimha/graphql-yoga but there were many weird issues it was causing so we had to revert it.

saihaj avatar Jul 06 '22 17:07 saihaj

yarn3 does sound cool and we tried it in dotansimha/graphql-yoga but there were many weird issues it was causing so we had to revert it.

Agree. My current preference is pnpm.

dotansimha avatar Jul 07 '22 04:07 dotansimha

For me, the main advantages of yarn v3 is its speed and the workspaces management (which is kind of broken in yarn v1). I use it on every projet now and it's really working well with mono repos.

The tool I find very useful is deduplication and constraints. It allows to easily clean up dependencies across the entire mono-repo.

The only thing is to use the node_modules linker, PnP is not supported by lot of tools and packages.

EmrysMyrddin avatar Jul 07 '22 07:07 EmrysMyrddin

@EmrysMyrddin Can you explain what is broken in yarn1? So far I did not have any "things are broken" experiences.

n1ru4l avatar Jul 07 '22 07:07 n1ru4l

@EmrysMyrddin Can you explain what is broken in yarn1? So far I did not have any "things are broken" experiences.

For me, it's mainly issues caused by nested dependencies and yarn.lock. We noticed that npx yarn-deduplicate helps in most cases.

dotansimha avatar Jul 07 '22 08:07 dotansimha

closing this due to missing feedback from OP.

n1ru4l avatar Aug 16 '22 08:08 n1ru4l