Prune Command Writes Old Metadata Version to Yarn Lockfile
What version of Turborepo are you using?
1.3.1
What package manager are you using / does the bug impact?
Yarn v2/v3 (node_modules linker only)
What operating system are you using?
Linux
Describe the Bug
The _metadata: version identifier is hard-coded to be 5 in the turbo prune command, however the latest version of yarn uses 7. This may cause yarn to not identify a yarn.lock file generated by turbo prune as valid.
Expected Behavior
turbo prune should generate a lockfile with the version, based on the current version of yarn being used.
To Reproduce
- Run
turbo prune. Lockfile generated will have5as theversion. - Try to run
yarn installand yarn will not recognizeout/yarn.lockand will try to generate it's own. Additionally, this means.yarn/cachecannot be used.
Obligatory #643, Yarn v3 + prune is not supported. I mentioned this issue in my comment here: https://github.com/vercel/turborepo/pull/643#issuecomment-1122855212. Our team would love to have Yarn v3 support.
With #2019 and the release of 1.5 we should now be producing the correct lockfile format for Yarn 2+. Please update turbo and try this out. Closing for now, but reopen if the issue persists.