[yarn]: Enable support for corepack offline installs

This is required to enable building from nix, as corepack cannot fetch the yarn version from npmjs.com during a build.
Thus, an offline version is required.

This also means that when upgrading yarn, also ensure to run `yarn fetch-yarn` to fetch the latest yarn version to the correct place, and commit that with your version bump.
This will ensure that the version in the repo is kept in sync with the version in package.json.
This commit is contained in:
Pyrox 2023-11-18 00:43:59 -05:00 committed by Laura Hausmann
parent 054a40d5f4
commit 33f5217fad
4 changed files with 8 additions and 2 deletions

1
.gitattributes vendored
View file

@ -40,6 +40,7 @@
*.rar filter=lfs diff=lfs merge=lfs -text
*.svg filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.webm filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text

3
.gitignore vendored
View file

@ -76,7 +76,8 @@ pnpm*
!.yarn/sdks
!.yarn/versions
!.yarn/unplugged/@discordapp-twemoji-npm-14.1.2-3097b95b97
!.yarn/corepack.tgz
# Nix Development shell items
.devenv
.direnv
.direnv

BIN
.yarn/corepack.tgz (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -33,7 +33,8 @@
"clean-all": "node ./scripts/clean-all.js",
"cleanall": "yarn clean-all",
"focus-production": "node ./scripts/focus-production.js",
"regen-version": "node ./scripts/regen-version.js"
"regen-version": "node ./scripts/regen-version.js",
"pack-yarn": "corepack pack -o .yarn/corepack.tgz"
},
"workspaces": [
"packages/backend",