LeRobot.js / CHANGESET_GUIDE.md
NERDDISCO's picture
feat: move "src/lerobot/web" to "packages/web/src"
b664dbe
|
raw
history blame
1.76 kB

πŸš€ Changesets Workflow Guide

Setup (One Time Only)

1. Add NPM Token to GitHub

  1. Go to npmjs.com β†’ Account β†’ Access Tokens
  2. Create Automation token with Publish permission
  3. Copy the token
  4. Go to GitHub β†’ Settings β†’ Secrets β†’ Actions
  5. Add secret: NPM_TOKEN = your token

2. Verify Access

Make sure you have publish access to @lerobot/web on npm.

Daily Workflow

1. Make Changes

# Edit code in packages/web/
# Test your changes
pnpm --filter "@lerobot/web" run build

2. Create Changeset

pnpm changeset
  • Select package: @lerobot/web
  • Choose version bump: patch | minor | major
  • Write summary: "Add new feature X" or "Fix bug Y"

3. Commit & Push

git add .
git commit -m "feat: add new functionality"
git push origin main

4. Magic Happens! ✨

  • GitHub Actions creates Release PR with changelog
  • Merge the PR β†’ Automatic publish to npm
  • New version is live!

Commands Available

# Create a changeset (describe your changes)
pnpm changeset

# Preview what will be released
pnpm changeset:version

# Manual publish (emergency only)
pnpm changeset:publish

Version Types

  • patch (0.1.0 β†’ 0.1.1) - Bug fixes
  • minor (0.1.0 β†’ 0.2.0) - New features
  • major (0.1.0 β†’ 1.0.0) - Breaking changes

Example Flow

# 1. Edit packages/web/src/calibrate.ts
# 2. Create changeset
pnpm changeset
# β†’ Select @lerobot/web
# β†’ Choose "minor"
# β†’ Summary: "Add new calibration mode"

# 3. Commit
git add .
git commit -m "feat: add new calibration mode"
git push

# 4. GitHub will create Release PR automatically
# 5. Merge PR β†’ @lerobot/[email protected] published! πŸŽ‰