Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to the project.
All non-trivial contributions should start with an issue or discussion before implementation. This helps ensure your time is well spent and that the contribution aligns with project goals.
PRs without a linked issue may be closed without review. Use Fixes #123 or Closes #123 in your PR description to link issues.
- Bug fixes with clear reproduction steps
- Documentation improvements and typo fixes
- Test coverage improvements
- New features or functionality
- API changes or additions
- Architectural changes
- Breaking changes
- UI/UX changes
Look for these labels when finding issues to work on:
help wanted- Issues where community help is welcomegood first issue- Good for newcomersneeds discussion- Requires design input before implementation
AI tools are welcome and encouraged as productivity aids. This policy exists to ensure quality and help maintainers understand contributions.
All AI usage must be disclosed in PRs and issues:
- State the tool used (e.g., Claude Code, Cursor, Copilot, ChatGPT)
- Describe the extent of AI assistance (e.g., "used for initial implementation", "helped debug", "generated tests")
Maintainers are exempt from disclosure requirements.
- AI-assisted code must be fully tested and verified by the contributor
- No AI-generated walls of text - keep descriptions concise and human-reviewed
- Contributors are responsible for the quality of AI-assisted work
- Bun v1.3
- Git
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/tensorix-labs/t-req.git cd t-req -
Install dependencies:
bun install
-
Run the tests to verify setup:
bun test
# Run all tests
bun test
# Run unit tests only (faster)
bun run test:unit
# Run E2E tests (requires internet)
bun run test:e2e
# Run specific test file
bun test test/parser.test.ts
# Run tests in watch mode
bun test --watch- Use TypeScript strict mode
- Prefer explicit types over
any - Export types from
src/types.ts - Use JSDoc comments for public APIs
- Use 2-space indentation
- Use single quotes for strings
- No trailing commas in function parameters
- Use semicolons
camelCasefor functions and variablesPascalCasefor types and interfaces- Descriptive names that reflect purpose
/**
* Parse .http file content into structured request objects
*/
export function parse(content: string): ParsedRequest[] {
const requests: ParsedRequest[] = [];
// Implementation
return requests;
}git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix- Write tests for new functionality
- Update documentation if needed
- Ensure all tests pass
# Run all tests
bun test
# Run the build
bun run build
# Verify the build works
bun ./dist/index.jsUse clear, descriptive commit messages following Conventional Commits:
git commit -m "feat: add support for custom HTTP methods"
git commit -m "fix: handle empty body in POST requests"
git commit -m "docs: update README with new examples"Commit message prefixes:
feat:- New featurefix:- Bug fixdocs:- Documentation changestest:- Test changesrefactor:- Code refactoringchore:- Build/tooling changes
git push origin your-branch-nameThen create a Pull Request on GitHub.
- Link an issue: Reference the issue your PR addresses using
Fixes #123orCloses #123 - Describe your changes: Provide a clear summary of what changed and why
- Explain how you tested: Describe the tests you ran to verify your changes
- Use conventional commits: Format PR titles as
type: description(e.g.,feat: add timeout option) - Include tests: Add tests for new functionality
- Keep it focused: PRs should be atomic - one logical change per PR
- Ensure CI passes: All checks must pass before review
When reporting issues, please include:
- A clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Environment details (Bun version, OS, etc.)
- Minimal reproduction code if possible
Feature requests are welcome! To propose a new feature:
- Open an issue first - Describe the problem you're trying to solve, not just the solution
- Wait for feedback - Allow maintainers to discuss the approach before starting implementation
- Check if the feature already exists or is planned
- Propose an API if applicable
- Be open to discussion about implementation
If you have questions, feel free to:
- Open an issue for discussion
- Check existing issues and documentation
Thank you for contributing!