This project uses Changesets for version management and releases.
When you make changes that should be included in the next release:
pnpm changesetFollow the prompts:
- Select the package(s) that changed (usually
@datum-cloud/datum-ui) - Choose version bump type:
- patch - Bug fixes, minor updates (0.3.2 → 0.3.3)
- minor - New features, backward-compatible (0.3.2 → 0.4.0)
- major - Breaking changes (0.3.2 → 1.0.0)
- Write a summary of the changes (this becomes the changelog entry)
Commit the changeset file with your PR:
git add .changeset/*.md
git commit -m "feat: add new Button variant"Renovate PRs automatically include changesets - no manual action needed!
Every time changes are merged to main, the "Version Packages" PR is automatically created or updated.
This PR:
- ✅ Bumps version numbers based on changesets
- ✅ Generates CHANGELOG.md entries
- ✅ Removes consumed changeset files
- ✅ Accumulates all changes (features, fixes, dependency updates)
Do NOT merge this PR yet! It's just a preview.
-
Review the "Version Packages" PR
- Check the version bump is correct
- Review the changelog entries
- Ensure all changes are documented
-
Merge the "Version Packages" PR
- This commits the version bumps to
main - Does NOT publish to npm yet
- This commits the version bumps to
-
Create a GitHub Release
- Go to Releases
- Click "Draft a new release"
- Choose or create a tag:
v{version}(e.g.,v0.4.0) - Release title: Same as tag (e.g.,
v0.4.0) - Description: Copy from CHANGELOG.md or auto-generate
- Click "Publish release"
-
Automatic npm Publish
- GitHub Actions automatically publishes to npm
- Published to
@latesttag - Includes npm provenance
┌─────────────────────────────────────────────────────────┐
│ Developer PR with changeset │
│ OR Renovate PR (auto-adds changeset) │
└────────────────┬────────────────────────────────────────┘
│
▼
┌───────────────┐
│ Merge to main│
└───────┬───────┘
│
▼
┌────────────────────────────┐
│ Changesets Action creates/ │
│ updates "Version Packages" │
│ PR with all changes batched│
└─────────────┬──────────────┘
│
▼
┌────────────────────┐
│ Team reviews when │
│ ready │
└────────┬───────────┘
│
▼
┌────────────────────┐
│ Merge "Version │
│ Packages" PR │
└────────┬───────────┘
│
▼
┌────────────────────┐
│ Create GitHub │
│ Release │
└────────┬───────────┘
│
▼
┌────────────────────┐
│ Auto-publish to npm│
│ with @latest tag │
└────────────────────┘
- Developer adds feature in PR with changeset:
minor- "Add dark mode support" - PR merged to main
- "Version Packages" PR created:
0.3.2 → 0.4.0 - Team reviews, approves
- Merge "Version Packages" PR
- Create GitHub Release
v0.4.0 - Package published to npm
- Monday: Renovate opens 5 PRs (React, TypeScript, ESLint, etc.)
- Each PR auto-includes a changeset
- Team merges all 5 PRs throughout the week
- "Version Packages" PR accumulates all 5 updates:
0.4.0 → 0.4.1 - Friday: Team merges "Version Packages" PR
- Create GitHub Release
v0.4.1 - All dependency updates published together
- Developer fixes critical bug with changeset:
patch- "Fix memory leak in DataTable" - PR merged immediately
- "Version Packages" PR created:
0.4.1 → 0.4.2 - Merge "Version Packages" PR immediately
- Create GitHub Release
v0.4.2 - Hotfix published to npm
# Add a changeset
pnpm changeset
# Preview what version would be bumped (local only)
pnpm changeset status
# Manually bump versions (CI does this automatically)
pnpm changeset version
# Publish to npm (CI does this automatically)
pnpm changeset publish.changeset/config.json- Changesets configuration.github/workflows/release.yml- GitHub Actions workflowrenovate.json- Renovate config with auto-changeset
Q: What if I forget to add a changeset?
A: The "Version Packages" PR won't include your changes. You can add a changeset retroactively and it will be included in the next release.
Q: Can I skip changesets for internal changes?
A: Yes! Only add changesets for changes that affect end-users. Internal refactoring doesn't need a changeset.
Q: What about pre-releases (alpha, beta)?
A: Use snapshot releases: pnpm changeset version --snapshot canary - This is outside normal workflow for testing.
Q: How do I undo a merged "Version Packages" PR?
A: You can revert the PR before creating the GitHub Release. After release, you'd need to publish a new version.
Q: Why GitHub Release instead of auto-publish on merge?
A: It gives the team explicit control over when packages go to production npm registry.
"Version Packages" PR not created
- Ensure changesets were added to merged PRs
- Check GitHub Actions logs for errors
npm publish fails
- Verify
NPM_TOKENsecret is set in repository settings - Check package version doesn't already exist on npm
- Ensure package.json has correct
publishConfig
Renovate PRs missing changesets
- Check
renovate.jsonhaspostUpgradeTasksconfigured - Renovate bot needs write access to add changeset files