Skip to content

Commit

Permalink
chore: update to pnpm 8 (#20159)
Browse files Browse the repository at this point in the history
* chore: update to pnpm 8

* fix(deps): don't autoinstall peers

This fixes https://www.npmjs.com/package/prisma/v/1.0.0 being installed
as a dependency of `@prisma/client`, breaking some tests.

* Make pnpm version an input in test pipeline
  • Loading branch information
aqrln committed Jul 15, 2023
1 parent b99cbd1 commit 670fe22
Show file tree
Hide file tree
Showing 37 changed files with 7,953 additions and 7,227 deletions.
2 changes: 1 addition & 1 deletion .buildkite/publish/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ expand_headers_on_error() {
trap expand_headers_on_error ERR

echo "~~~ Install pnpm"
npm i --silent -g pnpm@7 --unsafe-perm
npm i --silent -g pnpm@8 --unsafe-perm
# --usafe-perm to allow install scripts

echo "~~~ pnpm i"
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ "$BUILDKITE_PARALLEL_JOB" = "1" ]; then
fi

echo "~~~ Install pnpm"
npm i --silent -g pnpm@7 --unsafe-perm
npm i --silent -g pnpm@8 --unsafe-perm
# --usafe-perm to allow install scripts

echo "~~~ pnpm i"
Expand Down
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"rangeStrategy": "pin",
"ignoreDeps": ["sqlite3", "@prisma/engines-version", "@prisma/prisma-schema-wasm", "redis", "@types/redis"],
"constraints": {
"pnpm": "7"
"pnpm": "8"
},
"packageRules": [
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: 8

- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -ex

npm i --silent -g pnpm@7 --unsafe-perm
npm i --silent -g pnpm@8 --unsafe-perm

pnpm i

Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/test-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ on:
description: List of query engines to run tests on as JSON array
type: string
default: '["library", "binary"]'
pnpmVersion:
description: pnpm package manager version
type: string
default: '8'
secrets:
BUILDPULSE_ACCESS_KEY_ID:
required: false
Expand Down Expand Up @@ -68,7 +72,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -159,7 +163,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -233,7 +237,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -333,7 +337,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -439,7 +443,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -511,7 +515,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -580,7 +584,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -646,7 +650,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -720,7 +724,7 @@ jobs:
- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -791,7 +795,7 @@ jobs:
- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -864,7 +868,7 @@ jobs:
- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -910,7 +914,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -1057,7 +1061,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -1148,7 +1152,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-engines-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: 8

- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-studio-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: 8

- uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
shell-emulator=true
auto-install-peers=false
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Copy paste these commands to install the global dependencies:
```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install 18
npm install --global pnpm@7 ts-node
npm install --global pnpm@8 ts-node
# For direnv see https://github.com/direnv/direnv/blob/master/docs/installation.md
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"engines": {
"node": ">=16.13",
"pnpm": ">=7.3.0 <8"
"pnpm": ">=8.6.7 <9"
},
"scripts": {
"setup": "ts-node scripts/setup.ts",
Expand Down

0 comments on commit 670fe22

Please sign in to comment.