Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# Change Log

## 2025-05-16 CLI 0.18.0

- fix: pass pre-release flags properly to subcommands [#847](https://github.com/hypermodeinc/modus/pull/847)

## 2025-05-16 Runtime 0.18.0-alpha.2

- fix: reflection error in runtime when starting agent [#845](https://github.com/hypermodeinc/modus/pull/845)
Expand Down
5 changes: 3 additions & 2 deletions cli/src/commands/dev/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default class DevCommand extends BaseCommand {

const app = await getAppInfo(appPath);
const { sdk, sdkVersion } = app;
const prerelease = vi.isPrerelease(sdkVersion) || flags.prerelease;

if (!flags["no-logo"]) {
this.log(getHeader(this.config.version));
Expand Down Expand Up @@ -109,7 +110,7 @@ export default class DevCommand extends BaseCommand {
}
}
} else if (await isOnline()) {
const version = await vi.findLatestCompatibleRuntimeVersion(sdk, sdkVersion, flags.prerelease);
const version = await vi.findLatestCompatibleRuntimeVersion(sdk, sdkVersion, prerelease);
if (version && !(await vi.runtimeVersionIsInstalled(version))) {
const runtimeText = `Modus Runtime ${version}`;
await withSpinner(chalk.dim("Downloading and installing " + runtimeText), async (spinner) => {
Expand All @@ -128,7 +129,7 @@ export default class DevCommand extends BaseCommand {
}
runtimeVersion = version;
} else {
const version = await vi.findCompatibleInstalledRuntimeVersion(sdk, sdkVersion, flags.prerelease);
const version = await vi.findCompatibleInstalledRuntimeVersion(sdk, sdkVersion, prerelease);
if (!version) {
this.logError("Could not find a compatible Modus runtime version. Please try again when you have an internet connection.");
return;
Expand Down
6 changes: 5 additions & 1 deletion cli/src/commands/new/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,11 @@ export default class NewCommand extends BaseCommand {
}
}
if (updateSDK) {
await SDKInstallCommand.run([sdk, latestVersion!, "--no-logo"]);
const sdkInstallArgs = [sdk, latestVersion!, "--no-logo"];
if (prerelease) {
sdkInstallArgs.push("--prerelease");
}
await SDKInstallCommand.run(sdkInstallArgs);
installedSdkVersion = latestVersion;
}
}
Expand Down
4 changes: 3 additions & 1 deletion cli/src/util/versioninfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ export async function findLatestCompatibleRuntimeVersion(sdk: globals.SDK, sdkVe
compatibleVersions = versions.filter((v) => semver.satisfies(v.slice(1), constraint, { includePrerelease: true }));
}
if (compatibleVersions.length > 0) {
return compatibleVersions[0];
// Sort in descending order and return the latest version
compatibleVersions = semver.rsort(compatibleVersions.map((v) => v.slice(1)));
return "v" + compatibleVersions[0];
}
}
}
Loading