This is a handy guide I made to help me recall the steps I need to take to update all @loro-extended packages for relase to npmjs.com.
Run the interactive changeset command each time you make a commit worthy of note:
pnpm changesetThis will prompt you to:
- Select packages - Use arrow keys and spacebar to select which packages to include (your project has
@loro-extended/adapters,@loro-extended/change,@loro-extended/react,@loro-extended/repoin a "fixed" group, meaning they'll all be versioned together) - Select bump type - Choose
minorfor a minor version bump (e.g., 1.0.0 → 1.1.0) - Write a summary - Describe what changed (this becomes the changelog entry)
This creates a markdown file in .changeset/ with a random name like fuzzy-lions-dance.md.
When you're ready to release, run:
pnpm changeset versionThis will:
- Consume all pending changeset files in
.changeset/ - Update
package.jsonversions for affected packages - Update
CHANGELOG.mdfiles with your summaries
pnpm build # Build all packages
pnpm changeset publish # Publish to npmThe publish command will publish all packages with updated versions to npmjs.com.
# 1. Create changeset for minor bump
pnpm changeset
# → Select packages, choose "minor", write summary
# 2. Commit the changeset file
git add .changeset/
git commit -m "chore: add changeset for feature X"
# 3. When ready to release, version packages
pnpm changeset version
# 4. Commit version bumps
git add .
git commit -m "chore: version packages"
# 5. Build and publish
pnpm build
pnpm changeset publish
# 6. Push tags and commits
git push --follow-tagsBefore publishing, ensure you're authenticated with npm:
npm login
# or
npm whoami # to check if already logged in