From c755a2dc65f80d5c4ea022fbfae457af6ca212cb Mon Sep 17 00:00:00 2001 From: Wes Copeland Date: Sat, 28 Feb 2026 11:18:02 -0500 Subject: [PATCH] chore: use tsgo instead of tsc --- .gitignore | 3 ++- .vscode/settings.json | 3 +++ CLAUDE.md | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 5 ++--- bun.lock | 17 +++++++++++++++++ package.json | 6 ++---- tsconfig.json | 3 +++ 8 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 1c681a8..1025495 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,8 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json # IDEs .claude/settings.local.json .idea -.vscode +.vscode/* +!.vscode/settings.json CLAUDE.local.md # Finder (MacOS) folder config diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..428fe51 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.experimental.useTsgo": true +} diff --git a/CLAUDE.md b/CLAUDE.md index f9c0c3d..5f9d9c0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,7 +14,7 @@ bun run db:seed # Seed default teams (RACheats) # Development bun run dev # Run with hot reload (--watch) -bun run tsc # TypeScript type checking +bun run tsc # TypeScript type checking (via tsgo) bun run lint # Run ESLint bun run lint:fix # Auto-fix linting issues bun run test # Run all tests (vitest) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ce44bb8..9b24819 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,8 +84,8 @@ Individual checks: ```bash bun lint # Check code style bun lint:fix # Auto-fix style issues -bun tsc # TypeScript type checking -bun test # Run tests +bun tsc # TypeScript type checking (via tsgo) +bun run test # Run tests (via vitest) ``` ### 4. Commit Your Changes diff --git a/README.md b/README.md index 55f19f6..afcf934 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,10 @@ RABot utilizes: - **[Discord.js](https://discord.js.org/)** for tight integration with Discord - **[Drizzle ORM](https://orm.drizzle.team/)** with SQLite for data persistence - **[@retroachievements/api](https://github.com/RetroAchievements/api-js)** for web API calls -- **[Pino](https://getpino.io/#/)** for structured logging with command analytics ## Requirements -- [Bun](https://bun.sh) 1.2.18+ +- [Bun](https://bun.sh) 1.3.6+ - A Discord bot token ## Installation @@ -115,7 +114,7 @@ For production deployments, the bot is automatically deployed via Forge when cha - `bun db:migrate` - Apply database migrations - `bun lint` - Run ESLint - `bun lint:fix` - Run ESLint with auto-fix -- `bun tsc` - Run TypeScript type checking +- `bun tsc` - Run TypeScript type checking (via tsgo) - `bun run test` - Run all tests - `bun run test:watch` - Run tests in watch mode - `bun verify` - Run lint, type checking, and tests (comprehensive check) diff --git a/bun.lock b/bun.lock index 07a744b..74881dc 100644 --- a/bun.lock +++ b/bun.lock @@ -15,6 +15,7 @@ "devDependencies": { "@types/bun": "latest", "@types/figlet": "^1.7.0", + "@typescript/native-preview": "^7.0.0-dev.20260228.1", "drizzle-kit": "0.31.4", "eslint": "^9.31.0", "eslint-config-prettier": "^10.1.5", @@ -283,6 +284,22 @@ "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.37.0", "", { "dependencies": { "@typescript-eslint/types": "8.37.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-YzfhzcTnZVPiLfP/oeKtDp2evwvHLMe0LOy7oe+hb9KKIumLNohYS9Hgp1ifwpu42YWxhZE8yieggz6JpqO/1w=="], + "@typescript/native-preview": ["@typescript/native-preview@7.0.0-dev.20260228.1", "", { "optionalDependencies": { "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260228.1", "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260228.1", "@typescript/native-preview-linux-arm": "7.0.0-dev.20260228.1", "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260228.1", "@typescript/native-preview-linux-x64": "7.0.0-dev.20260228.1", "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260228.1", "@typescript/native-preview-win32-x64": "7.0.0-dev.20260228.1" }, "bin": { "tsgo": "bin/tsgo.js" } }, "sha512-kEUE54Shr4VfD1aVlxBkT9EVRkdSklINPxcUdFDwWQYh+uNRfgM/KmGUapbhCnoaat8ALRv30X6r6Eu3WiEhGg=="], + + "@typescript/native-preview-darwin-arm64": ["@typescript/native-preview-darwin-arm64@7.0.0-dev.20260228.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-WzU0dbBNrEC/qS/axWxcxSosQNg422SdEq/aPf/98RDjYQVy1ILH0UU1aOyzROujPyUBPeVho71MrFEhb9uh6g=="], + + "@typescript/native-preview-darwin-x64": ["@typescript/native-preview-darwin-x64@7.0.0-dev.20260228.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-6QJ3PApmZoc87exMhashVL/gjNG+1Ph5OkUT3GXblM5PucXdEuVr1d86TC0O31EBbqUWWKUbp+U/BiTko1gOHw=="], + + "@typescript/native-preview-linux-arm": ["@typescript/native-preview-linux-arm@7.0.0-dev.20260228.1", "", { "os": "linux", "cpu": "arm" }, "sha512-H2rKa7vjt/kfzlz+sdXW5VU/f8PcemCbW4JLcAi4esSUSDYDNsOHYCgLdrOrvUA9IBK86kunkTsJVvKJLpy+jQ=="], + + "@typescript/native-preview-linux-arm64": ["@typescript/native-preview-linux-arm64@7.0.0-dev.20260228.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-oVJ689FnZuwm0+MEFtbWcI9kqCfU8+7/z23d2SgMl5M4NKYk5CqUsOtm6IGwZRRLJONKhmSdAzOCSbMN9UTLEg=="], + + "@typescript/native-preview-linux-x64": ["@typescript/native-preview-linux-x64@7.0.0-dev.20260228.1", "", { "os": "linux", "cpu": "x64" }, "sha512-W4/N02tp9CSd+ZO5p6KyyKqXmqMA2vtVcvnjBLyPDZQ4KgUAeRMJFzH/7ME2BN3BxZCplX5WFXfmI6fkc+1z+w=="], + + "@typescript/native-preview-win32-arm64": ["@typescript/native-preview-win32-arm64@7.0.0-dev.20260228.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-AB6NhxIInyeIzINJLhIzNo4qQOEHp/YvATptTK6vcngBq9syb2ST6UAMIAtl2Vj1m9wjMpUyHzzcJK/1c1MemA=="], + + "@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20260228.1", "", { "os": "win32", "cpu": "x64" }, "sha512-9Wq1d0ZbrJcF6NoODw4+SRNdcZtKMmm2w32Wlo+r6ZIziBF5HFWvJcwGXNE0pbFpX6H/Gs8dhLaDKZU2dLoWOA=="], + "@unrs/resolver-binding-android-arm-eabi": ["@unrs/resolver-binding-android-arm-eabi@1.11.1", "", { "os": "android", "cpu": "arm" }, "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw=="], "@unrs/resolver-binding-android-arm64": ["@unrs/resolver-binding-android-arm64@1.11.1", "", { "os": "android", "cpu": "arm64" }, "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g=="], diff --git a/package.json b/package.json index d32a041..116d4d9 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "db:generate": "drizzle-kit generate", "db:migrate": "bun run src/database/migrate.ts", "db:seed": "bun run src/database/seed-teams.ts", - "tsc": "tsc --noEmit", + "tsc": "tsgo --noEmit", "lint": "eslint src --cache", "lint:fix": "eslint src --fix", "test": "vitest run", @@ -48,6 +48,7 @@ "devDependencies": { "@types/bun": "latest", "@types/figlet": "^1.7.0", + "@typescript/native-preview": "^7.0.0-dev.20260228.1", "drizzle-kit": "0.31.4", "eslint": "^9.31.0", "eslint-config-prettier": "^10.1.5", @@ -59,8 +60,5 @@ "eslint-plugin-unicorn": "^59.0.1", "typescript-eslint": "^8.37.0", "vitest": "^4.0.18" - }, - "peerDependencies": { - "typescript": "^5" } } diff --git a/tsconfig.json b/tsconfig.json index bfa0fea..4864e94 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,9 @@ "verbatimModuleSyntax": true, "noEmit": true, + // Explicitly list @types packages since tsgo doesn't auto-discover them. + "types": ["bun", "figlet"], + // Best practices "strict": true, "skipLibCheck": true,