Skip to content

Commit

Permalink
ci(check-update): fix pin pnpm to v8 (#4858)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 authored Apr 23, 2024
1 parent 7d26cff commit 19f9547
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/update-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] --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
Expand Down
7 changes: 7 additions & 0 deletions scripts/update-locks.sh
Original file line number Diff line number Diff line change
@@ -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 [email protected] --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')")
Expand Down

0 comments on commit 19f9547

Please sign in to comment.