Thank you for your interest in contributing to TypeGraph! We welcome contributions from the community to help make this the best embedded knowledge graph for TypeScript.
- Node.js: Version 22 or higher.
- pnpm: We use pnpm for package management.
-
Clone the repository:
git clone https://github.com/nicia-ai/typegraph.git cd typegraph -
Install dependencies:
pnpm install
This is a monorepo managed by Turbo.
packages/typegraph: The core library.packages/benchmarks: Benchmark runner (private).apps/docs: Documentation (Astro/Starlight).packages/typegraph/examples: Runnable usage examples.
We use Vitest for testing.
-
Run all unit tests:
pnpm test -
Run property-based tests:
pnpm test:property
-
Run PostgreSQL integration tests: (Requires Docker)
pnpm test:postgres
-
Run layered TypeScript type tests (inline + declaration + consumer smoke):
pnpm test:types
-
Run TypeScript type tests against a specific compiler version (for compatibility checks):
TYPEGRAPH_TYPESCRIPT_VERSION=6.0.0-beta pnpm --filter @nicia-ai/typegraph test:types
To build the package for distribution:
pnpm build- Branch: Create a new branch for your feature or fix.
- Code: Implement your changes. Please adhere to the existing coding style (Prettier/ESLint will help).
- Test: Add unit tests for new features or bug fixes. Ensure all tests pass.
- Lint: Run
pnpm lintto check for style issues. - Commit: We use Changesets for versioning.
- If your change affects the published package, run
pnpm changesetand follow the prompts to add a changeset file describing your modification.
- If your change affects the published package, run
- Push your branch to GitHub.
- Open a Pull Request against the
mainbranch. - Describe your changes and link to any relevant issues.
By participating in this project, you agree to abide by the Code of Conduct
(CODE_OF_CONDUCT.md).
By contributing, you agree that your contributions will be licensed under its MIT License.