Skip to content

Conversation

@ochafik
Copy link
Collaborator

@ochafik ochafik commented Dec 12, 2025

Summary

Fixes #142 - Windows PowerShell install bug

The tradeoff

This PR requires Bun to be installed globally for development (building from source, running examples). In exchange, we get full cross-platform compatibility with CI testing on 6 environments.

For end users: No change - npm install @modelcontextprotocol/ext-apps works without Bun (uses pre-built dist from npm).

For developers: Install Bun first (see CONTRIBUTING.md for one-liner install commands per platform).

Changes

npm scripts (package.json)

  • Replace single quotes with escaped double quotes in generate:schemas (cmd.exe passes single quotes literally)
  • Simplify prettier scripts: remove redundant --ignore-path flags (prettier auto-loads .gitignore and .prettierignore)
  • Remove $(pwd) from prettier scripts (bash-only syntax)
  • Remove bun from devDependencies (was causing Windows install failures; use global Bun instead)

CI (.github/workflows/)

  • Add cross-platform build matrix: Linux x64, Linux ARM64, Windows x64, Windows ARM64, Windows WSL, macOS ARM64
  • Windows ARM64: Use x64-baseline Bun via emulation (native ARM64 not yet available)
  • Windows WSL: Full Ubuntu-based build test
  • Add test-git-install job to verify npm install git+https://... works
  • Add setup-bun to publish.yml workflow
  • Use shell: bash for grep commands (not available in Windows cmd.exe)
  • Skip examples:build on Windows (uses INPUT=... bash syntax)
  • Force LF line endings via .gitattributes

Documentation

  • Add Bun installation instructions to CONTRIBUTING.md (per-platform, collapsible)
  • Note Bun requirement in README.md examples section

CI Matrix

Platform Build Test git install
Linux x64
Linux ARM64
Windows x64
Windows ARM64 ✅ (x64 emulation)
Windows WSL
macOS ARM64

Install scenarios

Scenario Bun required?
npm install @modelcontextprotocol/ext-apps ❌ No (pre-built dist)
npm install git+https://github.com/.../ext-apps ✅ Yes (triggers build)
Clone + develop ✅ Yes

Test plan

  • Local build passes (npm run build)
  • Local tests pass (npm test)
  • Local prettier check passes (npm run prettier)
  • CI passes on all 6 platforms

🤖 Generated with Claude Code

Fixes #142 - Windows PowerShell install bug

Changes:
- Replace single quotes with escaped double quotes in generate:schemas
  (cmd.exe passes single quotes literally, breaking prettier glob matching)
- Simplify prettier scripts: remove redundant --ignore-path flags
  (prettier auto-loads .gitignore and .prettierignore by default)
- Remove $(pwd) from prettier scripts (bash-only syntax)
- Add cross-platform CI matrix: Linux x64, Windows x64, macOS ARM64, macOS x64
- Use shell: bash for grep commands in CI (not available in Windows cmd.exe)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 12, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@144

commit: 118cfeb

ochafik and others added 5 commits December 12, 2025 13:38
The bun npm package fails to install on Windows CI because it can't find
@oven/bun-windows-x64. Since we already use oven-sh/setup-bun action in CI
which installs bun globally, we don't need the npm package.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
The bun npm package tries to install platform-specific binaries which
fails on Windows CI. Since bun is installed via oven-sh/setup-bun action
in CI (and developers install it globally), we don't need the npm package.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
The examples use `INPUT=mcp-app.html vite build` which is bash syntax
for setting environment variables. This doesn't work on Windows cmd.exe.
Since examples aren't published to npm, we can skip building them on Windows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Git on Windows auto-converts line endings to CRLF, causing prettier to
report formatting issues. Force LF for all text files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
This verifies that `npm install git+https://...` works on all platforms,
which triggers the prepare script and requires bun to be available.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Added ubuntu-24.04-arm (Linux ARM64)
- Added windows-11-arm (Windows ARM64)

Note: WSL is not available on GitHub-hosted runners (requires nested
virtualization which isn't supported).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
ochafik and others added 2 commits December 12, 2025 14:14
The oven-sh/setup-bun action fails with 404 when trying to download
Bun for Windows ARM64. Re-enable when Bun adds proper support.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Uses Vampire/setup-wsl action to install Ubuntu-24.04 in WSL and run
the full build/test cycle. This tests the Linux-in-Windows scenario
that was reported in issue #142.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
ochafik and others added 5 commits December 12, 2025 14:19
The pkg-pr-new publish workflow was missing bun setup, causing
"bun: not found" errors during npm ci (which triggers prepare script).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Windows ARM64 can run x64 binaries via emulation. Use bun-download-url
to force x64-baseline build since native ARM64 Bun isn't available yet.

Reference: oven-sh/bun#9824

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
The macos-13 based runner images are now retired.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Documents that Bun is required for development, with platform-specific
install commands in collapsible sections.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ochafik ochafik force-pushed the ochafik/fix-issue-142 branch from f54014e to 17cdf09 Compare December 12, 2025 14:55
ochafik and others added 2 commits December 12, 2025 14:57
Addresses github-advanced-security review comments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows Powershell Install Bug

2 participants