Thank you for your interest in contributing to Streamdown! We welcome contributions from the community.
- Node.js 18 or higher
- pnpm (version specified in package.json
packageManagerfield)
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/streamdown.git cd streamdown - Install dependencies:
pnpm install
- Run the tests to ensure everything is working:
pnpm test
This is a monorepo managed with Turbo. The main package is located at:
packages/streamdown/- The core Streamdown React component library
pnpm dev- Start development modepnpm build- Build all packagespnpm test- Run testspnpm test:coverage- Run tests with coveragepnpm test:ui- Run tests with UIpnpm lint- Run lintingpnpm format- Format code with Prettierpnpm check-types- Type checking
-
Create a new branch for your feature or fix:
git checkout -b feature/your-feature-name
-
Make your changes and ensure:
- All tests pass (
pnpm test) - Code is properly formatted (
pnpm format) - Type checking passes (
pnpm check-types) - Linting passes (
pnpm lint)
- All tests pass (
-
Write or update tests for your changes
-
Create a changeset for your changes:
pnpm changeset
- Select the package(s) affected
- Choose the appropriate version bump (patch/minor/major)
- Write a concise description of the changes
We follow conventional commits for clear commit history:
feat:New featuresfix:Bug fixesdocs:Documentation changesstyle:Code style changes (formatting, etc)refactor:Code changes that neither fix bugs nor add featurestest:Adding or updating testschore:Maintenance tasks
Examples:
feat: add support for custom code block themes
fix: resolve markdown parsing issue with nested lists
docs: update README with new API examples
-
Ensure your PR:
- Has a clear, descriptive title
- Includes a changeset (run
pnpm changesetif you haven't) - Passes all CI checks
- Includes tests for new functionality
- Updates documentation if needed
-
PR Description should include:
- What changes were made
- Why these changes were necessary
- Any breaking changes
- Screenshots/demos for UI changes
-
Link any related issues using keywords like
Fixes #123orCloses #456
# Run all tests
pnpm test
# Run tests with coverage
pnpm test:coverage
# Run tests with UI
pnpm test:ui
# Run tests in watch mode (in package directory)
cd packages/streamdown
pnpm vitest- Tests are located in
packages/streamdown/__tests__/ - Use descriptive test names
- Test both success and error cases
- Ensure good coverage for new features
Releases are automated through GitHub Actions and changesets:
- When PRs with changesets are merged to
main, a "Version Packages" PR is automatically created - This PR updates package versions and changelogs
- When the Version Packages PR is merged, packages are automatically published to npm
- We use TypeScript for type safety
- Follow the existing code style in the project
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused
- Open an issue for bugs or feature requests
- Join discussions in GitHub Discussions
- Check existing issues before creating new ones
By contributing to Streamdown, you agree that your contributions will be licensed under the Apache-2.0 License.