The open source coding agent.
TypeScript
upgrade opentui to 0.1.91 (#19440)
Sebastian608607256716
diff --git a/bun.lock b/bun.lockindex 2a837b9d6a6..cef387b732d 100644--- a/bun.lock+++ b/bun.lock@@ -338,8 +338,8 @@"@opencode-ai/sdk": "workspace:*","@opencode-ai/util": "workspace:*","@openrouter/ai-sdk-provider": "2.3.3",- "@opentui/core": "0.1.90",- "@opentui/solid": "0.1.90",+ "@opentui/core": "0.1.91",+ "@opentui/solid": "0.1.91","@parcel/watcher": "2.5.1","@pierre/diffs": "catalog:","@solid-primitives/event-bus": "1.1.2",@@ -428,16 +428,16 @@"zod": "catalog:",},"devDependencies": {- "@opentui/core": "0.1.90",- "@opentui/solid": "0.1.90",+ "@opentui/core": "0.1.91",+ "@opentui/solid": "0.1.91","@tsconfig/node22": "catalog:","@types/node": "catalog:","@typescript/native-preview": "catalog:","typescript": "catalog:",},"peerDependencies": {- "@opentui/core": ">=0.1.90",- "@opentui/solid": ">=0.1.90",+ "@opentui/core": ">=0.1.91",+ "@opentui/solid": ">=0.1.91",},"optionalPeers": ["@opentui/core",@@ -1459,21 +1459,21 @@"@opentelemetry/api": ["@opentelemetry/[email protected]", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="],- "@opentui/core": ["@opentui/[email protected]", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "diff": "8.0.2", "jimp": "1.6.0", "marked": "17.0.1", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.1.90", "@opentui/core-darwin-x64": "0.1.90", "@opentui/core-linux-arm64": "0.1.90", "@opentui/core-linux-x64": "0.1.90", "@opentui/core-win32-arm64": "0.1.90", "@opentui/core-win32-x64": "0.1.90", "bun-webgpu": "0.1.5", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-Os2dviqWVETU3kaK36lbSvdcI93GAWhw0xb9ng/d0DWYuM9scRmAhLHiOayp61saWv/BR8OJXeuQYHvrp5rd6A=="],+ "@opentui/core": ["@opentui/[email protected]", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "diff": "8.0.2", "jimp": "1.6.0", "marked": "17.0.1", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.1.91", "@opentui/core-darwin-x64": "0.1.91", "@opentui/core-linux-arm64": "0.1.91", "@opentui/core-linux-x64": "0.1.91", "@opentui/core-win32-arm64": "0.1.91", "@opentui/core-win32-x64": "0.1.91", "bun-webgpu": "0.1.5", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-xkuBDChHix3lHESQZTWXnPi0c8aANtg0567te3Am2O9EB3V1afKYdOYRV7RrzC+VBNmkymD8dUN+jzLkEUnAEw=="],- "@opentui/core-darwin-arm64": ["@opentui/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-XFrm2zCg1SlHPQ5A2HX/I4dCrmTjYaCJIIpo3QuPIvZBGH3aBMdWDJh2tXw7AB5Mmh8X1K4hDkP5nlK9x0Ewow=="],+ "@opentui/core-darwin-arm64": ["@opentui/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-WlIMa832vyjHCJsteWtSDsTAOrOPw/LQjYXVPISwwKo5Puyyl9vWNsF+69eYEyFEh15u8JNNrOPK98nlXq8SOA=="],- "@opentui/core-darwin-x64": ["@opentui/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-vbDpUsnlZ+0CeVKyBBXE+l2+X1XoVncMxMOhXTiMtud2/Cwu+Vfs/g3LC/6Zv08yaytA+9g7Z8sdf0QCqFyQ4w=="],+ "@opentui/core-darwin-x64": ["@opentui/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-nFZgQrdGtEzf5GXg4YxtDzxHvSwAig2G4Qf6ySN6sU9f9eaB1NJNhOVYLNJHBVEs5qOamBee+nXYEtG6zInIFQ=="],- "@opentui/core-linux-arm64": ["@opentui/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-OTbvBTP5mVQ4uwKyuz6b59ElG+D0i1Ln+q6cVhNkLgeRLySIn1uXEzUFQGlnVgb8lFDANsn3yQmdv+R+Cpw0og=="],+ "@opentui/core-linux-arm64": ["@opentui/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-vXAcHZaS3QzEXYyvM9KoE0juSOMPPPdNrV5Fo4HAbI5BXGCkMNQJoN0j0EzoO9xwfsO+EulRSHCLVTNkvI4n8Q=="],- "@opentui/core-linux-x64": ["@opentui/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-2PJi/LLlO7tGk9Ful/n+6iBdg1RFrA9ibU7wVneE6Z1P0LCYeu7bpwMzea1TXL0eAQWPHsjTs9aPlqPxln0EJw=="],+ "@opentui/core-linux-x64": ["@opentui/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-rAJ9sOvvI9eoWHjVj6TLPDRqYPYISmfCm2TDxi67BO27+E7naJANHIIxMC7yhPAmwBof7plioL2lwl2UFXAoXw=="],- "@opentui/core-win32-arm64": ["@opentui/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-+sTRaOb7gCMZ6iLuuG4y9kzyweJzBDcIJN0Xh49ikFWTwVECDXEVtXahNGlw57avm2yYUoNzmpBjK/LV7zBj9A=="],+ "@opentui/core-win32-arm64": ["@opentui/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-teLe7uHvPnD/lOwTwZp2lUFfeT27dk6ZSLWk8hrhsAJ/Y0MyoaCUHAsg3nZ/p+I3pie5aZUR1f0vrJfaZ8ukJw=="],- "@opentui/core-win32-x64": ["@opentui/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-aVFyErckWp4oW9NJ/ZDKBUAlTlfVUiRXGP63JXFOoeqI7EYaM8uBt6rgZAJuUdFWCN2Q66WRS8Y2mk+0BJwVBg=="],+ "@opentui/core-win32-x64": ["@opentui/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-Odx9S1NYp3I2jgy5aj5k3/wb3M+yChEK7k8UUxxFt4R37V1/um8n6Cxw4nfid6T2C45KDGJ/0BYe6lGugJlnSg=="],- "@opentui/solid": ["@opentui/[email protected]", "", { "dependencies": { "@babel/core": "7.28.0", "@babel/preset-typescript": "7.27.1", "@opentui/core": "0.1.90", "babel-plugin-module-resolver": "5.0.2", "babel-preset-solid": "1.9.10", "entities": "7.0.1", "s-js": "^0.4.9" }, "peerDependencies": { "solid-js": "1.9.11" } }, "sha512-zEHDpJOTGS707ts5j4diqoWuFLSqV6yARKl1H0FJkwWOotu+rxCyksL+C0gX0jJUonAw2cjlZ2NNtZY8g78zkg=="],+ "@opentui/solid": ["@opentui/[email protected]", "", { "dependencies": { "@babel/core": "7.28.0", "@babel/preset-typescript": "7.27.1", "@opentui/core": "0.1.91", "babel-plugin-module-resolver": "5.0.2", "babel-preset-solid": "1.9.10", "entities": "7.0.1", "s-js": "^0.4.9" }, "peerDependencies": { "solid-js": "1.9.11" } }, "sha512-phqiOcmTgNy7aG7s3P6zyatrBc1f6DkuLDJmGqy6R9QuoS4Mn9MKdNQe6Ick03xRAZuaS6ZdG3kueNxIlUMTCA=="],"@oslojs/asn1": ["@oslojs/[email protected]", "", { "dependencies": { "@oslojs/binary": "1.0.0" } }, "sha512-zw/wn0sj0j0QKbIXfIlnEcTviaCzYOY3V5rAyjR6YtOByFtJiT574+8p9Wlach0lZH9fddD4yb9laEAIl4vXQA=="],diff --git a/packages/opencode/package.json b/packages/opencode/package.jsonindex b6226bac519..01a45fc159e 100644--- a/packages/opencode/package.json+++ b/packages/opencode/package.json@@ -10,6 +10,7 @@"typecheck": "tsgo --noEmit","test": "bun test --timeout 30000","build": "bun run script/build.ts",+ "upgrade-opentui": "bun run script/upgrade-opentui.ts","dev": "bun run --conditions=browser ./src/index.ts","random": "echo 'Random script updated at $(date)' && echo 'Change queued successfully' && echo 'Another change made' && echo 'Yet another change' && echo 'One more change' && echo 'Final change' && echo 'Another final change' && echo 'Yet another final change'","clean": "echo 'Cleaning up...' && rm -rf node_modules dist",@@ -101,8 +102,8 @@"@opencode-ai/sdk": "workspace:*","@opencode-ai/util": "workspace:*","@openrouter/ai-sdk-provider": "2.3.3",- "@opentui/core": "0.1.90",- "@opentui/solid": "0.1.90",+ "@opentui/core": "0.1.91",+ "@opentui/solid": "0.1.91","@parcel/watcher": "2.5.1","@pierre/diffs": "catalog:","@solid-primitives/event-bus": "1.1.2",diff --git a/packages/opencode/script/upgrade-opentui.ts b/packages/opencode/script/upgrade-opentui.tsnew file mode 100644index 00000000000..615a407745b--- /dev/null+++ b/packages/opencode/script/upgrade-opentui.ts@@ -0,0 +1,64 @@+#!/usr/bin/env bun++import path from "node:path"++const raw = process.argv[2]+if (!raw) {+ console.error("Usage: bun run script/upgrade-opentui.ts <version>")+ process.exit(1)+}++const ver = raw.replace(/^v/, "")+const root = path.resolve(import.meta.dir, "../../..")+const skip = new Set([".git", ".opencode", ".turbo", "dist", "node_modules"])+const keys = ["@opentui/core", "@opentui/solid"] as const++const files = (await Array.fromAsync(new Bun.Glob("**/package.json").scan({ cwd: root }))).filter(+ (file) => !file.split("/").some((part) => skip.has(part)),+)++const set = (cur: string) => {+ if (cur.startsWith(">=")) return `>=${ver}`+ if (cur.startsWith("^")) return `^${ver}`+ if (cur.startsWith("~")) return `~${ver}`+ return ver+}++const edit = (obj: unknown) => {+ if (!obj || typeof obj !== "object") return false+ const map = obj as Record<string, unknown>+ return keys+ .map((key) => {+ const cur = map[key]+ if (typeof cur !== "string") return false+ const next = set(cur)+ if (next === cur) return false+ map[key] = next+ return true+ })+ .some(Boolean)+}++const out = (+ await Promise.all(+ files.map(async (rel) => {+ const file = path.join(root, rel)+ const txt = await Bun.file(file).text()+ const json = JSON.parse(txt)+ const hit = [json.dependencies, json.devDependencies, json.peerDependencies].map(edit).some(Boolean)+ if (!hit) return null+ await Bun.write(file, `${JSON.stringify(json, null, 2)}\n`)+ return rel+ }),+ )+).filter((item): item is string => item !== null)++if (out.length === 0) {+ console.log("No opentui deps found")+ process.exit(0)+}++console.log(`Updated opentui to ${ver} in:`)+for (const file of out) {+ console.log(`- ${file}`)+}diff --git a/packages/plugin/package.json b/packages/plugin/package.jsonindex c0565a7a2c5..46c6900c35b 100644--- a/packages/plugin/package.json+++ b/packages/plugin/package.json@@ -21,8 +21,8 @@"zod": "catalog:"},"peerDependencies": {- "@opentui/core": ">=0.1.90",- "@opentui/solid": ">=0.1.90"+ "@opentui/core": ">=0.1.91",+ "@opentui/solid": ">=0.1.91"},"peerDependenciesMeta": {"@opentui/core": {@@ -33,8 +33,8 @@}},"devDependencies": {- "@opentui/core": "0.1.90",- "@opentui/solid": "0.1.90",+ "@opentui/core": "0.1.91",+ "@opentui/solid": "0.1.91","@tsconfig/node22": "catalog:","@types/node": "catalog:","typescript": "catalog:",