Thank you for your interest in contributing to Magiclogger! This document provides guidelines and instructions for contributing to this project.
- Code of Conduct
- Getting Started
- Development Workflow
- Commit Guidelines
- Pull Request Process
- Coding Standards
- Testing
We expect all contributors to act professionally and respectfully. By participating in this project, you agree to maintain a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
To get started with development:
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/your-username/magiclogger.git cd magiclogger - Install dependencies:
npm install
- Set up your development environment
- See Development Guide for detailed instructions
-
Create a new branch for your changes:
git checkout -b feature/your-feature-name
-
Make your changes:
- Write code
- Add tests
- Update documentation
-
Run tests and linting:
npm test npm run lint -
Format your code:
npm run format
-
Check test coverage:
npm run test:coverage
We follow Conventional Commits for commit messages. This enables automatic versioning and changelog generation.
Format your commits as:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Types:
feat: A new feature (triggers minor version bump)fix: A bug fix (triggers patch version bump)docs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code changes that neither fix bugs nor add featuresperf: Performance improvementstest: Adding or correcting testschore: Changes to build process or tools
For breaking changes, include a BREAKING CHANGE: footer. The angular preset in .releaserc does not read a ! after the type.
Example:
feat(logger): add color support for backgrounds
Add ability to use background colors in text output.
Closes #42
You can use the provided commit script for guided commit creation:
npm run commitSee Git Workflow for more details.
- Ensure your code passes all tests and maintains test coverage
- Update documentation if you're changing behavior
- Submit your pull request targeting the
mainbranch - Describe your changes in detail and link any related issues
- Wait for review - maintainers will review your PR as soon as possible
- Address review feedback if requested
Magiclogger follows these standards:
- TypeScript for type safety
- ESLint for code quality
- Prettier for consistent formatting
- Jest for testing
Our automated tools enforce these standards. Run these locally before submitting:
npm run lint
npm run formatWe maintain high test coverage standards:
- Write tests for all new features
- Ensure all edge cases are covered
- Keep Codecov's coverage checks on your pull request green (see Test Coverage)
Run tests with:
npm testCheck coverage with:
npm run test:coverage- CI/CD Pipeline: See CI/CD Documentation
- Release Process: See Publishing Guide
- API Documentation: See API Usage
Thank you for contributing to Magiclogger!