Overview
This project uses Semantic Versioning (MAJOR.MINOR.PATCH).
Versioning Rules
MAJOR Version
IncrementMAJOR for breaking API or behavior changes.
Examples:
- Removing or renaming public functions
- Changing function signatures (required parameters, return types)
- Removing support for a runtime or platform
- Changing default behavior in non-backward-compatible ways
MINOR Version
IncrementMINOR for backward-compatible features and new APIs.
Examples:
- Adding new functions or methods
- Adding optional parameters to existing functions
- Adding new tokenizers, parsers, or classifiers
- Performance improvements without API changes
- New WASM exports
PATCH Version
IncrementPATCH for backward-compatible bug fixes and performance fixes.
Examples:
- Fixing incorrect behavior
- Performance optimizations without API changes
- Documentation updates
- Internal refactoring
- Dependency updates
Source of Truth
package.json version field is the canonical publish version.
CHANGELOG.md must include an entry for every released version.
Release Process
1. Pre-Release Checks
Ensure working tree is clean:- Valid semantic version format
- No uncommitted changes
- All tests pass
- Benchmarks are within acceptable ranges
2. Update CHANGELOG.md
Move changes from[Unreleased] section into a new version section:
YYYY-MM-DD format.
3. Bump Version
Update version inpackage.json:
4. Commit Release Metadata
Commit the changelog and version bump:5. Tag Release
Create a git tag matching the version:6. Push Commit and Tag
Push both the commit and tag:7. Publish Package
The package can be published in two ways: Option A: Automated (Recommended) The GitHub Actions workflow in.github/workflows/release.yml automatically publishes when a tag is pushed:
- Builds prebuilt native binaries
- Builds WASM
- Publishes to npm with provenance
- Uploads benchmark artifacts
Manual publishing requires npm authentication and does not include provenance.
Pre-release Versions
Format
Use the following formats for pre-releases:X.Y.Z-alpha.N- Alpha releases (experimental)X.Y.Z-beta.N- Beta releases (feature-complete, testing)X.Y.Z-rc.N- Release candidates (production-ready, final testing)
Example
Publishing Pre-releases
Use npm dist-tags to avoid installing pre-releases by default:CHANGELOG for Pre-releases
Keep pre-release notes in the same version section until stable release:Breaking Change Checklist
When making a breaking change (MAJOR version bump):1. Update API Documentation
Updatedocs/API.md with new signatures and behavior.
2. Add Migration Notes
Add migration guide toCHANGELOG.md:
5. Update Examples
Update code examples in:- README.md
- Documentation
- Example files
Release Validation
The release workflow includes automated validation:- Semantic version format
- Tag matches package.json version
- CHANGELOG includes version section
- All tests pass
- Benchmark gates pass
Post-Release Workflow
After release, GitHub Actions automatically:- Smoke Tests - Installs package on Linux/Windows and validates runtime
- Benchmark Upload - Uploads performance dashboard artifacts
- Parity Report - Uploads NLTK parity comparison
- Provenance - Publishes with SLSA provenance attestation
Version History
See CHANGELOG.md for full version history.Next Steps
Changelog
View complete version history and release notes
Contributing
Learn how to contribute to bun_nltk