Skip to content

Latest commit

 

History

History
103 lines (68 loc) · 2.41 KB

File metadata and controls

103 lines (68 loc) · 2.41 KB

Contributing to TypeGraph

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.

Getting Started

Prerequisites

  • Node.js: Version 22 or higher.
  • pnpm: We use pnpm for package management.

Installation

  1. Clone the repository:

    git clone https://github.com/nicia-ai/typegraph.git
    cd typegraph
  2. Install dependencies:

    pnpm install

Development Workflow

Project Structure

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.

Running Tests

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

Building

To build the package for distribution:

pnpm build

Making Changes

  1. Branch: Create a new branch for your feature or fix.
  2. Code: Implement your changes. Please adhere to the existing coding style (Prettier/ESLint will help).
  3. Test: Add unit tests for new features or bug fixes. Ensure all tests pass.
  4. Lint: Run pnpm lint to check for style issues.
  5. Commit: We use Changesets for versioning.
    • If your change affects the published package, run pnpm changeset and follow the prompts to add a changeset file describing your modification.

Pull Requests

  1. Push your branch to GitHub.
  2. Open a Pull Request against the main branch.
  3. 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).

License

By contributing, you agree that your contributions will be licensed under its MIT License.