Skip to content

Commit ba2f136

Browse files
committed
chore: switch package manager from bun to pnpm
Switch the project's package manager from bun to pnpm while keeping bun as the TS runner and test runner for now (incremental migration). Changes: - Set packageManager to pnpm@10.11.0 - Move patchedDependencies into pnpm config section - Add onlyBuiltDependencies for esbuild build script approval - Add @sentry/core and @clack/prompts as explicit devDependencies (were phantom deps hoisted by bun's flat node_modules) - Generate pnpm-lock.yaml All 6968 unit tests pass. One pre-existing test fragility (sdk.run auth test) surfaces under pnpm's strict hoisting but is unrelated to this change.
1 parent 24eebc7 commit ba2f136

7 files changed

Lines changed: 4030 additions & 46 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- 'docs/**'
6464
- 'plugins/**'
6565
- 'package.json'
66-
- 'bun.lock'
66+
- 'pnpm-lock.yaml'
6767
- '.github/workflows/ci.yml'
6868
- name: Compute build matrix
6969
id: targets
@@ -123,13 +123,14 @@ jobs:
123123
# merge SHA, always fetchable from the base repo with github.token).
124124
ref: ${{ steps.token.outcome == 'success' && (github.head_ref || github.ref_name) || '' }}
125125
- uses: oven-sh/setup-bun@v2
126+
- uses: pnpm/action-setup@v4
126127
- uses: actions/cache@v5
127128
id: cache
128129
with:
129130
path: node_modules
130-
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
131+
key: node-modules-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
131132
- if: steps.cache.outputs.cache-hit != 'true'
132-
run: bun install --frozen-lockfile
133+
run: pnpm install --frozen-lockfile
133134
- name: Generate API Schema
134135
run: bun run generate:schema
135136
- name: Generate docs and skill files
@@ -175,13 +176,14 @@ jobs:
175176
steps:
176177
- uses: actions/checkout@v6
177178
- uses: oven-sh/setup-bun@v2
179+
- uses: pnpm/action-setup@v4
178180
- uses: actions/cache@v5
179181
id: cache
180182
with:
181183
path: node_modules
182-
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
184+
key: node-modules-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
183185
- if: steps.cache.outputs.cache-hit != 'true'
184-
run: bun install --frozen-lockfile
186+
run: pnpm install --frozen-lockfile
185187
- run: bun run generate:schema
186188
- run: bun run lint
187189
- run: bun run typecheck
@@ -201,13 +203,14 @@ jobs:
201203
steps:
202204
- uses: actions/checkout@v6
203205
- uses: oven-sh/setup-bun@v2
206+
- uses: pnpm/action-setup@v4
204207
- uses: actions/cache@v5
205208
id: cache
206209
with:
207210
path: node_modules
208-
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
211+
key: node-modules-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
209212
- if: steps.cache.outputs.cache-hit != 'true'
210-
run: bun install --frozen-lockfile
213+
run: pnpm install --frozen-lockfile
211214
- name: Generate API Schema
212215
run: bun run generate:schema
213216
- name: Unit Tests
@@ -233,25 +236,16 @@ jobs:
233236
steps:
234237
- uses: actions/checkout@v6
235238
- uses: oven-sh/setup-bun@v2
239+
- uses: pnpm/action-setup@v4
236240
- uses: actions/cache@v5
237241
id: cache
238242
with:
239243
path: node_modules
240-
key: node-modules-${{ matrix.os }}-${{ hashFiles('bun.lock', 'patches/**') }}
244+
key: node-modules-${{ matrix.os }}-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
241245
- name: Install dependencies
242246
if: steps.cache.outputs.cache-hit != 'true'
243247
shell: bash
244-
run: |
245-
# Retry logic for Windows Bun patch bug (ENOTEMPTY errors)
246-
for i in 1 2 3; do
247-
if bun install --frozen-lockfile; then
248-
exit 0
249-
fi
250-
echo "Attempt $i failed, clearing Bun cache and retrying..."
251-
bun pm cache rm 2>/dev/null || true
252-
done
253-
echo "All install attempts failed"
254-
exit 1
248+
run: pnpm install --frozen-lockfile
255249
- name: Set nightly version
256250
# Inject the nightly version (computed once in the changes job) into
257251
# package.json before the build so it gets baked into the binary.
@@ -628,13 +622,14 @@ jobs:
628622
steps:
629623
- uses: actions/checkout@v6
630624
- uses: oven-sh/setup-bun@v2
625+
- uses: pnpm/action-setup@v4
631626
- uses: actions/cache@v5
632627
id: cache
633628
with:
634629
path: node_modules
635-
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
630+
key: node-modules-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
636631
- if: steps.cache.outputs.cache-hit != 'true'
637-
run: bun install --frozen-lockfile
632+
run: pnpm install --frozen-lockfile
638633
- name: Download Linux binary
639634
uses: actions/download-artifact@v8
640635
with:
@@ -664,16 +659,17 @@ jobs:
664659
steps:
665660
- uses: actions/checkout@v6
666661
- uses: oven-sh/setup-bun@v2
662+
- uses: pnpm/action-setup@v4
667663
- uses: actions/setup-node@v6
668664
with:
669665
node-version: ${{ matrix.node }}
670666
- uses: actions/cache@v5
671667
id: cache
672668
with:
673669
path: node_modules
674-
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
670+
key: node-modules-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
675671
- if: steps.cache.outputs.cache-hit != 'true'
676-
run: bun install --frozen-lockfile
672+
run: pnpm install --frozen-lockfile
677673
- name: Bundle
678674
env:
679675
# Environment-scoped (production) — see note in build-binary.
@@ -705,6 +701,7 @@ jobs:
705701
steps:
706702
- uses: actions/checkout@v6
707703
- uses: oven-sh/setup-bun@v2
704+
- uses: pnpm/action-setup@v4
708705
# Astro 6 requires Node >= 22.12. Pin an explicit version so the docs
709706
# build doesn't rely on whatever ships on the runner image.
710707
- uses: actions/setup-node@v6
@@ -714,9 +711,9 @@ jobs:
714711
id: cache
715712
with:
716713
path: node_modules
717-
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
714+
key: node-modules-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
718715
- if: steps.cache.outputs.cache-hit != 'true'
719-
run: bun install --frozen-lockfile
716+
run: pnpm install --frozen-lockfile
720717
- name: Get CLI version
721718
id: version
722719
run: echo "version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT"

.github/workflows/docs-preview.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
- uses: actions/checkout@v6
3535

3636
- uses: oven-sh/setup-bun@v2
37+
- uses: pnpm/action-setup@v4
3738

3839
# Astro 6 requires Node >= 22.12. Pin an explicit version so the docs
3940
# build doesn't rely on whatever ships on the runner image.
@@ -45,10 +46,10 @@ jobs:
4546
id: cache
4647
with:
4748
path: node_modules
48-
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
49+
key: node-modules-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
4950

5051
- if: steps.cache.outputs.cache-hit != 'true'
51-
run: bun install --frozen-lockfile
52+
run: pnpm install --frozen-lockfile
5253

5354
- name: Get CLI version
5455
id: version

.github/workflows/eval-skill-fork.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@ jobs:
3737
ref: ${{ github.event.pull_request.head.sha }}
3838

3939
- uses: oven-sh/setup-bun@v2
40+
- uses: pnpm/action-setup@v4
4041

4142
- uses: actions/cache@v5
4243
id: cache
4344
with:
4445
path: node_modules
45-
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
46+
key: node-modules-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
4647
- if: steps.cache.outputs.cache-hit != 'true'
47-
run: bun install --frozen-lockfile
48+
run: pnpm install --frozen-lockfile
4849

4950
- name: Generate docs and skill files
5051
run: bun run generate:schema && bun run generate:docs

0 commit comments

Comments
 (0)