diff --git a/scripts/update-all.sh b/scripts/update-all.sh index f81d38043d30..67ee7aed45da 100755 --- a/scripts/update-all.sh +++ b/scripts/update-all.sh @@ -6,11 +6,18 @@ set -eux NEW_VERSION=$(npm show prisma@$1 version) echo "$NEW_VERSION" > .github/prisma-version.txt +# Pin to v8 as latest (v9) needs Node.js v18.12 minimum +# see https://r.pnpm.io/comp +# corepack install --global pnpm@8 +# Legacy command +corepack prepare pnpm@8.15.7 --activate corepack enable # auto install correct yarn versions automatically # Pin to v8 as latest (v9) needs Node.js v18.12 minimum # see https://r.pnpm.io/comp corepack install --global pnpm@8 +pnpm -v + # first update all the versions in all the projects for perf gains pnpm -rc --parallel exec "$(pwd)/scripts/update-version.sh $NEW_VERSION" # then update all the lockfiles by running the package managers diff --git a/scripts/update-locks.sh b/scripts/update-locks.sh index 23c10d0b0eec..9d621ca0c198 100755 --- a/scripts/update-locks.sh +++ b/scripts/update-locks.sh @@ -1,10 +1,17 @@ #! /bin/sh +# Pin to v8 as latest (v9) needs Node.js v18.12 minimum +# see https://r.pnpm.io/comp +# corepack install --global pnpm@8 +# Legacy command +corepack prepare pnpm@8.15.7 --activate corepack enable # Pin to v8 as latest (v9) needs Node.js v18.12 minimum # see https://r.pnpm.io/comp corepack install --global pnpm@8 +pnpm -v + # Setting NODE_OPTIONS="" disables yarn-injected shenanigans so we can use package from the root PROJECT_PACKAGE_MANAGER=$(NODE_OPTIONS="" node -e "require('@antfu/ni').detect({ autoinstall: false }).then(console.log)") IS_GENERATED_CLIENT=$(node -e "const pkg = require('./package.json'); console.log(pkg.name === 'prisma-client')")