All packages updated to support React 19.2.0:
@hanzo/ui- v5.1.1@hanzo/auth- Latest@hanzo/commerce- Latest@hanzo/brand- Latest@hanzo/react- v1.0.0
When you push a git tag starting with v (typically matching @hanzo/ui version), the workflow automatically checks all packages and publishes any with new versions:
# Tag with @hanzo/ui version (workflow checks all packages)
git tag v5.1.1
git push origin v5.1.1What happens:
- Tests run (pkg/ui and pkg/react)
- All 5 packages build
- Automatic version detection:
- Checks each package's current version in package.json
- Queries npm to see if that version already exists
- Only publishes packages with new versions not on npm
- GitHub release created (only if packages were published)
Example workflow output:
📦 Checking @hanzo/ui@5.1.1
⏭️ Already published - skipping
📦 Checking @hanzo/auth@2.5.5
🚀 Publishing to npm...
✅ Successfully published @hanzo/auth@2.5.5
📊 Publishing Summary
✅ Published: 1 package(s)
⏭️ Skipped: 4 package(s)
This approach means you:
- Only need to tag once (with @hanzo/ui version)
- Don't need to track which packages need publishing
- Can bump any package version and it auto-publishes on next tag
- Similar to python-sdk monorepo publishing
Workflow: .github/workflows/publish-on-tag.yml
Use GitHub Actions UI to manually publish specific packages:
- Go to Actions → NPM Publish
- Click Run workflow
- Select package:
ui,auth,commerce,brand,react, orall - Select version bump:
patch,minor, ormajor - Click Run workflow
What happens:
- Selected package(s) build
- Version bumped automatically
- Package(s) published to npm
- PR created with version bump
Workflow: .github/workflows/npm-publish.yml
For quick patches or testing:
# Build and test
cd pkg/ui
pnpm build
pnpm test
# Bump version
npm version patch # or minor/major
# Publish
npm publish --access publicThe GitHub secret NPM_AUTH_TOKEN must be set:
- Generate token at https://www.npmjs.com/settings/tokens
- Add to GitHub: Settings → Secrets → Actions →
NPM_AUTH_TOKEN
All packages already configured with:
{
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}- Type Declarations: Added
hanzo-ui.d.tsfiles for React 19 compatibility - Peer Dependencies: Force React 19.2.0 via pnpm overrides
- Test Environment: Switched to happy-dom for better React 19 support
- Build Configuration: All packages build successfully with React 19
- pkg/ui: 206/207 tests passing (99.5%)
- pkg/react: 10/10 tests passing (100%)
Before publishing:
- All packages build successfully:
pnpm build - Tests pass:
pnpm test - Types check:
cd app && pnpm typecheck - Lint passes:
cd app && pnpm lint - Update CHANGELOG.md
- Update version in package.json (if manual)
- Commit changes
# Clean install
rm -rf node_modules pnpm-lock.yaml
pnpm install
# Rebuild
pnpm build# Run specific package tests
cd pkg/ui && pnpm test
cd pkg/react && pnpm test- Check NPM_AUTH_TOKEN is valid
- Ensure version is unique (not already published)
- Verify package builds:
cd pkg/<name> && pnpm build
- npm: https://www.npmjs.com/org/hanzo
- GitHub: https://github.com/hanzoai/ui
- Docs: https://ui.hanzo.ai
Last Updated: 2025-10-05 React Version: 19.2.0