Skip to content

Latest commit

 

History

History
91 lines (67 loc) · 1.89 KB

File metadata and controls

91 lines (67 loc) · 1.89 KB

Contributing to @future.ai Libraries

Thank you for your interest in contributing to @future.ai libraries! This guide will help you get started.

Development Setup

  1. Fork and clone the repository
  2. Install dependencies:
    pnpm install
  3. Create a new branch:
    git checkout -b feature/your-feature-name

Creating a New Library

To create a new library package:

./scripts/create-package.sh your-library-name

This creates a new package with all necessary configuration files.

Development Workflow

  1. Make your changes in the appropriate package
  2. Write/update tests
  3. Run tests to ensure everything works:
    pnpm test
  4. Build the package:
    pnpm run build
  5. Lint your code:
    pnpm run lint

Testing

  • Write unit tests for all new functionality
  • Place tests in the test directory of the package
  • Run tests with pnpm test
  • Aim for high code coverage

Code Style

  • We use ESLint and Prettier for code formatting
  • Run pnpm run format to format your code
  • Follow NestJS best practices and conventions

Commit Messages

We follow conventional commits specification:

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code refactoring
  • test: Test additions or modifications
  • chore: Maintenance tasks

Example:

feat(common): add new validation decorator

Pull Request Process

  1. Update documentation if needed
  2. Ensure all tests pass
  3. Update the README.md with details of changes if applicable
  4. Submit a pull request with a clear description

Publishing

Only maintainers can publish packages. The process is:

  1. Merge PR to main branch
  2. Run ./scripts/publish.sh
  3. Lerna handles versioning and publishing

Questions?

If you have questions, please open an issue for discussion.