fix: address Phase 1 review — union types, auto playedAt, ESM imports, gitignore config.json

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
saopig1andClaude Opus 4.6 committed 2026-03-30 00:26:55 +08:00
1 parent 9931d8b40d
commit bc89c553b7
5 files changed
+15 -14

No files matched your search

+1 -3
View File
@@ -1,5 +1,5 @@
import { describe, it, expect, beforeEach, afterEach } from "vitest";
import { createDatabase, type BotDatabase, type BotInstance } from "./database.js";
import { createDatabase, type BotDatabase, type BotInstance, type PlayHistoryEntry } from "./database.js";
describe("database", () => {
let botDb: BotDatabase;
@@ -32,7 +32,6 @@ describe("database", () => {
album: "Test Album",
platform: "netease",
coverUrl: "https://example.com/cover.jpg",
playedAt: new Date().toISOString(),
});
botDb.addPlayHistory({
@@ -43,7 +42,6 @@ describe("database", () => {
album: "Another Album",
platform: "qq",
coverUrl: "https://example.com/cover2.jpg",
playedAt: new Date().toISOString(),
});
const history = botDb.getPlayHistory("bot1", 10);