summaryrefslogtreecommitdiffhomepage
path: root/packages/script
diff options
context:
space:
mode:
authorMichael H <[email protected]>2026-01-21 16:37:33 +1100
committerGitHub <[email protected]>2026-01-20 23:37:33 -0600
commit0f979bb87cd4d07ff70bb02323414124b009687e (patch)
tree4533b2c53e5b9857c01e25f50a435071c40a66ad /packages/script
parent96e9c89cc699849fb549b274259674245eb64991 (diff)
downloadopencode-0f979bb87cd4d07ff70bb02323414124b009687e.tar.gz
opencode-0f979bb87cd4d07ff70bb02323414124b009687e.zip
chore(opencode): Use Bun.semver instead of node-semver (#9773)
Diffstat (limited to 'packages/script')
-rw-r--r--packages/script/package.json3
-rw-r--r--packages/script/src/index.ts5
2 files changed, 3 insertions, 5 deletions
diff --git a/packages/script/package.json b/packages/script/package.json
index 08a817026..45de3bcb9 100644
--- a/packages/script/package.json
+++ b/packages/script/package.json
@@ -3,8 +3,7 @@
"name": "@opencode-ai/script",
"license": "MIT",
"devDependencies": {
- "@types/bun": "catalog:",
- "@types/semver": "catalog:"
+ "@types/bun": "catalog:"
},
"exports": {
".": "./src/index.ts"
diff --git a/packages/script/src/index.ts b/packages/script/src/index.ts
index 141b3b192..e722ba509 100644
--- a/packages/script/src/index.ts
+++ b/packages/script/src/index.ts
@@ -1,6 +1,5 @@
-import { $ } from "bun"
+import { $, semver } from "bun"
import path from "path"
-import { satisfies } from "semver"
const rootPkgPath = path.resolve(import.meta.dir, "../../../package.json")
const rootPkg = await Bun.file(rootPkgPath).json()
@@ -13,7 +12,7 @@ if (!expectedBunVersion) {
// relax version requirement
const expectedBunVersionRange = `^${expectedBunVersion}`
-if (!satisfies(process.versions.bun, expectedBunVersionRange)) {
+if (!semver.satisfies(process.versions.bun, expectedBunVersionRange)) {
throw new Error(`This script requires bun@${expectedBunVersionRange}, but you are using bun@${process.versions.bun}`)
}