[Documentation] Add note that yarn.lock migration preserves versions in old lockfile
- [x] I'd be willing to implement this feature (contributing guide)
- [x] This feature is important to have in this repository; a contrib plugin wouldn't do
Describe the user story
While following the migration steps (which are really great!), I was unsure if running yarn install would keep all the versions locked in the old yarn.lock format.
Tracking down this comment confirmed that it does preserve all of those package versions: https://github.com/yarnpkg/berry/issues/596#issuecomment-556034716
Yarn will automatically migrate the lockfile and reuse the versions that are already stored inside. We'll still need to make network requests to retrieve the necessary information that weren't part of the v1 format, but apart from that keeping the lockfile is advised.
Describe the solution you'd like
Add a note in the docs that people migrating to Yarn 2 can point to in order to reassure themselves and/or their coworkers that the versions of dependencies installed will not change.
This could be added to the line Run yarn install to migrate the lockfile in https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/getting-started/migration.md or to the Q&A
I have migrated v1 to v4, had same concern so it will really help. If not knowing that the versions are kept. Had to ran a big quality assurance test.
This issue can be closed, as migration step mentions running yarn install to migrate the lockfile.
- Source: https://github.com/yarnpkg/berry/blob/bfa6489467e0e11ee87268e01e38e4f7e8d4d4b0/packages/docusaurus/docs/getting-started/migrating/steps.mdx?plain=1#L26
- Docs: https://yarnpkg.com/migration/guide#migration-steps
You're right, the reason I missed it is probably because I'm not a native English speaker. Agree that the issue can be closed.