Thank you for your interest in contributing! This document provides guidelines and instructions for contributing.
Please be respectful and constructive in all interactions. We welcome contributors of all experience levels.
- Check if the bug has already been reported in Issues
- If not, create a new issue with:
- A clear, descriptive title
- Steps to reproduce the problem
- Expected vs actual behavior
- Your environment (OS, Node.js version, package manager versions)
- Check existing issues for similar suggestions
- Create a new issue describing:
- The feature and its use case
- How it would benefit users
- Any implementation ideas you have
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes
- Run tests:
npm test - Run linting:
npm run lint - Format code:
npm run format - Commit with a clear message
- Push and open a Pull Request
# Clone your fork
git clone https://github.com/YOUR_USERNAME/package-manager-cli.git
cd package-manager-cli
# Install dependencies
npm install
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Lint code
npm run lint
# Format code
npm run formatpackage-manager-alias-cli/
├── pm.js # Main CLI executable
├── pm.test.js # Test suite
├── package.json # Project configuration
├── .eslintrc.js # ESLint configuration
├── .prettierrc # Prettier configuration
├── README.md # User documentation
├── CONTRIBUTING.md # This file
├── CHANGELOG.md # Version history
└── LICENSE # MIT license
- Write tests for any new functionality
- Ensure all existing tests pass before submitting a PR
- Aim for meaningful test coverage, not just high percentages
# Run all tests
npm test
# Run with coverage report
npm run test:coverage- We use ESLint and Prettier for consistent code style
- Run
npm run lint:fixto auto-fix linting issues - Run
npm run formatto format code with Prettier
We use Conventional Commits for automatic changelog generation. Use these prefixes:
feat:- New features (appears in changelog)fix:- Bug fixes (appears in changelog)docs:- Documentation changes (appears in changelog)perf:- Performance improvements (appears in changelog)test:- Adding/updating tests (hidden from changelog)chore:- Maintenance tasks (hidden from changelog)refactor:- Code refactoring (hidden from changelog)
Examples:
feat: add --verbose flagfix: correct error message for missing lockfiledocs: update README with troubleshooting section
We use standard-version for automated versioning and changelog generation.
# Preview what will happen
npm run release:dry-run
# Create a release (auto-determines version bump from commits)
npm run release
# Force a minor version bump
npm run release:minor
# Force a major version bump
npm run release:major
# Push tags and publish
git push --follow-tags origin main
npm publishThe release script will:
- Bump the version in
package.jsonbased on commits - Update
CHANGELOG.mdautomatically - Create a git commit and tag
Feel free to open an issue if you have questions about contributing!