Skip to content

Commit a180214

Browse files
chore: migrate from pnpm to bun (#31)
1 parent 1dadb14 commit a180214

9 files changed

Lines changed: 2594 additions & 10967 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,24 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16-
- name: Setup pnpm
17-
uses: pnpm/action-setup@v4
16+
- name: Setup Bun
17+
uses: oven-sh/setup-bun@v1
18+
with:
19+
bun-version: latest
1820

1921
- name: Setup Node.js
2022
uses: actions/setup-node@v4
2123
with:
2224
node-version: "24"
23-
cache: "pnpm"
2425

2526
- name: Install dependencies
26-
run: pnpm install --frozen-lockfile
27+
run: bun install --frozen-lockfile
2728

2829
- name: Lint
29-
run: pnpm lint
30+
run: bun run lint
3031

3132
- name: Test all packages
32-
run: pnpm -r --filter './packages/*' test
33+
run: bun run --filter './packages/*' test
3334

3435
test-dart:
3536
runs-on: ubuntu-latest

.github/workflows/deploy-vercel.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
paths:
77
- "apps/mcp-cafe24-admin-example/**"
88
- "packages/**"
9-
- "pnpm-lock.yaml"
10-
- "pnpm-workspace.yaml"
9+
- "bun.lock"
10+
- "package.json"
1111
- ".github/workflows/vercel.yml"
1212

1313
concurrency:
@@ -26,15 +26,16 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v4
2828

29-
- uses: pnpm/action-setup@v4
29+
- uses: oven-sh/setup-bun@v1
30+
with:
31+
bun-version: latest
3032

3133
- uses: actions/setup-node@v4
3234
with:
3335
node-version: 24
34-
cache: pnpm
3536

3637
- name: Install dependencies (workspace)
37-
run: pnpm -w install --frozen-lockfile
38+
run: bun install --frozen-lockfile
3839

3940
- name: Debug Vercel Project
4041
run: |

.github/workflows/deploy.yml

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,49 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@v4
2323

24-
- name: Setup pnpm
25-
uses: pnpm/action-setup@v4
24+
- name: Setup Bun
25+
uses: oven-sh/setup-bun@v1
26+
with:
27+
bun-version: latest
2628

2729
- name: Setup Node.js
2830
uses: actions/setup-node@v4
2931
with:
3032
node-version: "22"
31-
cache: "pnpm"
3233

3334
- name: Install dependencies
34-
run: pnpm install
35+
run: bun install
3536

3637
- name: Build all packages
37-
run: pnpm -r --filter './packages/*' build
38+
run: bun run --filter './packages/*' build
3839

3940
- name: Build all apps
40-
run: pnpm -r --filter './apps/*' --filter '!./apps/mcp-cafe24-admin-example' build
41+
run: |
42+
for app in apps/*; do
43+
if [ "$app" == "apps/mcp-cafe24-admin-example" ]; then continue; fi
44+
if [ -d "$app" ]; then
45+
echo "Building $app..."
46+
bun run --filter "./$app" build
47+
fi
48+
done
4149
4250
- name: Merge all apps to deploy directory
4351
run: |
4452
mkdir -p deploy_dist
4553
46-
pnpm -r --filter './apps/*' --filter '!./apps/mcp-cafe24-admin-example' exec -- sh -c '
47-
if [ -d "out" ]; then
48-
app_dir=$(basename $(pwd))
49-
echo "Copying $app_dir..."
50-
cp -r out "../../deploy_dist/$app_dir"
54+
for app in apps/*; do
55+
if [ "$app" == "apps/mcp-cafe24-admin-example" ]; then continue; fi
56+
if [ -d "$app" ]; then
57+
(
58+
cd "$app"
59+
if [ -d "out" ]; then
60+
app_dir=$(basename $(pwd))
61+
echo "Copying $app_dir..."
62+
cp -r out "../../deploy_dist/$app_dir"
63+
fi
64+
)
5165
fi
52-
'
66+
done
5367
5468
- name: Generate index.html
5569
run: |
@@ -93,14 +107,20 @@ jobs:
93107
<ul class="app-list">
94108
EOF
95109
96-
pnpm -r --filter './apps/*' --filter '!./apps/mcp-cafe24-admin-example' exec -- sh -c '
97-
app_name=$(basename $(pwd))
98-
echo " <li class=\"app-item\">" >> ../../deploy_dist/index.html
99-
echo " <a href=\"/pkgs/${app_name}/\" class=\"app-link\">" >> ../../deploy_dist/index.html
100-
echo " 🚀 ${app_name} →" >> ../../deploy_dist/index.html
101-
echo " </a>" >> ../../deploy_dist/index.html
102-
echo " </li>" >> ../../deploy_dist/index.html
103-
'
110+
for app in apps/*; do
111+
if [ "$app" == "apps/mcp-cafe24-admin-example" ]; then continue; fi
112+
if [ -d "$app" ]; then
113+
(
114+
cd "$app"
115+
app_name=$(basename $(pwd))
116+
echo " <li class=\"app-item\">" >> ../../deploy_dist/index.html
117+
echo " <a href=\"/pkgs/${app_name}/\" class=\"app-link\">" >> ../../deploy_dist/index.html
118+
echo " 🚀 ${app_name} →" >> ../../deploy_dist/index.html
119+
echo " </a>" >> ../../deploy_dist/index.html
120+
echo " </li>" >> ../../deploy_dist/index.html
121+
)
122+
fi
123+
done
104124
105125
cat >> deploy_dist/index.html << EOF
106126
</ul>

.github/workflows/release.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,39 @@ jobs:
4646
HAS_NPM=$(echo "$PATHS" | jq -r '[.[] | select(endswith("-dart") | not)] | length > 0')
4747
echo "has_npm_packages=$HAS_NPM" >> $GITHUB_OUTPUT
4848
49-
- name: Setup pnpm
49+
- name: Setup Bun
5050
if: steps.check-npm.outputs.has_npm_packages == 'true'
51-
uses: pnpm/action-setup@v4
51+
uses: oven-sh/setup-bun@v1
52+
with:
53+
bun-version: latest
5254

5355
- name: Setup Node.js
5456
if: steps.check-npm.outputs.has_npm_packages == 'true'
5557
uses: actions/setup-node@v4
5658
with:
5759
node-version: "24"
58-
cache: "pnpm"
5960
registry-url: "https://registry.npmjs.org"
6061

6162
- name: Install dependencies
6263
if: steps.check-npm.outputs.has_npm_packages == 'true'
63-
run: pnpm install --frozen-lockfile
64+
run: bun install --frozen-lockfile
6465

6566
- name: Build all packages
6667
if: steps.check-npm.outputs.has_npm_packages == 'true'
67-
run: pnpm -r --filter './packages/*' build
68+
run: bun run --filter './packages/*' build
6869

6970
- name: Publish changed packages
7071
if: steps.check-npm.outputs.has_npm_packages == 'true'
71-
run: pnpm -r publish --access public --no-git-checks --filter './packages/*' --filter '!./packages/*-dart'
72+
run: |
73+
PATHS='${{ needs.release-please.outputs.paths_released }}'
74+
for pkg in $(echo "$PATHS" | jq -r '.[]'); do
75+
if [[ "$pkg" == packages/* ]] && [[ "$pkg" != *"-dart" ]]; then
76+
echo "Publishing $pkg..."
77+
cd "$pkg"
78+
bun publish --access public
79+
cd -
80+
fi
81+
done
7282
env:
7383
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7484

0 commit comments

Comments
 (0)