Contributing
Thank you for your interest in contributing to Bupkis! We welcome contributions from everyone and are grateful for every contribution made.
Code of Conduct
Section titled “Code of Conduct”This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
How Can I Contribute?
Section titled “How Can I Contribute?”Reporting Bugs
Section titled “Reporting Bugs”Before creating bug reports, please check the existing issues as you might find that the problem has already been reported. When creating a bug report, include as many details as possible:
- Use a clear and descriptive title for the issue
- Describe the exact steps to reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed and explain which behavior you expected to see
- Include code samples that demonstrate the issue
- Specify the version of Bupkis you’re using
- Specify your Node.js version and operating system
Suggesting Enhancements
Section titled “Suggesting Enhancements”Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
- Use a clear and descriptive title
- Provide a detailed description of the suggested enhancement
- Explain why this enhancement would be useful
- Provide examples of how the enhancement would be used
Pull Requests
Section titled “Pull Requests”- Fill in the required template
- Include screenshots or animated GIFs in your pull request when appropriate
- Follow the TypeScript and JavaScript style guides
- Include thoughtfully-worded, well-structured tests
- Document new code with TSDoc comments
- End all files with a newline
Development Setup
Section titled “Development Setup”Prerequisites
Section titled “Prerequisites”- Node.js (see
enginesfield inpackage.jsonfor supported versions) - npm (comes with Node.js)
Setting Up Your Development Environment
Section titled “Setting Up Your Development Environment”-
Fork the repository on GitHub
-
Clone your fork locally:
Terminal window git clone https://github.com/YOUR_USERNAME/bupkis.gitcd bupkis -
Install dependencies:
Terminal window npm install -
Create a branch for your changes:
Terminal window git checkout -b your-feature-branch
Building the Project
Section titled “Building the Project”# Build for productionnpm run build
# Build in watch mode for developmentnpm run devRunning Tests
Section titled “Running Tests”# Run all testsnpm test
# Run tests in watch modenpm run test:watch
# Run property-based tests onlynpm run test:property
# Run property tests in watch modenpm run test:property:devLinting and Type Checking
Section titled “Linting and Type Checking”# Run ESLintnpm run lint
# Fix auto-fixable ESLint issuesnpm run lint:fix
# Run TypeScript type checkingnpm run lint:types
# Run type checking in watch modenpm run lint:types:devProject Structure
Section titled “Project Structure”src/- Main library source codeassertion/- Core assertion frameworkimpl/- Built-in assertion implementations
expect.ts- Main entry points (expect,expectAsync)types.ts- TypeScript type definitions
test/- Test suiteproperty/- Property-based tests using fast-checkassertion/- Unit tests for assertions
docs/- Generated API documentationsite/- Documentation source files
Coding Guidelines
Section titled “Coding Guidelines”TypeScript/JavaScript Style
Section titled “TypeScript/JavaScript Style”- Use TypeScript for all new code
- Follow the existing code style (enforced by ESLint)
- Use meaningful variable and function names
- Add TSDoc comments for public APIs
- Prefer explicit types over
any
Testing Guidelines
Section titled “Testing Guidelines”- Write tests for all new functionality
- Use property-based testing for assertion logic when appropriate
- Follow the existing test patterns
- Ensure tests are deterministic and don’t rely on external dependencies
Assertion Development
Section titled “Assertion Development”When creating new assertions:
- Use
createAssertion()orcreateAsyncAssertion()from the assertion creation utilities - Follow natural language patterns for assertion phrases
- Provide comprehensive examples in TSDoc comments
- Write both unit tests and property-based tests
- Update documentation as needed
Commit Messages
Section titled “Commit Messages”- Use the present tense (“Add feature” not “Added feature”)
- Use the imperative mood (“Move cursor to…” not “Moves cursor to…”)
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
Documentation
Section titled “Documentation”- Use TSDoc for inline code documentation
- Update relevant documentation when changing APIs
- Include examples in your documentation
- Follow the existing documentation patterns
Debugging
Section titled “Debugging”- Set
DEBUG=bupkis*environment variable for detailed logging - Use Wallaby.js integration for real-time testing feedback
- Check the browser developer tools for client-side issues
Release Process
Section titled “Release Process”Releases are managed by maintainers using automated tools. Contributors don’t need to worry about versioning or publishing.
Getting Help
Section titled “Getting Help”- Check existing issues and discussions
- Create a new issue if you need help
- Be respectful and patient when asking for help
Recognition
Section titled “Recognition”All contributors will be recognized in the project. We appreciate all forms of contribution, including but not limited to:
- Code contributions
- Bug reports
- Documentation improvements
- Feature suggestions
- Testing and feedback
Thank you for contributing to Bupkis! 🎉