This guide explains how to properly version and release updates to the Cleanvoice SDK.
Before releasing any version:
- ✅ Tests Pass:
npm test - ✅ Build Works:
npm run build - ✅ Linting Clean:
npm run lint - ✅ Update CHANGELOG.md: Document all changes
- ✅ Update README.md: If API changed
- ✅ Review Breaking Changes: Ensure proper versioning
When: Bug fixes, security patches, internal improvements
npm run release:patchExamples:
- Fixed polling timeout issue
- Corrected error message typos
- Security vulnerability patches
- Performance improvements (no API changes)
When: New features that don't break existing code
npm run release:minorExamples:
- Added new optional parameters to
ProcessingConfig - New utility functions exported
- Additional file format support
- New convenience methods
When: Breaking changes that require user code updates
npm run release:majorExamples:
- Renamed methods or interfaces
- Removed deprecated features
- Changed required parameters
- Modified return value structures
For testing new features before stable release:
npm run release:beta
# Creates: 1.1.0-beta.0, 1.1.0-beta.1, etc.npm run release:alpha
# Creates: 1.1.0-alpha.0, 1.1.0-alpha.1, etc.Users install with:
npm install @cleanvoice/cleanvoice-sdk@beta
npm install @cleanvoice/cleanvoice-sdk@alpha## [1.2.0] - 2024-01-15
### Added
- New `batchProcess()` method for multiple files
- Support for .aac audio format
### Fixed
- Polling timeout issue with long audio files# This will:
# 1. Update version in package.json
# 2. Create a git tag
# 3. Build the project
# 4. Publish to npm
npm run release:minor- Go to GitHub releases
- Create release from the new tag
- Copy changelog content
- Upload any additional assets
// Before (1.0.0): Had a bug
const result = await cv.process(file, { timeout: 30000 }); // timeout ignored
// After (1.0.1): Fixed bug
const result = await cv.process(file, { timeout: 30000 }); // timeout worksRelease: npm run release:patch
// Before (1.0.1): Basic config
const result = await cv.process(file, {
fillers: true,
normalize: true
});
// After (1.1.0): Added new optional feature
const result = await cv.process(file, {
fillers: true,
normalize: true,
enhancedAI: true // NEW optional parameter
});Release: npm run release:minor
// Before (1.1.0): Returns simple object
const result = await cv.process(file, config);
console.log(result.audioUrl); // OLD property
// After (2.0.0): Returns restructured object
const result = await cv.process(file, config);
console.log(result.audio.url); // NEW structureRelease: npm run release:major
- Adding optional parameters
- Adding new methods
- Adding new properties to response objects
- Improving error messages
- Performance improvements
- Removing methods or properties
- Changing method signatures
- Changing return value structures
- Making optional parameters required
- Changing error handling behavior
# Check current version
npm version
# Manual version bump (without publishing)
npm version patch --no-git-tag-version
npm version minor --no-git-tag-version
npm version major --no-git-tag-version
# View published versions
npm view @cleanvoice/cleanvoice-sdk versions --json
# Install specific version
npm install @cleanvoice/cleanvoice-sdk@1.1.1- Never commit
.env