Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rifandani/be-monorepo/llms.txt
Use this file to discover all available pages before exploring further.
Changesets
The BE Monorepo uses Changesets to manage versioning and changelogs across the monorepo packages.What are Changesets?
Changesets is a tool for managing versions and changelogs in monorepos. It allows you to:- Track which packages have changes
- Specify the type of change (major, minor, patch)
- Write human-readable descriptions of changes
- Automatically update versions and
CHANGELOG.mdfiles - Coordinate releases across multiple packages
Changeset Workflow
1. Make Code Changes
Develop your feature, bug fix, or other changes as usual:2. Create a Changeset
When your changes are ready, create a changeset:Which packages would you like to include?
Select the packages that have changed:What kind of change is this?
For each selected package, specify the semantic version bump:- Major: Breaking changes that require user action
- Minor: New features that are backwards compatible
- Patch: Bug fixes and minor improvements
Summary
Provide a human-readable description of the changes:CHANGELOG.md.
3. Review the Changeset
A new changeset file is created in.changeset/ directory:
4. Version the Changeset
When ready to release (typically after merging to main), version all pending changesets:- Update package versions in
package.jsonfiles - Update
CHANGELOG.mdfiles with changeset descriptions - Remove consumed changesets from
.changeset/directory - Update workspace dependencies to match new versions
5. Commit Version Changes
Commit the version bump and changelog updates:Changeset Commands
bun cs
Create a new changeset interactively:
changeset or changeset add
bun cs:v
Version packages based on pending changesets:
changeset version
Advanced Commands
Other changeset commands (run withbunx changeset):
changeset status
Check which packages will be versioned:
changeset publish
Publish packages to npm (if applicable):
Change Types and Semantic Versioning
Patch (0.0.X)
Bug fixes and minor improvements that don’t change the API:- Bug fixes
- Performance improvements
- Documentation updates
- Dependency updates (non-breaking)
- Refactoring (no API changes)
Minor (0.X.0)
New features that are backwards compatible:- New API endpoints
- New functions/methods
- New optional parameters
- Feature enhancements
- Deprecations (with backwards compatibility)
Major (X.0.0)
Breaking changes that require user action:- API changes that break existing code
- Removed features/endpoints
- Changed function signatures
- Renamed exports
- Major dependency upgrades with breaking changes
Best Practices
When to Create Changesets
✅ Do create changesets for:- New features
- Bug fixes
- API changes
- Dependency updates
- Performance improvements
- Internal refactoring (no user impact)
- Documentation-only changes (unless significant)
- CI/config changes
- Test updates
Writing Good Changeset Descriptions
✅ Good examples:- Start with a verb (Add, Fix, Update, Remove)
- Be specific and concise
- Mention user-facing impact
- Reference issue numbers if applicable
Multiple Changesets
You can have multiple changesets pending:bun cs:v.
Changeset in PRs
Include changesets in your pull requests:- Make code changes
- Create changeset:
bun cs - Commit changeset with your changes
- Open pull request
- Changesets will be consumed when merged and released
Example Workflow
Complete Feature Development
Upgrading Dependencies
Troubleshooting
No Changesets Detected
Ifbun cs:v reports no changesets:
- Check
.changeset/directory for changeset files - Ensure changesets were committed
- Create a new changeset with
bun cs
Version Not Updated
If package versions don’t update:- Verify changeset file format is correct
- Ensure package names in frontmatter match
package.json - Check for YAML syntax errors in changeset
Merge Conflicts
If you encounter changeset merge conflicts:- Keep both changeset files (they have unique names)
- Resolve
CHANGELOG.mdconflicts manually - Run
bun cs:vto regenerate changelog if needed
