Skip to content

chore(scripts): rewrite scripts in typescript - #1183

Open
ugcodrr wants to merge 3 commits into
mainfrom
chore/scripts-typescript
Open

ugcodrr wants to merge 3 commits into
mainfrom
chore/scripts-typescript

Conversation

@ugcodrr

@ugcodrr ugcodrr commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Description: Most of apps/scripts was plain JS that nothing typechecked, so a few scripts broke without anyone noticing. Behavior is the same as before.

  1. delete-sessions and timestamp import mongoose and luxon, which scripts never declared, so they couldn't resolve. Both are dependencies now.
  2. The bugs the types found are left as they were, behind a @ts-expect-error or !. config() isn't awaited in api-key, delete-sessions, timestamp and rank-emojis, rank-emojis throws in its color loop (missing entries()), and validate-commands throws on a command with no options.

Testing: pnpm --filter scripts typecheck passes, and validate-commands prints the same output as before on a sample commands.json.

Conflicts with #1048 in api-key.ts and limit-redis.ts: keep its await config(...) lines and drop the @ts-expect-error above the one in api-key.ts. Whichever lands second also has to change the limiter's command in compose.prod.yml to node src/limit-redis.ts, since git won't flag it.

@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
statsify Ignored Ignored Nov 11, 2026 6:09am UTC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant