Contributing
Contributing to @sei-js - Complete guide to local development setup, testing, and pull request process
Getting Started
Welcome to the @sei-js contributor community! This guide will help you set up your local development environment and contribute to the project.
Prerequisites
Before you begin, ensure you have:
- nvm (Node Version Manager)
- Yarn (4.7.0)
Local Development Setup
Fork and Clone
- Fork the @sei-js repository on GitHub
- Clone your fork locally:
This creates your own copy of the repository that you can modify freely.
Use Correct Node.js Version
Switch to the project’s required Node.js version:
This will use Node.js v20 as specified in the project’s .nvmrc
file.
You should see a message confirming you’re now using the correct Node.js version.
Install Dependencies
Install all dependencies and link packages:
This installs dependencies for all packages in the monorepo and sets up workspace linking.
Build All Packages
Build all packages in the correct order:
This ensures all packages are built and ready for development.
Run Tests
Verify everything is working:
All tests should pass and you should see coverage reports for each package.
Coverage reports help ensure your changes don’t reduce test coverage. Look for coverage percentages in the output.
Run and Verify Docs
Start the documentation server to verify everything is set up correctly:
This will start the documentation server at http://localhost:3000
The documentation should open in your browser and display without errors.
Project Structure
Understanding the monorepo structure will help you navigate and contribute effectively:
Development Workflow
Code Quality and Standards
We use Biome for code formatting and linting. Configure your IDE to use Biome for the best development experience:
Configure your IDE to use the project’s Biome configuration for automatic formatting and linting as you code.
Running Tests
Run tests to ensure your changes work correctly:
Always aim for 100% code coverage in your contributions. Add comprehensive tests for any new functionality or bug fixes.
Making Changes
That’s it! You’re ready to start contributing to @sei-js. Make your changes, test them thoroughly with the commands above, and submit your pull request when ready.