Thank you for your interest in contributing to the Streamline Node.js SDK! This guide will help you get started.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes
- Run tests and linting
- Commit your changes (
git commit -m "Add my feature") - Push to your fork (
git push origin feature/my-feature) - Open a Pull Request
- Node.js 18 or later
- npm
# Clone your fork
git clone https://github.com/<your-username>/streamline-node-sdk.git
cd streamline-node-sdk
# Install dependencies
npm install
# Build (dual CJS + ESM via tsup)
npm run build
# Run tests
npm test# Run all tests (vitest)
npm test
# Run in watch mode
npx vitest --watch
# Run with coverage
npx vitest --coverage
# Run a specific test file
npx vitest src/__tests__/producer.test.tsIntegration tests require a running Streamline server:
# Start the server
docker compose -f docker-compose.test.yml up -d
# Run integration tests
npm test -- --run
# Stop the server
docker compose -f docker-compose.test.yml down# Lint
npm run lint
# Type check
npm run typecheck- Follow existing TypeScript patterns in the codebase
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
- Keep functions focused and short
- Write clear commit messages
- Add tests for new functionality
- Update documentation if needed
- Ensure
npm run build,npm test, andnpm run lintpass before submitting
- Use the Bug Report or Feature Request issue templates
- Search existing issues before creating a new one
- Include reproduction steps for bugs
All contributors are expected to follow our Code of Conduct.
By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.