-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Upgrade to Yarn 4 #137
base: main
Are you sure you want to change the base?
Upgrade to Yarn 4 #137
Conversation
Yarn 4 was released in 2023 and the stable version is 4.6.0 To upgrade to Yarn 4 we need the following changes: - update `yarn.lock` (even though there are no changes to dependencies in `package.json`) by re-running `yarn install` - add a `packageManager` config to `package.json` (done automatically with `yarn install`) - add a `yarnrc.yml` specifying node_modules (done automatically with `yarn install`) - add additional Yarn files to `.gitignore` - use the new `yarn install --immutable` instead of the deprecated `yarn install --frozen-lockfile`
This is a low priority PR, since the codebase is doing just fine with Yarn v1. |
@@ -0,0 +1 @@ | |||
nodeLinker: node-modules |
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've not added this file in repos that use yarn. Is this a new file required for v4?
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.
Yes it is. Yarn has some new configurations that they sprinkle all over the package.json and yarn config file.
CircleCI doesn't seem to have any Docker images past Node 17: https://hub.docker.com/r/circleci/node/tags?name=17 Yarn 4 requires Node 18 or newer. We'll have to skip this at least until CI is moved to GitHub actions, or just skip it completely. Yarn 4 is not essential when Yarn 1 works just fine. |
This is incorrect. See here: https://github.com/thoughtbot/fishery/pull/149/files#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47 |
Yarn 4 was released in 2023 and the stable version is 4.6.0
To upgrade to Yarn 4 we need the following changes:
yarn.lock
(even though there are no changes to dependencies inpackage.json
) by re-runningyarn install
packageManager
config topackage.json
(done automatically withyarn install
)yarnrc.yml
specifying node_modules (done automatically withyarn install
).gitignore
yarn install --immutable
instead of the deprecatedyarn install --frozen-lockfile