From 33f5217fadd6c28e2f332d85c4f112d639b43f70 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sat, 18 Nov 2023 00:43:59 -0500 Subject: [PATCH] [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. --- .gitattributes | 1 + .gitignore | 3 ++- .yarn/corepack.tgz | 3 +++ package.json | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .yarn/corepack.tgz diff --git a/.gitattributes b/.gitattributes index e028b8cd2..caf34276d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore index d3ddff08c..6caa64356 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file +.direnv diff --git a/.yarn/corepack.tgz b/.yarn/corepack.tgz new file mode 100644 index 000000000..367628773 --- /dev/null +++ b/.yarn/corepack.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff082858abd560ae2329fda7d0228b9d246f9943c9947dd20a577ea3b7f65560 +size 981908 diff --git a/package.json b/package.json index 03d1a99db..c456fdbd7 100644 --- a/package.json +++ b/package.json @@ -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",