Skip to content

Commit 12643d8

Browse files
ochafikclaude
andcommitted
feat: add bun as optional dependency (no global install required)
- Add @oven/bun-* platform packages as optionalDependencies - Create postinstall script to set up bun binary from optional deps - Handle Windows ARM64 by downloading x64-baseline for emulation - Remove setup-bun from CI workflows (npm install handles it now) - Remove manual Bun install instructions from docs This alternative approach eliminates the need for global Bun installation or setup-bun action in CI. npm install automatically installs the platform-appropriate bun binary. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 118cfeb commit 12643d8

File tree

7 files changed

+3288
-2575
lines changed

7 files changed

+3288
-2575
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323
name: Windows x64
2424
- os: windows-11-arm
2525
name: Windows ARM64
26-
# Use x64-baseline build via emulation (native ARM64 not yet available)
27-
bun-download-url: https://github.com/oven-sh/bun/releases/latest/download/bun-windows-x64-baseline.zip
2826
- os: macos-latest
2927
name: macOS ARM64
3028

@@ -38,11 +36,6 @@ jobs:
3836
shell: bash
3937
run: '! grep -E "\"resolved\": \"https?://" package-lock.json | grep -v registry.npmjs.org'
4038

41-
- uses: oven-sh/setup-bun@v2
42-
with:
43-
bun-version: latest
44-
bun-download-url: ${{ matrix.bun-download-url }}
45-
4639
- uses: actions/setup-node@v4
4740
with:
4841
node-version: "20"
@@ -78,23 +71,16 @@ jobs:
7871
with:
7972
distribution: Ubuntu-24.04
8073

81-
- name: Install dependencies in WSL
74+
- name: Install Node.js in WSL
8275
shell: wsl-bash {0}
8376
run: |
84-
# Install Node.js and Bun
8577
sudo apt-get update
86-
sudo apt-get install -y unzip
8778
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
8879
sudo apt-get install -y nodejs
89-
curl -fsSL https://bun.sh/install | bash
90-
echo 'export BUN_INSTALL="$HOME/.bun"' >> ~/.bashrc
91-
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> ~/.bashrc
9280
9381
- name: Build and test in WSL
9482
shell: wsl-bash {0}
9583
run: |
96-
export BUN_INSTALL="$HOME/.bun"
97-
export PATH="$BUN_INSTALL/bin:$PATH"
9884
npm install
9985
npm run build
10086
npm test
@@ -114,19 +100,13 @@ jobs:
114100
name: Windows x64
115101
- os: windows-11-arm
116102
name: Windows ARM64
117-
bun-download-url: https://github.com/oven-sh/bun/releases/latest/download/bun-windows-x64-baseline.zip
118103
- os: macos-latest
119104
name: macOS ARM64
120105

121106
name: Test git install (${{ matrix.name }})
122107
runs-on: ${{ matrix.os }}
123108

124109
steps:
125-
- uses: oven-sh/setup-bun@v2
126-
with:
127-
bun-version: latest
128-
bun-download-url: ${{ matrix.bun-download-url }}
129-
130110
- uses: actions/setup-node@v4
131111
with:
132112
node-version: "20"

.github/workflows/publish.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: oven-sh/setup-bun@v2
18-
with:
19-
bun-version: latest
2017
- uses: actions/setup-node@v4
2118
with:
2219
node-version: 22

CONTRIBUTING.md

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,6 @@
22

33
We welcome contributions to the MCP Apps SDK! This document outlines the process for contributing to the project.
44

5-
## Prerequisites
6-
7-
Development requires [Bun](https://bun.sh) (used for building and testing).
8-
9-
<details>
10-
<summary><strong>macOS / Linux</strong></summary>
11-
12-
```bash
13-
curl -fsSL https://bun.sh/install | bash
14-
```
15-
16-
</details>
17-
18-
<details>
19-
<summary><strong>Windows (native)</strong></summary>
20-
21-
```powershell
22-
powershell -c "irm bun.sh/install.ps1 | iex"
23-
```
24-
25-
> **ARM64 note**: Native binaries aren't available yet; the x64 build runs via emulation.
26-
27-
</details>
28-
29-
<details>
30-
<summary><strong>Windows (WSL)</strong></summary>
31-
32-
```bash
33-
curl -fsSL https://bun.sh/install | bash
34-
```
35-
36-
</details>
37-
385
## Getting Started
396

407
1. Fork the repository

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ The [`examples/`](https://github.com/modelcontextprotocol/ext-apps/tree/main/exa
5656
To run all examples together:
5757

5858
```bash
59-
# Bun is required for development (see CONTRIBUTING.md for install instructions)
6059
npm install
6160
npm run examples:start
6261
```

0 commit comments

Comments
 (0)