Thank you for your interest in contributing to request-client! We welcome contributions from everyone.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
- Deno v2.x or higher
-
Fork the repository
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/request-client.git cd request-client -
Create a new branch following the naming convention:
# For new features git checkout -b feat/your-feature-name # For bug fixes git checkout -b fix/your-bug-fix # For enhancements/chores git checkout -b chore/your-enhancement # For refactoring git checkout -b refactor/your-refactor # For documentation git checkout -b docs/your-docs-update # For tests git checkout -b test/your-test-addition # For CI/CD changes git checkout -b ci/your-ci-update
# Run all unit tests
deno task test:unit
# Run specification tests
deno task test:spec
# Run tests in watch mode
deno task test:watch# Generate LCOV coverage report
deno task coverage
# View HTML coverage report
open coverage/html/index.htmldeno task lint# Format code
deno task fmt
# Check formatting without making changes
deno task fmt:checkdeno task checkBranch names are used for automatic labeling in the release process. Follow these conventions:
feat/*- New features (labels::star2: feature)fix/*- Bug fixes (labels::adhesive_bandage: bug fix)chore/*- Enhancements (labels::wrench: enhancement)refactor/*- Code refactoring (labels::hammer_and_wrench: refactor)build/*- Dependencies (labels::dagger: dependencies)test/*- Testing (labels::test_tube: testing)ci/*- CI/CD changes (labels::construction_worker: ci)docs/*- Documentation (labels::books: docs)revert/*- Reverts (labels::rewind: revert)
These labels affect version resolution:
- Major: Breaking changes (
:cactus: breaking) - Minor: Features and enhancements
- Patch: Bug fixes, dependencies, refactors, tests, CI changes
- Make your changes in a new branch following the naming convention
- Add or update tests as necessary
- Ensure all tests pass (
deno task test:unitanddeno task test:spec) - Ensure code is properly formatted and linted
- Update documentation if needed
- Source files are located in
packages/client/src/
- Push your changes to your fork
- Create a pull request from your fork to our
mainbranch - Describe your changes in the pull request description
- Link any related issues
- Follow the existing code style
- Write clear commit messages
- Add tests for new features
- Update documentation for API changes
- Keep pull requests focused on a single feature or fix
We strive for high test coverage. When adding new features:
- Add unit tests in
packages/client/spec/directory- Use
*.test.tssuffix for unit tests - Use
*.spec.tssuffix for specification tests
- Use
- Ensure tests cover edge cases
- Use descriptive test names
- Tests should be independent and not rely on execution order
- Mock external dependencies using
@c4spar/mock-fetch - Ensure all tests pass before submitting a PR
- Maintain or improve code coverage
This project uses Deno's built-in formatter and linter with the following conventions:
- Use 2 spaces for indentation
- Maximum line length of 80 characters
- Use single quotes for strings
- No semicolons at the end of statements
These rules are enforced automatically by deno fmt and deno lint.
Write clear and descriptive commit messages following conventional commits:
- Use present tense ("Add feature" not "Added feature")
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit first line to 72 characters
- Reference issues and pull requests when relevant
- Your branch name will automatically apply labels to PRs
Example:
feat: add timeout support for requests
- Implement timeout configuration in RequestConfig
- Add timeout handling in request method
- Add tests for timeout functionality
Fixes #123
Example branch and commit combinations:
# Branch: feat/timeout-support
# Commit: feat: add timeout support for requests
# Result: Labeled as :star2: feature, minor version bump
# Branch: fix/header-bug
# Commit: fix: resolve header merge issue
# Result: Labeled as :adhesive_bandage: bug fix, patch version bump
Releases are handled by maintainers:
- Version is updated in
jsr.jsonanddeno.json - Release notes are generated automatically
- Package is published to JSR
Feel free to open an issue for any questions or concerns.
By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.