diff --git a/.gitignore b/.gitignore index 10176ca152..bb8d886a6b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ __pycache__ .next .turbo/ .cursorrules +.corepack diff --git a/apps/api-reference/vercel.json b/apps/api-reference/vercel.json index 640221e917..be286409fa 100644 --- a/apps/api-reference/vercel.json +++ b/apps/api-reference/vercel.json @@ -1,7 +1,4 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^", - "env": { - "ENABLE_EXPERIMENTAL_COREPACK": "1" - } + "ignoreCommand": "../../vercel-ignore.sh" } diff --git a/apps/entropy-debugger/vercel.json b/apps/entropy-debugger/vercel.json index 640221e917..be286409fa 100644 --- a/apps/entropy-debugger/vercel.json +++ b/apps/entropy-debugger/vercel.json @@ -1,7 +1,4 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^", - "env": { - "ENABLE_EXPERIMENTAL_COREPACK": "1" - } + "ignoreCommand": "../../vercel-ignore.sh" } diff --git a/apps/insights/vercel.json b/apps/insights/vercel.json index 640221e917..be286409fa 100644 --- a/apps/insights/vercel.json +++ b/apps/insights/vercel.json @@ -1,7 +1,4 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^", - "env": { - "ENABLE_EXPERIMENTAL_COREPACK": "1" - } + "ignoreCommand": "../../vercel-ignore.sh" } diff --git a/apps/staking/vercel.json b/apps/staking/vercel.json index 640221e917..be286409fa 100644 --- a/apps/staking/vercel.json +++ b/apps/staking/vercel.json @@ -1,7 +1,4 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^", - "env": { - "ENABLE_EXPERIMENTAL_COREPACK": "1" - } + "ignoreCommand": "../../vercel-ignore.sh" } diff --git a/governance/xc_admin/packages/xc_admin_frontend/vercel.json b/governance/xc_admin/packages/xc_admin_frontend/vercel.json index 640221e917..abc38291e8 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/vercel.json +++ b/governance/xc_admin/packages/xc_admin_frontend/vercel.json @@ -1,7 +1,4 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^", - "env": { - "ENABLE_EXPERIMENTAL_COREPACK": "1" - } + "ignoreCommand": "../../../../vercel-ignore.sh" } diff --git a/packages/component-library/vercel.json b/packages/component-library/vercel.json index 4296c12cec..70aadd9bdf 100644 --- a/packages/component-library/vercel.json +++ b/packages/component-library/vercel.json @@ -1,10 +1,7 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", "buildCommand": "turbo --filter @pythnetwork/component-library build:storybook", - "ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^", + "ignoreCommand": "../../vercel-ignore.sh", "framework": null, - "outputDirectory": "storybook-static", - "env": { - "ENABLE_EXPERIMENTAL_COREPACK": "1" - } + "outputDirectory": "storybook-static" } diff --git a/vercel-ignore.sh b/vercel-ignore.sh new file mode 100755 index 0000000000..b8d93532b0 --- /dev/null +++ b/vercel-ignore.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Vercel currently does not properly enable corepack when running the +# ignoreCommand. This was recommended as a stopgap by Vercel support until they +# fix that issue. +COREPACK_ROOT="$PWD/.corepack" +COREPACK_SHIM="$COREPACK_ROOT/shim" +export COREPACK_HOME="$COREPACK_ROOT/home" +export PATH="$COREPACK_SHIM:$PATH" +mkdir -p "$COREPACK_HOME" +mkdir -p "$COREPACK_SHIM" +corepack enable --install-directory "$COREPACK_SHIM" + +exec pnpm dlx turbo-ignore --fallback=HEAD^