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

Stop using yarn@1 in DCR #9421

Closed
11 tasks done
sndrs opened this issue Nov 7, 2023 · 1 comment · Fixed by #9466 or #9662
Closed
11 tasks done

Stop using yarn@1 in DCR #9421

sndrs opened this issue Nov 7, 2023 · 1 comment · Fixed by #9466 or #9662
Assignees
Labels
Milestone

Comments

@sndrs
Copy link
Member

sndrs commented Nov 7, 2023

Yarn 1 is 6 years old and went into maintenance mode 3.5 years ago.

it also hoists dependencies, which makes it very hard to know which version of a dep you'll be using, and makes transitive deps available to everyone.

we should move to a more modern package manager, in particular one that doesn't need to hoist deps, like pnpm or yarn 4

Tasks

Preview Give feedback
  1. bug reproducible
  2. dotcom-rendering run_chromatic
  3. dependencies
  4. apps-rendering dotcom-rendering run_chromatic
    sndrs
  5. DevX Seen-on-PROD apps-rendering dotcom-rendering
    sndrs
  6. Dependencies DevX dotcom-rendering
    oliverabrahams sndrs
  7. DevX dotcom-rendering
    sndrs
  8. DevX apps-rendering
    sndrs
  9. DevX apps-rendering dotcom-rendering
    sndrs
  10. DevX apps-rendering dotcom-rendering
    sndrs
@sndrs sndrs added the DevX label Nov 7, 2023
@sndrs sndrs self-assigned this Nov 7, 2023
@sndrs sndrs linked a pull request Nov 7, 2023 that will close this issue
@sndrs sndrs removed a link to a pull request Nov 7, 2023
@sndrs
Copy link
Member Author

sndrs commented Nov 7, 2023

tried out yarn@4 in DCR. it's a lot nicer than 1, especially in terms of reporting inconsistencies between peerdeps etc.

image

you can set it up to only hoist deps to the package level too, and to link to packages via a central store, which brings a lot of the benefits of pnpm's package management:

# .yarnrc.yml
nodeLinker: pnpm
nmMode: hardlinks-global

it fails installing esbuild for some reason i can't work out. have raised an issue: yarnpkg/berry#5914 (closed because it dupes an exiting one).

@sndrs sndrs changed the title Stop using yarn@1 Stop using yarn@1 in DCR Nov 7, 2023
@sndrs sndrs linked a pull request Nov 13, 2023 that will close this issue
@sndrs sndrs added this to the 👋 Yarn v1 milestone Nov 21, 2023
@mxdvl mxdvl reopened this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants