Skip to content

Commit 69af0c1

Browse files
authored
ci: upgrade pnpm/action-setup to v5 and read version from package.json (#1785)
* ci: upgrade pnpm/action-setup to v6 and read version from package.json Removes hardcoded pnpm version (10.14.0) from all workflows and instead reads the version from the packageManager field in package.json, so CI stays in sync with the version used locally. * ci: update setup-workflow-dev composite action to use pnpm/action-setup@v6 Also removes the pnpm-version input since the action now reads the version from package.json#packageManager. * ci: downgrade pnpm/action-setup to v5 v6 installs pnpm 11 RC/beta, which has a regression (pnpm/pnpm#11264, pnpm/action-setup#225/#227/#228) that causes 'ERR_PNPM_BROKEN_LOCKFILE: expected a single document in the stream' when the project's packageManager pins a 10.x pnpm version. v5 is the latest stable release before v6 and supports reading the version from package.json#packageManager.
1 parent 417c493 commit 69af0c1

7 files changed

Lines changed: 9 additions & 31 deletions

File tree

.github/actions/setup-workflow-dev/action.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ inputs:
66
description: 'Node.js version to use'
77
required: false
88
default: '22.x'
9-
pnpm-version:
10-
description: 'pnpm version to use'
11-
required: false
12-
default: '10.14.0'
139
setup-rust:
1410
description: 'Whether to setup Rust toolchain'
1511
required: false
@@ -37,9 +33,7 @@ runs:
3733
toolchain: stable
3834

3935
- name: Setup pnpm
40-
uses: pnpm/action-setup@v3
41-
with:
42-
version: ${{ inputs.pnpm-version }}
36+
uses: pnpm/action-setup@v5
4337

4438
- name: Setup Node.js ${{ inputs.node-version }}
4539
uses: actions/setup-node@v4

.github/workflows/backport.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ jobs:
2929
token: ${{ steps.app-token.outputs.token }}
3030

3131
- name: Setup pnpm
32-
uses: pnpm/action-setup@v3
33-
with:
34-
version: 10.14.0
32+
uses: pnpm/action-setup@v5
3533

3634
- name: Setup Node.js
3735
uses: actions/setup-node@v4

.github/workflows/debug-windows.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ jobs:
2727
target: wasm32-unknown-unknown
2828

2929
- name: Setup pnpm
30-
uses: pnpm/action-setup@v3
31-
with:
32-
version: 10.14.0
30+
uses: pnpm/action-setup@v5
3331

3432
- name: Setup Node.js 22.x
3533
uses: actions/setup-node@v4

.github/workflows/docs-checks.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ jobs:
2626
uses: actions/checkout@v4
2727

2828
- name: Setup pnpm
29-
uses: pnpm/action-setup@v3
30-
with:
31-
version: 10.14.0
29+
uses: pnpm/action-setup@v5
3230

3331
- name: Setup Node.js 22.x
3432
uses: actions/setup-node@v4
@@ -57,9 +55,7 @@ jobs:
5755
uses: actions/checkout@v4
5856

5957
- name: Setup pnpm
60-
uses: pnpm/action-setup@v3
61-
with:
62-
version: 10.14.0
58+
uses: pnpm/action-setup@v5
6359

6460
- name: Setup Node.js 22.x
6561
uses: actions/setup-node@v4

.github/workflows/lint.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ jobs:
4747
uses: actions/checkout@v4
4848

4949
- name: Setup pnpm
50-
uses: pnpm/action-setup@v3
51-
with:
52-
version: 10.14.0
50+
uses: pnpm/action-setup@v5
5351

5452
- name: Setup Node.js 22.x
5553
uses: actions/setup-node@v4

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ jobs:
4242
git config user.email "${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com"
4343
4444
- name: Setup pnpm
45-
uses: pnpm/action-setup@v3
46-
with:
47-
version: 10.14.0
45+
uses: pnpm/action-setup@v5
4846

4947
- name: Setup Node.js 24.x
5048
uses: actions/setup-node@v4

.github/workflows/tests.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ jobs:
160160
ref: ${{ github.event.pull_request.head.sha || github.sha }}
161161

162162
- name: Setup pnpm
163-
uses: pnpm/action-setup@v3
164-
with:
165-
version: 10.14.0
163+
uses: pnpm/action-setup@v5
166164

167165
- name: Setup Node.js 22.x
168166
uses: actions/setup-node@v4
@@ -601,9 +599,7 @@ jobs:
601599
target: wasm32-unknown-unknown
602600

603601
- name: Setup pnpm
604-
uses: pnpm/action-setup@v3
605-
with:
606-
version: 10.14.0
602+
uses: pnpm/action-setup@v5
607603

608604
- name: Setup Node.js 22.x
609605
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)