summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-09-10 03:36:42 -0400
committerDax Raad <[email protected]>2025-09-10 03:36:42 -0400
commita6265ea3d2c1d991f102ac865393a5e594986d86 (patch)
tree98be14136f1f04b82ccd4dc602b27fa6b21d2257
parentbb3f02b8bb49bce844c8668b438541fe2175e544 (diff)
downloadopencode-a6265ea3d2c1d991f102ac865393a5e594986d86.tar.gz
opencode-a6265ea3d2c1d991f102ac865393a5e594986d86.zip
upgrade to latest bun
-rw-r--r--.github/workflows/deploy.yml2
-rw-r--r--.github/workflows/format.yml2
-rw-r--r--.github/workflows/publish-vscode.yml2
-rw-r--r--.github/workflows/publish.yml2
-rw-r--r--.github/workflows/typecheck.yml2
-rw-r--r--bun.lock23
-rw-r--r--github/package.json2
-rw-r--r--package.json3
-rw-r--r--packages/opencode/package.json2
-rwxr-xr-xpackages/opencode/script/publish.ts15
-rwxr-xr-xscript/publish.ts4
11 files changed, 40 insertions, 19 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index ebbd3030b..90d440641 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -17,7 +17,7 @@ jobs:
- uses: oven-sh/setup-bun@v1
with:
- bun-version: 1.2.19
+ bun-version: 1.2.21
- run: bun install
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index f7f12c36f..e78702301 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -18,7 +18,7 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
- bun-version: 1.2.19
+ bun-version: 1.2.21
- name: Install dependencies
run: bun install
diff --git a/.github/workflows/publish-vscode.yml b/.github/workflows/publish-vscode.yml
index 5cb406f68..f40c93798 100644
--- a/.github/workflows/publish-vscode.yml
+++ b/.github/workflows/publish-vscode.yml
@@ -21,7 +21,7 @@ jobs:
- uses: oven-sh/setup-bun@v2
with:
- bun-version: 1.2.19
+ bun-version: 1.2.21
- run: git fetch --force --tags
- run: bun install -g @vscode/vsce
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index cf9c547df..645a7b504 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -37,7 +37,7 @@ jobs:
- uses: oven-sh/setup-bun@v2
with:
- bun-version: 1.2.19
+ bun-version: 1.2.21
- name: Cache ~/.bun
id: cache-bun
diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml
index 01aa398b5..2d24d45e9 100644
--- a/.github/workflows/typecheck.yml
+++ b/.github/workflows/typecheck.yml
@@ -15,7 +15,7 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
- bun-version: 1.2.19
+ bun-version: 1.2.21
- name: Install dependencies
run: bun install
diff --git a/bun.lock b/bun.lock
index 8381e898e..3846f2dbd 100644
--- a/bun.lock
+++ b/bun.lock
@@ -26,7 +26,7 @@
},
"cloud/core": {
"name": "@opencode/cloud-core",
- "version": "0.6.4",
+ "version": "0.6.10",
"dependencies": {
"@aws-sdk/client-sts": "3.782.0",
"@opencode/cloud-resource": "workspace:*",
@@ -43,7 +43,7 @@
},
"cloud/function": {
"name": "@opencode/cloud-function",
- "version": "0.6.4",
+ "version": "0.6.10",
"dependencies": {
"@ai-sdk/anthropic": "2.0.0",
"@ai-sdk/openai": "2.0.2",
@@ -69,7 +69,7 @@
},
"cloud/scripts": {
"name": "@opencode/cloud-scripts",
- "version": "0.6.4",
+ "version": "0.6.10",
"dependencies": {
"@opencode/cloud-core": "workspace:*",
"tsx": "4.20.5",
@@ -81,7 +81,7 @@
},
"packages/function": {
"name": "@opencode/function",
- "version": "0.6.4",
+ "version": "0.6.10",
"dependencies": {
"@octokit/auth-app": "8.0.1",
"@octokit/rest": "22.0.0",
@@ -96,7 +96,7 @@
},
"packages/opencode": {
"name": "opencode",
- "version": "0.6.4",
+ "version": "0.6.10",
"bin": {
"opencode": "./bin/opencode",
},
@@ -136,7 +136,7 @@
"@octokit/webhooks-types": "7.6.1",
"@standard-schema/spec": "1.0.0",
"@tsconfig/bun": "1.0.7",
- "@types/bun": "latest",
+ "@types/bun": "catalog:",
"@types/turndown": "5.0.5",
"@types/yargs": "17.0.33",
"typescript": "catalog:",
@@ -146,7 +146,7 @@
},
"packages/plugin": {
"name": "@opencode-ai/plugin",
- "version": "0.6.4",
+ "version": "0.6.10",
"dependencies": {
"@opencode-ai/sdk": "workspace:*",
},
@@ -157,7 +157,7 @@
},
"packages/sdk/js": {
"name": "@opencode-ai/sdk",
- "version": "0.6.4",
+ "version": "0.6.10",
"dependencies": {
"@hey-api/openapi-ts": "0.81.0",
},
@@ -169,7 +169,7 @@
},
"packages/web": {
"name": "@opencode/web",
- "version": "0.6.4",
+ "version": "0.6.10",
"dependencies": {
"@astrojs/cloudflare": "12.6.3",
"@astrojs/markdown-remark": "6.3.1",
@@ -217,6 +217,7 @@
"catalog": {
"@hono/zod-validator": "0.4.2",
"@tsconfig/node22": "22.0.2",
+ "@types/bun": "1.2.21",
"@types/node": "22.13.9",
"ai": "5.0.8",
"hono": "4.7.10",
@@ -492,7 +493,7 @@
"@hey-api/json-schema-ref-parser": ["@hey-api/[email protected]", "", { "dependencies": { "@jsdevtools/ono": "^7.1.3", "@types/json-schema": "^7.0.15", "js-yaml": "^4.1.0", "lodash": "^4.17.21" } }, "sha512-yktiFZoWPtEW8QKS65eqKwA5MTKp88CyiL8q72WynrBs/73SAaxlSWlA2zW/DZlywZ5hX1OYzrCC0wFdvO9c2w=="],
- "@hey-api/openapi-ts": ["@hey-api/[email protected]", "", { "dependencies": { "@hey-api/json-schema-ref-parser": "1.0.6", "ansi-colors": "4.1.3", "c12": "2.0.1", "color-support": "1.1.3", "commander": "13.0.0", "handlebars": "4.7.8", "js-yaml": "4.1.0", "open": "10.1.2", "semver": "7.7.2" }, "peerDependencies": { "typescript": "^5.5.3" }, "bin": { "openapi-ts": "bin/index.cjs" } }, "sha512-PoJukNBkUfHOoMDpN33bBETX49TUhy7Hu8Sa0jslOvFndvZ5VjQr4Nl/Dzjb9LG1Lp5HjybyTJMA6a1zYk/q6A=="],
+ "@hey-api/openapi-ts": ["@hey-api/[email protected]", "", { "dependencies": { "@hey-api/json-schema-ref-parser": "1.0.6", "ansi-colors": "4.1.3", "c12": "2.0.1", "color-support": "1.1.3", "commander": "13.0.0", "handlebars": "4.7.8", "open": "10.1.2", "semver": "7.7.2" }, "peerDependencies": { "typescript": "^5.5.3" }, "bin": { "openapi-ts": "bin/index.cjs" } }, "sha512-AC478kg36vmmrseLZNFonZ/cmXXmDzW5yWz4PVg1S8ebJsRtVRJ/QU+mtnXfzf9avN2P0pz/AO4WAe4jyFY2gA=="],
"@hono/zod-validator": ["@hono/[email protected]", "", { "peerDependencies": { "hono": ">=3.9.0", "zod": "^3.19.1" } }, "sha512-1rrlBg+EpDPhzOV4hT9pxr5+xDVmKuz6YJl+la7VCwK6ass5ldyKm5fD+umJdV2zhHD6jROoCCv8NbTwyfhT0g=="],
@@ -3082,6 +3083,8 @@
"@openauthjs/openauth/jose": ["[email protected]", "", {}, "sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ=="],
+ "@opencode-ai/sdk/@hey-api/openapi-ts": ["@hey-api/[email protected]", "", { "dependencies": { "@hey-api/json-schema-ref-parser": "1.0.6", "ansi-colors": "4.1.3", "c12": "2.0.1", "color-support": "1.1.3", "commander": "13.0.0", "handlebars": "4.7.8", "js-yaml": "4.1.0", "open": "10.1.2", "semver": "7.7.2" }, "peerDependencies": { "typescript": "^5.5.3" }, "bin": { "openapi-ts": "bin/index.cjs" } }, "sha512-PoJukNBkUfHOoMDpN33bBETX49TUhy7Hu8Sa0jslOvFndvZ5VjQr4Nl/Dzjb9LG1Lp5HjybyTJMA6a1zYk/q6A=="],
+
"@opencode/cloud-resource/@cloudflare/workers-types": ["@cloudflare/[email protected]", "", {}, "sha512-uAGZFqEBFnCiwIokxMnrrtjIkT8qyGT1LACSScEUyW7nKmtD0Viykp9QZWrIlssyEp/MDB6XsdALF8y6upxpcg=="],
"@opentelemetry/instrumentation-grpc/@opentelemetry/semantic-conventions": ["@opentelemetry/[email protected]", "", {}, "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg=="],
diff --git a/github/package.json b/github/package.json
index 3be63d331..06db814ae 100644
--- a/github/package.json
+++ b/github/package.json
@@ -4,7 +4,7 @@
"type": "module",
"private": true,
"devDependencies": {
- "@types/bun": "latest"
+ "@types/bun": "catalog:"
},
"peerDependencies": {
"typescript": "^5"
diff --git a/package.json b/package.json
index 78a0e543d..68ca4f414 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"name": "opencode",
"private": true,
"type": "module",
- "packageManager": "[email protected]",
+ "packageManager": "[email protected]",
"scripts": {
"dev": "bun run --conditions=development packages/opencode/src/index.ts",
"typecheck": "bun run --filter='*' typecheck",
@@ -17,6 +17,7 @@
"packages/sdk/js"
],
"catalog": {
+ "@types/bun": "1.2.21",
"@hono/zod-validator": "0.4.2",
"@types/node": "22.13.9",
"@tsconfig/node22": "22.0.2",
diff --git a/packages/opencode/package.json b/packages/opencode/package.json
index 4d86c23bf..93045cda1 100644
--- a/packages/opencode/package.json
+++ b/packages/opencode/package.json
@@ -19,7 +19,7 @@
"@octokit/webhooks-types": "7.6.1",
"@standard-schema/spec": "1.0.0",
"@tsconfig/bun": "1.0.7",
- "@types/bun": "latest",
+ "@types/bun": "catalog:",
"@types/turndown": "5.0.5",
"@types/yargs": "17.0.33",
"typescript": "catalog:",
diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.ts
index 0de48fe67..44af7ad9f 100755
--- a/packages/opencode/script/publish.ts
+++ b/packages/opencode/script/publish.ts
@@ -38,7 +38,20 @@ for (const [os, arch] of targets) {
await $`CGO_ENABLED=0 GOOS=${os} GOARCH=${GOARCH[arch]} go build -ldflags="-s -w -X main.Version=${version}" -o ../opencode/dist/${name}/bin/tui ../tui/cmd/opencode/main.go`.cwd(
"../tui",
)
- await $`bun build --define OPENCODE_TUI_PATH="'../../../dist/${name}/bin/tui'" --define OPENCODE_VERSION="'${version}'" --compile --target=bun-${os}-${arch} --outfile=dist/${name}/bin/opencode ./src/index.ts`
+ await Bun.build({
+ compile: {
+ target: `bun-${os}-${arch}` as any,
+ outfile: `dist/${name}/bin/opencode`,
+ execArgv: [`--user-agent=opencode/${version}`],
+ windows: {},
+ },
+ entrypoints: ["./src/index.ts"],
+ define: {
+ OPENCODE_VERSION: `'${version}'`,
+ OPENCODE_TUI_PATH: `'../../../dist/${name}/bin/tui'`,
+ },
+ })
+ // await $`bun build --define OPENCODE_TUI_PATH="'../../../dist/${name}/bin/tui'" --define OPENCODE_VERSION="'${version}'" --compile --target=bun-${os}-${arch} --outfile=dist/${name}/bin/opencode ./src/index.ts`
// Run the binary only if it matches current OS/arch
if (
process.platform === (os === "windows" ? "win32" : os) &&
diff --git a/script/publish.ts b/script/publish.ts
index c0f79bb9c..9b3ea450e 100755
--- a/script/publish.ts
+++ b/script/publish.ts
@@ -2,6 +2,10 @@
import { $ } from "bun"
+if (process.versions.bun !== "1.2.21") {
+ throw new Error("This script requires [email protected]")
+}
+
console.log("=== publishing ===\n")
const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"