Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,24 @@
"devDependencies": {
"@boneskull/typedoc-plugin-mermaid": "^0.2.0",
"@modelcontextprotocol/sdk": "1.25.2",
"@oven/bun-darwin-aarch64": "^1.2.21",
"@oven/bun-darwin-x64": "^1.2.21",
"@oven/bun-darwin-x64-baseline": "^1.2.21",
"@oven/bun-linux-aarch64": "^1.2.21",
"@oven/bun-linux-aarch64-musl": "^1.2.21",
"@oven/bun-linux-x64": "^1.2.21",
"@oven/bun-linux-x64-baseline": "^1.2.21",
"@oven/bun-linux-x64-musl": "^1.2.21",
"@oven/bun-linux-x64-musl-baseline": "^1.2.21",
"@oven/bun-windows-x64": "^1.2.21",
"@oven/bun-windows-x64-baseline": "^1.2.21",
"@playwright/test": "1.57.0",
"@rollup/rollup-darwin-arm64": "^4.53.3",
"@rollup/rollup-darwin-x64": "^4.53.3",
"@rollup/rollup-linux-arm64-gnu": "^4.53.3",
"@rollup/rollup-linux-x64-gnu": "^4.53.3",
"@rollup/rollup-win32-arm64-msvc": "^4.53.3",
"@rollup/rollup-win32-x64-msvc": "^4.53.3",
"@types/bun": "^1.3.2",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
Expand Down Expand Up @@ -117,25 +134,6 @@
"optional": true
}
},
"optionalDependencies": {
"@oven/bun-darwin-aarch64": "^1.2.21",
"@oven/bun-darwin-x64": "^1.2.21",
"@oven/bun-darwin-x64-baseline": "^1.2.21",
"@oven/bun-linux-aarch64": "^1.2.21",
"@oven/bun-linux-aarch64-musl": "^1.2.21",
"@oven/bun-linux-x64": "^1.2.21",
"@oven/bun-linux-x64-baseline": "^1.2.21",
"@oven/bun-linux-x64-musl": "^1.2.21",
"@oven/bun-linux-x64-musl-baseline": "^1.2.21",
"@oven/bun-windows-x64": "^1.2.21",
"@oven/bun-windows-x64-baseline": "^1.2.21",
"@rollup/rollup-darwin-arm64": "^4.53.3",
"@rollup/rollup-darwin-x64": "^4.53.3",
"@rollup/rollup-linux-arm64-gnu": "^4.53.3",
"@rollup/rollup-linux-x64-gnu": "^4.53.3",
"@rollup/rollup-win32-arm64-msvc": "^4.53.3",
"@rollup/rollup-win32-x64-msvc": "^4.53.3"
},
"overrides": {
"seroval": "1.4.1",
"seroval-plugins": "1.4.2",
Expand Down
14 changes: 10 additions & 4 deletions scripts/setup-bun.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env node
// Immediate log to verify script execution
console.log("[setup-bun] Script loaded");

/**
* Postinstall script to set up bun from platform-specific optional dependencies.
* Handles Windows ARM64 by downloading x64-baseline via emulation.
Expand All @@ -16,14 +13,23 @@ import {
writeFileSync,
statSync,
} from "fs";
import { join, dirname } from "path";
import { join, dirname, resolve } from "path";
import { spawnSync } from "child_process";
import { fileURLToPath } from "url";
import { get } from "https";
import { createGunzip } from "zlib";

const __dirname = dirname(fileURLToPath(import.meta.url));
const projectRoot = join(__dirname, "..");

// Skip when installed as a dependency (INIT_CWD is the user's project directory,
// not the package root). Bun is a dev-only build tool not needed by SDK consumers.
if (process.env.INIT_CWD && resolve(process.env.INIT_CWD) !== resolve(projectRoot)) {
process.exit(0);
}

// Immediate log to verify script execution
console.log("[setup-bun] Script loaded");
const nodeModules = join(projectRoot, "node_modules");
const binDir = join(nodeModules, ".bin");

Expand Down
Loading