mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
fix(opencode): address review feedback on the 2.2.5 pin
Document ocm 0.6.x as requiring OpenCode 2.2.5, matching its @opencode/theme peer, and make the package compatibility test check bounded peer ranges instead of treating them as one version. Linked servers on another 2.x release keep the neutral version notice, while a different major version is shown as unsupported again through a shared version badge. The Docker build now fails when the bundled OpenCode is below the supported minimum, and the entrypoint falls back to the bundled version as the floor when OPENCODE_MIN_VERSION is unset instead of discarding every persisted binary.
This commit is contained in:
1 parent
807c7cb896
commit
bf7c6cdbac
10 files changed
+65
-24
No files matched your search
@@ -143,6 +143,7 @@ export {
|
||||
compareOpenCodeVersions,
|
||||
describeUnsupportedOpenCodeVersion,
|
||||
isStableOpenCodeVersion,
|
||||
isSameOpenCodeMajor,
|
||||
isSupportedOpenCodeVersion,
|
||||
normalizeOpenCodeVersion,
|
||||
parseOpenCodeVersion,
|
||||
|
||||
@@ -67,6 +67,11 @@ export function isSupportedOpenCodeVersion(version: string): boolean {
|
||||
return parsed.major === OPENCODE_MIN.major && compareParsedSemver(parsed, OPENCODE_MIN) >= 0
|
||||
}
|
||||
|
||||
/** Reports whether a server version shares Manager's OpenCode major, so the V2 client can still talk to it. */
|
||||
export function isSameOpenCodeMajor(version: string): boolean {
|
||||
return parseOpenCodeVersion(version)?.major === OPENCODE_MIN.major
|
||||
}
|
||||
|
||||
export function describeUnsupportedOpenCodeVersion(version: string): string {
|
||||
return `OpenCode ${version} is not supported; OpenCode Manager requires OpenCode ${OPENCODE_SUPPORTED_VERSION_RANGE}`
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user