Thank you for considering contributing to @lorenzopant/tmdb! Whether it's bug reports, feature requests, documentation improvements, or code contributions β all help is appreciated π
-
Fork the repository and clone it locally.
-
Install dependencies:
pnpm install
Git hooks are installed from the repo root via Lefthook during install. If you need to reinstall them manually, run:
pnpm exec lefthook install -
Run the development server and test suite:
pnpm dev pnpm test
We use Vitest for testing.
Recommended root-level test commands:
pnpm test
pnpm test:unit
pnpm test:watch
pnpm test:ui
pnpm test:coverageWhat each command does:
pnpm testruns the default unit test suitepnpm test:unitruns all unit tests across the workspacepnpm test:watchstarts Vitest in watch mode forpackages/tmdbpnpm test:uistarts the Vitest UI forpackages/tmdbpnpm test:coverageruns the unit suite with coverage reporting
Integration tests require TMDB credentials and can be run separately with:
pnpm test:integrationIf you want to run the package tests directly instead of using the root shortcuts:
cd packages/tmdb
pnpm run test
pnpm run test:watch
pnpm run test:ui- Use TypeScript
- Use named exports where possible
- Follow the established file structure (
src/,types/,tests/, etc.) - Use
pnpm lintandpnpm formatbefore submitting a PR - Use
pnpm checkbefore pushing changes when you want the same core validation locally - Pre-commit hooks format and lint staged files before the commit is created
- Pre-push hooks run lint, typecheck, build, and unit tests across the repo
- If
TMDB_BEARER_TOKENis set locally, pre-push also runs integration tests - You can override hooks locally with
lefthook-local.ymlorlefthook-local.yaml
- Create a new branch from
main - Follow the PR template if available
- Provide a clear description of what you changed and why
- Include related issue numbers if applicable
- Ensure all tests pass and types are correct
- Open an issue describing the problem or idea
- Provide examples if possible (stack traces, API request/response, etc.)
You're helping improve the developer experience for people building with the TMDB API in TypeScript. Thank you for your contributions!