Thank you for your interest in contributing! This document provides guidelines for contributing to this project.
By participating in this project, you agree to abide by our Code of Conduct.
Before creating bug reports, please check the existing issues. When creating a bug report, include:
- Clear title and description
- Steps to reproduce the problem
- Expected behavior vs actual behavior
- Code samples that demonstrate the issue
- Environment details (Node.js version, npm version, OS)
Enhancement suggestions are welcome! Please provide:
- Clear description of the enhancement
- Use cases and why it would be useful
- Possible implementation approach (if you have ideas)
- Fork the repository and create your branch from
master - Make your changes following our coding standards
- Test your changes by running
npm test - Commit your changes using Conventional Commits:
feat:for new featuresfix:for bug fixesdocs:for documentation changeschore:for maintenance tasksrefactor:for code refactoring
- Push to your fork and submit a pull request
- Node.js (latest LTS version recommended)
- npm or pnpm
# Clone your fork
git clone https://github.com/YOUR_USERNAME/ts-serializable.git
cd ts-serializable
# Install dependencies
npm install
# Run tests
npm testThis project uses ESLint and TypeScript. Key principles:
- TypeScript: Always use proper types
- Decorators: Use reflect-metadata for decorator metadata
- Testing: Write tests for new features
- Documentation: Add JSDoc comments for public APIs
// Good
class User extends Serializable {
@jsonProperty(String)
public name: string = '';
}
// Always include default values
@jsonProperty(Number)
public age: number = 0;Follow Conventional Commits:
feat: add support for new ESLint rule
fix: correct TypeScript configuration issue
docs: update README with new examples
chore: upgrade dependenciesBefore submitting your PR:
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Check for security vulnerabilities
npm auditAll tests must pass before your PR can be merged.
- Automated checks run on every PR (tests, linting, security)
- Manual review by maintainers
- Feedback may be provided - please address comments
- Approval - once approved, your PR will be merged
Releases are automated:
- Maintainer merges PR to
master - Version is bumped automatically
- Changelog is generated
- Package is published to npm
- GitHub release is created
- Open an issue with the
questionlabel - Check existing issues and discussions
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to ts-serializable! 🎉