Thank you for your interest in contributing to the MSRP Node.js Library! This document provides guidelines and information for contributors.
- Node.js 18.x or higher
- npm or yarn
- Git
-
Fork and Clone
git clone https://github.com/YOUR_USERNAME/msrp-node-lib.git cd msrp-node-lib -
Install Dependencies
npm install
-
Verify Setup
npm run test:all
feature/description- New featuresfix/description- Bug fixesdocs/description- Documentation updatestest/description- Test improvementschore/description- Maintenance tasks
We follow Conventional Commits:
type(scope): description
feat(parser): add support for chunked messages
fix(session): resolve connection timeout issues
docs(readme): update installation instructions
test(functional): add multi-process test scenarios
feat- New featuresfix- Bug fixesdocs- Documentation changestest- Test additions/modificationsrefactor- Code refactoringperf- Performance improvementschore- Maintenance tasks
- All new code must include tests
- Unit test coverage should remain above 90%
- Functional tests should cover new features
- Multi-process tests for network functionality
# Run all tests
npm run test:all
# Run specific test suites
npm run test # Unit tests
npm run test:functional # Functional tests
npm run test:coverage # Coverage report
# Run tests in watch mode
npm run test:watch
npm run test:functional:watch-
Unit Tests (
tests/)- Individual module testing
- Mock external dependencies
- Fast execution
- High coverage
-
Functional Tests (
tests/functional/)- End-to-end scenarios
- Real MSRP communication
- Integration testing
- Multi-process scenarios
-
Multi-Process Tests
- Separate Node.js processes
- Real network communication
- Complex scenarios
- Load testing
- Use ES6+ features where appropriate
- Follow existing code patterns
- Use meaningful variable names
- Add JSDoc comments for public APIs
/**
* Creates a new MSRP session
* @param {Object} config - Session configuration
* @param {string} config.sessionId - Unique session identifier
* @returns {Session} The created session instance
*/
function createSession(config) {
// Implementation
}- Update README.md for new features
- Include code examples
- Update configuration tables
- Add new badges if applicable
- Document all public methods
- Include parameter types and descriptions
- Provide usage examples
- Document error conditions
-
Ensure all tests pass
npm run test:all
-
Check code style
npm run lint --if-present
-
Update documentation
- Update README if needed
- Add JSDoc comments
- Update configuration tables
-
Add tests
- Unit tests for new functionality
- Functional tests for features
- Multi-process tests for network features
- Tests pass on all platforms
- Code coverage maintained/improved
- Documentation updated
- Breaking changes documented
- Related issues referenced
- Automated CI/CD checks must pass
- Code review by maintainers
- Functional testing verification
- Documentation review
- Final approval and merge
- Check existing issues
- Test with latest version
- Create minimal reproduction case
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Environment information
- Code examples
- Error messages
- Check existing issues and PRs
- Consider if it fits the library's scope
- Think about backward compatibility
- Problem description
- Proposed solution
- Use cases and examples
- Compatibility considerations
- Implementation suggestions
We follow Semantic Versioning:
MAJOR.MINOR.PATCH- Breaking changes increment MAJOR
- New features increment MINOR
- Bug fixes increment PATCH
- Create release branch
- Update version in package.json
- Update CHANGELOG.md
- Create GitHub release
- Automated publishing to npm
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - General questions and ideas
- @cwysong85 - Primary maintainer
Contributors will be recognized in:
- CHANGELOG.md for their contributions
- GitHub contributors page
- Release notes for significant contributions
By contributing to this project, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to the MSRP Node.js Library! 🎉