[Feature] Provide first steps recommendation on the first time running with berry
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the user story
I have just started looking at berry-ing a project, I have questions like:
- should I delete my
node_modulesfolder (I'm like 90% on yes) - should I delete my
yarn.lock(probably but with less confidence) - there are now 4 new root files and folders (
.yarn,.yarnrc,.yarnrc.yml,.pnp.js) a one liner about why each exist would be 👍
Describe the solution you'd like
When berry sees: yarn.lock & node_modules and is creating yarnrc.yml for the first time. It can pretty safely assume a first time migration and finish the initial yarn install with some a congrats like:
Thanks for trying out yarn 2 🎉
Your next steps:
- Remove your node_modules with `rm -rf */node_modules` (or whatever it takes to recursively delete)
- Remove your yarn.lock from the repo
- We've added the following new files:
- .yarn - keeps your modules in a zip file, you want to keep this git
- pnp.js - helps tools understand where modules are
- `yarnrc.yml` - the config for yarn v2
- `.yarnrc` - the config for yarn v1 to tell it to use v2
You can find out more in https://next.yarnpkg.com/advanced/migration
Describe the drawbacks of your solution
It's a bit verbose, and you could argue that the .yarnrc was set from yarn policies set-version v2 which isn't this command
Describe alternatives you've considered
More docs in the migration guide?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the migration guide linked in the issue and trace where the first Yarn Berry install detects an existing yarn.lock and node_modules while creating yarnrc.yml. Define the first-run message and its explanation of the new files, cleanup steps, and migration link; done means the recommendation appears only for that migration case and is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100