-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat: Add support for yarn berry #229
base: master
Are you sure you want to change the base?
Conversation
inputPaths = [path.join(homeDirectory, '.cache', 'yarn')] | ||
inputPaths = useYarnV1 | ||
? [path.join(homeDirectory, '.cache', 'yarn')] | ||
: [path.join(homeDirectory, '.yarn', 'berry', 'cache')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran yarn info --cache
in repository which using yarn v4 and it says that the cache is in "$HOME/.yarn/berry/cache".
@@ -127,7 +128,9 @@ const install = (opts = {}) => { | |||
return io.which('yarn', true).then(yarnPath => { | |||
console.log('yarn at "%s"', yarnPath) | |||
|
|||
const args = shouldUsePackageLock ? ['--frozen-lockfile'] : [] | |||
const args = shouldUsePackageLock | |||
? [shouldUseYarnV1 ? '--frozen-lockfile' : '--immutable'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--frozen-lockfile
is for v1 and --immutable
is for v2 and more.
@bahmutov |
Hello!
This pull request adds support for Yarn Berry, the latest version of Yarn package manager. In Yarn Berry, the
--frozen-lock-file
option has been deprecated and replaced with--immutable
. I have updated the code to use the--immutable
option and also adjusted the cache directory path to$HOME/.yarn/berry/cache
.I believe these changes are straightforward, but if you have any suggestions or improvements, please let me know. I'm open to feedback and would appreciate your insights. Thank you for considering these changes.