DEV Community

Alex Spinov
Alex Spinov

Posted on

Changesets Has a Free API You Should Know About

Changesets is a tool for managing versioning and changelogs for multi-package repositories. It handles the painful parts of releasing — version bumping, changelog generation, and npm publishing.

Why Teams Need Changesets

A library maintainer was manually updating version numbers in 8 packages, writing changelog entries, and running npm publish for each one. Changesets automated the entire process — every PR now includes a changeset, and releases happen with one command.

Key Features:

  • Semver Management — Automatic version bumping based on change type
  • Changelog Generation — Auto-generated from changeset descriptions
  • Monorepo Support — Handles dependencies between packages
  • CI Integration — GitHub Action for automated releases
  • Pre-releases — Alpha, beta, rc version support

Quick Start

npm install -D @changesets/cli
npx changeset init
Enter fullscreen mode Exit fullscreen mode

Create a Changeset

npx changeset
# Select packages that changed
# Choose bump type (major/minor/patch)
# Write a summary of changes
Enter fullscreen mode Exit fullscreen mode

Release

npx changeset version  # Bump versions + update changelogs
npx changeset publish  # Publish to npm
Enter fullscreen mode Exit fullscreen mode

GitHub Action

name: Release
on:
  push:
    branches: [main]
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: changesets/action@v1
        with:
          publish: npx changeset publish
        env:
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Enter fullscreen mode Exit fullscreen mode

Why Choose Changesets

  1. No manual versioning — semantic versioning automated
  2. Quality changelogs — every change is documented
  3. Monorepo-native — handles cross-package dependencies

Check out Changesets docs to get started.


Publishing packages? Check out my Apify actors or email spinov001@gmail.com for custom automation.

Top comments (0)