Thanks for your interest in improving yasuo! This project is the zero-dependency evolution of twisted, and we care a lot about keeping the surface small, typed and dependency-free.
Heads-up: yasuo is still under construction and pre-1.0. The public API may change between commits. Please open an issue to discuss anything non-trivial before sending a large PR.
yasuo uses Bun as its package manager and test runner.
bun install
bun run typecheck # tsc --noEmit
bun run lint # biome check .
bun test test/unit # unit tests (no network)
bun run build # single-file ESM + CJS + d.tsThe one-shot gate that CI also runs:
bun run check # typecheck + lint + unit testsThe test/integration/*.live.test.ts suite hits the real Riot API. It is skipped
automatically unless a key is present:
echo "RIOT_API_KEY=RGAPI-your-dev-key" >> .env # .env is gitignored
bun run test:integrationThe suite shares one cached, self-pacing client and stays under a development key's basic limit (20 req/s, 100 req/2min). Never commit your key.
These are enforced in review (and mostly by biome/tsc):
- Zero runtime dependencies. Never add to
dependencies. Small helpers live insrc/core/util. - No magic strings/numbers. Every Riot constant is an
enuminsrc/enums. - One declaration per file. At most one class (or a cohesive group of types/functions) per file.
- DTOs mirror the wire (
src/dto,*DTO,readonly); entities are the ergonomics (src/entities,*.entity.ts). - Every network call flows through
RequestExecutor.request()— namespaces never callfetchdirectly (the sole exception isDataDragonNamespace). - Every export is JSDoc'd, and new public surface is exported from
src/index.ts. - Keep the docs alive. Any change to the public API must update the guides
under
docs/and, where relevant,examples/basic-usage.ts, in the same PR. The published site at https://docs.yasuo.gg/ is the canonical reference. See the architecture guide.
More detail on layout and conventions lives in
docs/architecture.md — please read it before making
structural changes.
- Branch off
main; keep each PR focused on one logical change. - Conventional-commit-style messages are appreciated (
feat:,fix:,docs:,chore:). - Fill out the PR template checklist. CI must be green before review.
Use the issue templates.
Always redact your API key (RGAPI-***) from any snippet.
By contributing, you agree that your contributions are licensed under the MIT License.