Skip to content
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Upgrade to Yarn 4 #137

wants to merge 2 commits into from

Conversation

pangolingo
Copy link
Contributor

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

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`
@pangolingo
Copy link
Contributor Author

This is a low priority PR, since the codebase is doing just fine with Yarn v1.

@@ -0,0 +1 @@
nodeLinker: node-modules
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@pangolingo
Copy link
Contributor Author

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.

@pangolingo pangolingo marked this pull request as draft January 13, 2025 17:46
@pangolingo
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants