Versioning
We follow Semantic Versioning (SemVer) for all our packages and APIs.
Version Format
MAJOR.MINOR.PATCH
# Example: 1.2.3
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
Version Management
NPM Version
# Patch release
npm version patch
# 1.2.3 -> 1.2.4
# Minor release
npm version minor
# 1.2.3 -> 1.3.0
# Major release
npm version major
# 1.2.3 -> 2.0.0
Git Tags
# Create annotated tag
git tag -a v1.2.3 -m "Version 1.2.3"
# Push tags
git push origin --tags
Release Process
-
Update Version
# Update package.json npm version minor # Update changelog git cliff -o CHANGELOG.md # Commit changes git add CHANGELOG.md git commit -m "chore: update changelog"
-
Create Release
# Create GitHub release gh release create v1.2.3 \ --title "Version 1.2.3" \ --notes-file CHANGELOG.md
API Versioning
URL Versioning
# Current version
https://api.lomi.africa/v1/checkout/sessions
# Future version
https://api.lomi.africa/v2/checkout/sessions
Version Lifecycle
-
Active
- Latest version
- Full support
- Regular updates
-
Maintained
- Previous version
- Security updates
- Bug fixes only
-
Deprecated
- Old version
- Limited support
- Migration required
Breaking Changes
-
Notification
- Advance notice (minimum 6 months)
- Migration guide
- Deprecation warnings
-
Documentation
- Version comparison
- Migration steps
- Code examples
-
Support
- Migration assistance
- Legacy version support
- Transition period
Version Control
Package Files
{
"name": "@lomi/sdk",
"version": "1.2.3",
"engines": {
"node": ">=14"
}
}
Lock Files
# NPM
package-lock.json
# Yarn
yarn.lock
Best Practices
-
Version Numbers
- Use semantic versioning
- Document changes
- Keep changelog updated
-
Dependencies
- Pin exact versions
- Regular updates
- Security audits
-
Release Notes
- Clear descriptions
- Breaking changes
- Upgrade guide