Skip to content

Commit a442d64

Browse files
committed
Fix TypeScript errors and linting issues
- Add fallback to empty string in formatBuildDate functions - Remove unused getCliVersion import from index.ts - All type checks and tests passing
1 parent e5ce1f2 commit a442d64

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/components/SystemInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function SystemInfo({
4646
const formatBuildDate = (date: string | null): string => {
4747
if (!date) return "";
4848
const d = new Date(date);
49-
return d.toISOString().split("T")[0]; // YYYY-MM-DD
49+
return d.toISOString().split("T")[0] || ""; // YYYY-MM-DD
5050
};
5151

5252
const versionCompare = latestVersion ? compareVersions(vvvVersion, latestVersion) : 0;

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Command } from "commander";
33
import { upCommand, stopCommand, restartCommand, statusCommand, reprovisionCommand, sshCommand, destroyCommand, execCommand, infoCommand, siteCommand, extensionCommand, databaseCommand, phpCommand, configCommand, hostsCommand, logsCommand, openCommand, serviceCommand, snapshotCommand, sslCommand, wpCommand, xdebugCommand, installCommand, providersCommand, upgradeCommand, completionCommand, doctorCommand } from "./commands/index.js";
44
import { setVerboseMode, cli, shouldUseColors } from "./utils/cli.js";
55
import { setTipsEnabledFromCli } from "./utils/tips.js";
6-
import { getCliVersion, getBuildDate, formatBuildDate, isCompiledBinary } from "./utils/version.js";
6+
import { getBuildDate, formatBuildDate, isCompiledBinary } from "./utils/version.js";
77
import { VERSION } from "./version.js";
88
import { getVVVVersion } from "./commands/info.js";
99
import { DEFAULT_VVV_PATH, vvvExists, loadConfig } from "./utils/config.js";

src/utils/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ export function isCompiledBinary(): boolean {
4242
export function formatBuildDate(date: string | null): string {
4343
if (!date) return "";
4444
const d = new Date(date);
45-
return d.toISOString().split("T")[0]; // YYYY-MM-DD
45+
return d.toISOString().split("T")[0] || ""; // YYYY-MM-DD
4646
}

0 commit comments

Comments
 (0)