From 4204b8209026a222e8bd37b2ef46e5fde57a488b Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Sun, 15 Feb 2026 20:03:14 -0500 Subject: [PATCH] fix: use wildcard for non-semver versions in plugin dependency When VERSION is not a valid SemVer (e.g., '2026-02-15-13-46'), use '*' instead of the version string to prevent npm resolution errors. --- packages/opencode/src/config/config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index 261731b8b0a..e601f1fb93f 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -253,7 +253,8 @@ export namespace Config { export async function installDependencies(dir: string) { const pkg = path.join(dir, "package.json") - const targetVersion = Installation.isLocal() ? "*" : Installation.VERSION + const isValidSemVer = /^\d+\.\d+\.\d+/.test(Installation.VERSION) + const targetVersion = Installation.isLocal() || !isValidSemVer ? "*" : Installation.VERSION const json = await Bun.file(pkg) .json()