# @unconfig/changeset-workflow

> Project-specific changesets workflow helpers for @unconfig.

Latest version **0.0.3** (published 2026-06-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @unconfig/changeset-workflow
pnpm add @unconfig/changeset-workflow
yarn add @unconfig/changeset-workflow
bun add @unconfig/changeset-workflow
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2026-06-30 |
| First published | 2026-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=24 |
| Dependencies | 7 |
| Unpacked size | 41.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | i7eo |
| Maintainers | i7eo |
| Keywords | unconfig, monorepo, pnpm, turborepo, changesets, changeset, changeset-workflow |

## Links

- npm: https://www.npmjs.com/package/@unconfig/changeset-workflow
- Repository: https://github.com/i7eo/unconfig
- Homepage: https://github.com/i7eo/unconfig/blob/master/packages/changeset-workflow#readme
- Issues: https://github.com/i7eo/unconfig/issues
- npm.io page: https://npm.io/package/@unconfig/changeset-workflow

## Dependencies (7)

- [@changesets/cli](https://npm.io/package/@changesets/cli.md) ^2.31.0
- [@changesets/pre](https://npm.io/package/@changesets/pre.md) ^2.0.2
- [@changesets/read](https://npm.io/package/@changesets/read.md) ^0.6.7
- [@changesets/types](https://npm.io/package/@changesets/types.md) ^6.1.0
- [@changesets/config](https://npm.io/package/@changesets/config.md) ^3.1.4
- [@manypkg/get-packages](https://npm.io/package/@manypkg/get-packages.md) ^3.1.0
- [@changesets/assemble-release-plan](https://npm.io/package/@changesets/assemble-release-plan.md) ^6.0.10

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2026-06-30
- 0.0.2 — 2026-06-29

## README

# @unconfig/changeset-workflow

<p><strong>English</strong> | <a href="./README.zh-CN.md">中文</a></p>

`@unconfig/changeset-workflow` is a project-specific helper package built on
top of Changesets. It does not replace the Changesets CLI. Instead, it reads the
official release plan and adds the `unconfig`-specific project changelog sync
used by the repository and documentation site.

## Design

- `release-plan`: reads packages, config, pre-state, and changesets through
  official `@changesets/*` APIs.
- `changelog-generate`: converts a release plan into project-level markdown.
- `changelog-write`: inserts generated markdown into `CHANGELOG.md` and mirrors
  it to the documentation changelog.
- `markdown`: normalizes changeset summaries and generated markdown with
  deterministic spacing rules.

The package intentionally leaves versioning, publishing, tags, GitHub releases,
and prerelease state to Changesets.

## Defaults

- Empty release plans generate an empty string.
- Empty changelog content is skipped and returns `false`.
- `apps` or other packages can be excluded with `ignorePackages`.
- Package entries can be ordered with the `packages` option.
- `projectChangelogPath` and `websiteChangelogPath` are required.
- The project changelog file must contain `<!-- CHANGELOG:INSERT -->`.

## Basic Usage

```ts
import {
  generateProjectChangelog,
  writeProjectChangelog,
} from '@unconfig/changeset-workflow'

const content = await generateProjectChangelog({
  cwd: process.cwd(),
  packages: ['@unconfig/eslint-config', '@unconfig/prettier-config'],
  ignorePackages: ['@unconfig/document'],
})

await writeProjectChangelog({
  cwd: process.cwd(),
  content,
  projectChangelogPath: 'CHANGELOG.md',
  websiteChangelogPath: 'apps/document/content/changelog.md',
})
```

## Entrypoints

The package exposes a single root entrypoint.

| Entrypoint                     | Use for                                            |
| ------------------------------ | -------------------------------------------------- |
| `@unconfig/changeset-workflow` | release plan reading, changelog generation/writing |

## Release Plan Reading

Use `readChangesetsReleasePlan(cwd)` when you need the raw Changesets release
plan.

```ts
import { readChangesetsReleasePlan } from '@unconfig/changeset-workflow'

const releasePlan = await readChangesetsReleasePlan(process.cwd())
```

This function delegates to `@changesets/assemble-release-plan`,
`@changesets/config`, `@changesets/pre`, `@changesets/read`, and
`@manypkg/get-packages`.

## Changelog Generation

`generateProjectChangelog()` reads the current workspace release plan and
returns markdown that is ready to write without a separate formatter pass.

```ts
const content = await generateProjectChangelog({
  cwd: process.cwd(),
  packages: ['@unconfig/eslint-config'],
  ignorePackages: ['@unconfig/document'],
})
```

For tests or custom workflows, use `generateProjectChangelogFromReleasePlan()`
with a lightweight release-plan object.

## Changelog Writing

`writeProjectChangelog()` inserts content into the current date section when it
already exists, otherwise it creates a new date section after the changelog
marker. The newest content for a day is placed first, and the mirrored
documentation changelog is written without the marker.

```ts
await writeProjectChangelog({
  cwd: process.cwd(),
  content,
  projectChangelogPath: 'CHANGELOG.md',
  websiteChangelogPath: 'apps/document/content/changelog.md',
})
```

## Changesets Workflow

Keep release ownership in the official Changesets CLI.

```bash
pnpm changeset:generate
pnpm changeset:version
pnpm changeset:publish
```

`changeset:version` should run `changeset version` first, then call the
changelog sync script that uses this package.

## Prereleases

Use official Changesets prerelease mode instead of custom publishing logic.

```bash
pnpm changeset:pre:alpha
pnpm changeset:generate
pnpm changeset:version
pnpm changeset:publish
pnpm changeset:pre:exit
```

For temporary builds, use snapshot versions:

```bash
pnpm changeset:snapshot
```

---
_Source: https://npm.io/package/@unconfig/changeset-workflow · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
