Skip to content

Commit 62c7520

Browse files
authored
Replace platform-specific optionalDependencies with bun devDependency (#518)
* Replace platform-specific optionalDependencies with bun devDependency Fixes #222. The bun meta-package handles platform detection internally. Rollup resolves its own platform binaries transitively. Removes ~400MB of bloat for SDK consumers. Simplifies setup-bun.mjs accordingly. * Remove setup-bun.mjs, simplify prepare script No longer needed since the bun npm package handles binary installation and PATH registration automatically.
1 parent 0af4cdc commit 62c7520

3 files changed

Lines changed: 85 additions & 451 deletions

File tree

package-lock.json

Lines changed: 83 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"examples/*"
4545
],
4646
"scripts": {
47-
"postinstall": "node scripts/setup-bun.mjs || echo 'setup-bun.mjs failed or not available'",
4847
"start": "npm run examples:dev",
4948
"generate:schemas": "tsx scripts/generate-schemas.ts && prettier --write \"src/generated/**/*\"",
5049
"sync:snippets": "bun scripts/sync-snippets.ts",
@@ -62,7 +61,7 @@
6261
"examples:start": "NODE_ENV=development npm run build && bun examples/run-all.ts start",
6362
"examples:dev": "NODE_ENV=development bun examples/run-all.ts dev",
6463
"watch": "nodemon --watch src --ext ts,tsx --exec 'bun build.bun.ts'",
65-
"prepare": "node scripts/setup-bun.mjs && npm run build && husky",
64+
"prepare": "npm run build && husky",
6665
"docs": "typedoc",
6766
"docs:watch": "typedoc --watch",
6867
"generate:screenshots": "npm run build:all && docker run --rm -e EXAMPLE -v $(pwd):/work -w /work mcr.microsoft.com/playwright:v1.57.0-noble sh -c 'apt-get update -qq && apt-get install -qq -y python3-venv curl > /dev/null && curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH=\"$HOME/.local/bin:$PATH\" && npm i -g bun && npm ci && npx playwright test tests/e2e/generate-grid-screenshots.spec.ts'",
@@ -101,6 +100,7 @@
101100
"typedoc": "^0.28.14",
102101
"typedoc-github-theme": "^0.4.0",
103102
"typescript": "^5.9.3",
103+
"bun": "^1.2.21",
104104
"zod": "^4.1.13"
105105
},
106106
"peerDependencies": {
@@ -117,25 +117,6 @@
117117
"optional": true
118118
}
119119
},
120-
"optionalDependencies": {
121-
"@oven/bun-darwin-aarch64": "^1.2.21",
122-
"@oven/bun-darwin-x64": "^1.2.21",
123-
"@oven/bun-darwin-x64-baseline": "^1.2.21",
124-
"@oven/bun-linux-aarch64": "^1.2.21",
125-
"@oven/bun-linux-aarch64-musl": "^1.2.21",
126-
"@oven/bun-linux-x64": "^1.2.21",
127-
"@oven/bun-linux-x64-baseline": "^1.2.21",
128-
"@oven/bun-linux-x64-musl": "^1.2.21",
129-
"@oven/bun-linux-x64-musl-baseline": "^1.2.21",
130-
"@oven/bun-windows-x64": "^1.2.21",
131-
"@oven/bun-windows-x64-baseline": "^1.2.21",
132-
"@rollup/rollup-darwin-arm64": "^4.53.3",
133-
"@rollup/rollup-darwin-x64": "^4.53.3",
134-
"@rollup/rollup-linux-arm64-gnu": "^4.53.3",
135-
"@rollup/rollup-linux-x64-gnu": "^4.53.3",
136-
"@rollup/rollup-win32-arm64-msvc": "^4.53.3",
137-
"@rollup/rollup-win32-x64-msvc": "^4.53.3"
138-
},
139120
"overrides": {
140121
"seroval": "1.4.1",
141122
"seroval-plugins": "1.4.2",

0 commit comments

Comments
 (0)