# Contributing to @teispace/npm-packages Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to this monorepo. ## Table of Contents - [Getting Started](#getting-started) - [Development Workflow](#development-workflow) - [Branch Strategy](#branch-strategy) - [Commit Guidelines](#commit-guidelines) - [Pull Request Process](#pull-request-process) - [Release Process](#release-process) - [Testing](#testing) - [Code Style](#code-style) ## Getting Started ### Prerequisites - **Node.js**: >= 24.0.0 (see `.nvmrc`) - **Yarn**: >= 4.0.0 (Corepack enabled) - **Git**: Latest version ### Initial Setup ```bash # Clone the repository git clone https://github.com/teispace/npm-packages.git cd npm-packages # Enable Corepack (if not already enabled) corepack enable # Install dependencies yarn install # Build all packages yarn build # Run tests yarn test --passWithNoTests # Validate everything yarn validate ``` ## Development Workflow ### 1. Create a Branch Follow our [branch strategy](#branch-strategy) to create an appropriate branch: ```bash # For new features git checkout -b feat/your-feature-name # For bug fixes git checkout -b fix/your-bug-fix # For documentation git checkout -b docs/your-doc-update ``` ### 2. Make Changes - Write clean, maintainable code - Follow the [code style guidelines](#code-style) - Add tests for new features - Update documentation as needed ### 3. Test Your Changes ```bash # Run linting yarn lint # Run type checking yarn type-check # Run tests yarn test # Run all checks yarn validate ``` ### 4. Commit Your Changes We use **Conventional Commits** for all commit messages. See [Commit Guidelines](#commit-guidelines). ```bash # Stage your changes git add . # Commit with conventional commit message git commit -m "feat: add new feature" # Or use commitizen for guided commits yarn commit ``` ### 5. Push and Create PR ```bash # Push your branch git push origin feat/your-feature-name # Create a Pull Request on GitHub ``` ## Branch Strategy This repo is **trunk-based**: `main` is the single long-lived branch, and releases are automated from it by [release-please](https://github.com/googleapis/release-please). There is no `develop`, `alpha`, or `beta` branch. ### `main` - Production-ready code. Protected branch. - Every change lands via a reviewed PR that passes CI (lint, type-check, test, build). - Each push updates a release-please **release PR**; merging that PR tags the release and publishes the changed packages to npm under `@latest`. ### Short-lived topic branches Branch off `main`, open a PR back into `main`, and delete the branch after merge. Use a Conventional-Commits-style prefix so the intent is clear: - **`feat/`** — a new feature - **`fix/`** — a bug fix - **`docs/`** — documentation only - **`refactor/`** — internal refactor, no behavior change - **`chore/`** — tooling, deps, CI ## Commit Guidelines We follow **[Conventional Commits](https://www.conventionalcommits.org/)** specification. ### Format ``` ():