Thank you for your interest in contributing to the Docling SDK! This guide will help you get started.
-
Fork and Clone
git clone https://github.com/btwld/docling-sdk.git cd docling-sdk -
Install Dependencies
npm install
-
Run Tests
npm test
main- Production releasesnext- Pre-release featuresbeta- Beta testingalpha- Alpha testingfeature/*- New featuresfix/*- Bug fixeschore/*- Maintenance tasks
We use Conventional Commits:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasksci: CI/CD changesperf: Performance improvements
Examples:
feat(api): add streaming support for large files
fix(cli): resolve timeout issue with large documents
docs(readme): update installation instructionsReleases are fully automated using github-actions[bot]:
When you change the version in package.json and push to main:
# Update version in package.json
npm version patch # or minor, major
git push origin main
# → Automatic release triggeredUse GitHub Actions UI for controlled releases:
- Go to Actions → Release workflow
- Click "Run workflow"
- Choose release type:
- patch:
1.0.0→1.0.1(bug fixes) - minor:
1.0.0→1.1.0(new features) - major:
1.0.0→2.0.0(breaking changes)
- patch:
Use conventional commit messages for better changelogs:
# Patch release triggers
git commit -m "fix: resolve memory leak in file processing"
# Minor release triggers
git commit -m "feat: add new OCR engine support"
# Major release triggers
git commit -m "feat!: redesign API interface
BREAKING CHANGE: The API interface has been completely redesigned"The following npm users have ownership/publishing rights to docling-sdk:
- kauandotnet (primary maintainer)
- leoafarias
- tnramalho
New owners can be added using: npm owner add <username> docling-sdk
# Unit tests
npm run test:unit
# Integration tests
npm run test:integration
# All tests
npm run test:all
# With coverage
npm run test:coverage
# Watch mode
npm run test:ui- Place unit tests in
tests/unit/ - Place integration tests in
tests/integration/ - Use descriptive test names
- Mock external dependencies
- Aim for >90% code coverage
# Check code style
npm run lint
# Fix auto-fixable issues
npm run lint:fix
# Format code
npm run format:fix
# Type checking
npm run typecheckBefore committing, ensure:
- Tests pass (
npm test) - Linting passes (
npm run lint) - Types are correct (
npm run typecheck) - Build succeeds (
npm run build)
Publishing is completely automated:
- Merge to
main→ Triggers production release - Merge to
next→ Triggers pre-release (1.0.0-next.1) - Merge to
beta→ Triggers beta release (1.0.0-beta.1) - Merge to
alpha→ Triggers alpha release (1.0.0-alpha.1)
- ✅ Version bump in
package.json - ✅ Generate
CHANGELOG.md - ✅ Create GitHub release with notes
- ✅ Publish to npm
- ✅ Update git tags
- ✅ Commit changes back to repo
When reporting bugs, please include:
- Node.js version
- Operating system
- Steps to reproduce
- Expected vs actual behavior
- Error messages/stack traces
For new features:
- Check existing issues first
- Describe the use case
- Provide examples
- Consider backward compatibility
- 💬 Discussions: GitHub Discussions
- 🐛 Issues: GitHub Issues
- 📧 Email: [Your contact email]
By contributing, you agree that your contributions will be licensed under the MIT License.