KwadMarket Docs
Best Practices

Changesets

Release and version management for the monorepo packages

Not needed yet

Becomes relevant when @marketplace/ui or @marketplace/types get external consumers, a public changelog is needed, or internal versioning discipline is required to avoid silent breaking changes between packages. Recipe kept for that day.

The cal.diy pattern

.changeset/config.json with @changesets/changelog-github. Workflow:

  1. Developer runs pnpm changeset as part of their PR — generates a .changeset/xyz.md file describing the change type (patch/minor/major) and a plain-English summary.
  2. A GitHub Action runs on merge to main — bumps versions and opens a "Version Packages" PR.
  3. Merging the version PR publishes and generates a CHANGELOG.

Setup (30 min, when needed)

pnpm add -w -D @changesets/cli @changesets/changelog-github
pnpm changeset init
.changeset/config.json
{
  "changelog": "@changesets/changelog-github",
  "commit": false,
  "baseBranch": "main",
  "access": "restricted"
}
root package.json scripts
{
  "changeset": "changeset",
  "version-packages": "changeset version",
  "release": "turbo run build && changeset publish"
}

CI integration

.github/workflows/changesets.yml
name: Release
on:
  push:
    branches: [main]
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - uses: pnpm/action-setup@v3
      - run: pnpm install --frozen-lockfile
      - uses: changesets/action@v1
        with:
          publish: pnpm release
          title: "chore: version packages"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Developer workflow (ongoing)

Every PR that changes the public API of @marketplace/types or @marketplace/ui includes a changeset file (pnpm changeset). The discipline matters more than the tooling — the tooling is just a reminder.

On this page