-
Notifications
You must be signed in to change notification settings - Fork 0
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
Yarn4 migration #212
Yarn4 migration #212
Conversation
9e66dda
to
0b5833a
Compare
930dd22
to
27a86bb
Compare
|
||
# Yarn directories | ||
node_modules/* | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/versions |
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.
Followed docs from https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
We should add the |
agreed |
@@ -36,5 +36,11 @@ | |||
"vite": "^4.5.5", | |||
"vue-eslint-parser": "^9.4.2", | |||
"vue-tsc": "^1.8.5" | |||
}, | |||
"packageManager": "yarn@4.5.1+sha256.dc2e45a77f87a9c2a76708d098ab54ca0cfdd5ec2cf7d9e3c1f24bf786a2383c", |
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.
(do you need to specify yarn version berry to run tox -e binary or just tox?).
Locally I am able to run tox
and tox -e binary
in a terminal with yarn v1.22.0
and still have it build correctly so long as I am using node 20+
with corepack
enabled. I believe this line is why.
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.
After some investigation, yes this line combined with corepack
is the magic. Once it is enabled corepack is able to detect the correct yarn version. I have updated the ci yaml to reflect this.
Corepack is also what allows us to switch to different projects using different versions without manually setting a new version each time. Huzzah!
27a86bb
to
94aba11
Compare
c643f3b
to
8771bd7
Compare
This moves the project from yarn version 1 to yarn version 4.5.1. It uses the "plug 'n' play" installation workflow which eliminates the
node_modules
directory and uses a global cache for packages.Setup
corepack enable
run-->This step shouldn't be necessaryyarn set version berry
yarn
You may need to manually delete your
node_modules
directory.