From a45db9246ea895a9fc9f67b42a15e8862c61a93c Mon Sep 17 00:00:00 2001 From: Galmanus Date: Tue, 25 Aug 2026 06:59:33 -0300 Subject: [PATCH] refactor(core): colocate STELLAR_CLI_LAST_TESTED_VERSION with MIN_VERSION (#100) STELLAR_CLI_LAST_TESTED_VERSION lived in stellar-cli/compat.ts while STELLAR_CLI_MIN_VERSION lives in stellar-cli/version.ts (matching the SDK layout). Move it to version.ts and re-export from compat.ts so all public imports keep working. No value change; tsc + stellar-cli tests clean. --- packages/core/src/stellar-cli/compat.ts | 10 ++++++---- packages/core/src/stellar-cli/version.ts | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/core/src/stellar-cli/compat.ts b/packages/core/src/stellar-cli/compat.ts index bf7a859a..8a768209 100644 --- a/packages/core/src/stellar-cli/compat.ts +++ b/packages/core/src/stellar-cli/compat.ts @@ -1,10 +1,12 @@ import semver from "semver"; import { CaatingaError, CaatingaErrorCode } from "../errors/CaatingaError.js"; -import { STELLAR_CLI_MIN_VERSION } from "./version.js"; +import { STELLAR_CLI_LAST_TESTED_VERSION, STELLAR_CLI_MIN_VERSION } from "./version.js"; -export { STELLAR_CLI_MIN_VERSION, parseStellarCliVersion } from "./version.js"; - -export const STELLAR_CLI_LAST_TESTED_VERSION = "27.0.0"; +export { + STELLAR_CLI_LAST_TESTED_VERSION, + STELLAR_CLI_MIN_VERSION, + parseStellarCliVersion, +} from "./version.js"; export type CompatibilityStatus = "supported" | "untested" | "unsupported"; diff --git a/packages/core/src/stellar-cli/version.ts b/packages/core/src/stellar-cli/version.ts index d106d5db..339af9f6 100644 --- a/packages/core/src/stellar-cli/version.ts +++ b/packages/core/src/stellar-cli/version.ts @@ -4,6 +4,10 @@ import { CaatingaError, CaatingaErrorCode } from "../errors/CaatingaError.js"; // 22.x fails to sign `stellar contract invoke` (xdr value invalid); 23.0.0+ is required. export const STELLAR_CLI_MIN_VERSION = "23.0.0"; +// Latest Stellar CLI version this release was verified against. Kept next to +// MIN_VERSION so both version anchors live in one place (#100). +export const STELLAR_CLI_LAST_TESTED_VERSION = "27.0.0"; + const STELLAR_CLI_SEMVER_REGEX = /\b(\d+\.\d+\.\d+(?:-[0-9A-Za-z-.]+)?(?:\+[0-9A-Za-z-.]+)?)\b/; export function parseStellarCliVersion(output: string): string {