Skip to content

Commit 1dc5323

Browse files
fix: remove timestamp from generated contracts.ts to prevent churn (smart-mcp-proxy#246)
The generate-types command embedded a timestamp in the generated TypeScript file, causing it to change on every build even when the actual type definitions hadn't changed. This led to: - Accidental commits of timestamp-only changes - Unnecessary merge conflicts between branches - Noisy git status after every build Remove the timestamp line entirely. The 'DO NOT EDIT' comment already communicates the file is auto-generated, and git history shows when the file actually changed. Fixes smart-mcp-proxy#245
1 parent 2841f33 commit 1dc5323

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

cmd/generate-types/main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"os"
77
"path/filepath"
88
"strings"
9-
"time"
109
)
1110

1211
func main() {
@@ -24,9 +23,8 @@ func main() {
2423
outputFile := filepath.Join(outputDir, "contracts.ts")
2524
content := fmt.Sprintf(`// Generated TypeScript types from Go contracts
2625
// DO NOT EDIT - This file is auto-generated by cmd/generate-types
27-
// Generated at: %s
2826
29-
%s`, time.Now().Format(time.RFC3339), typeDefinitions)
27+
%s`, typeDefinitions)
3028

3129
if err := os.WriteFile(outputFile, []byte(content), 0600); err != nil {
3230
fmt.Printf("Error writing TypeScript file: %v\n", err)

frontend/src/types/contracts.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Generated TypeScript types from Go contracts
22
// DO NOT EDIT - This file is auto-generated by cmd/generate-types
3-
// Generated at: 2026-01-06T13:08:25-05:00
43

54
export interface APIResponse<T = any> {
65
success: boolean;

0 commit comments

Comments
 (0)