# @changesets/write

> Writes a changeset to a file

Latest version **1.0.1** (published 2026-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @changesets/write
pnpm add @changesets/write
yarn add @changesets/write
bun add @changesets/write
```

## Health

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

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2026-08-19 |
| First published | 2020-03-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^22.11 \|\| ^24 \|\| >=26 |
| Dependencies | 3 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 12390 |
| Maintainers | emmatown, andarist |

## Links

- npm: https://www.npmjs.com/package/@changesets/write
- Repository: https://github.com/changesets/changesets
- npm.io page: https://npm.io/package/@changesets/write

## Dependencies (3)

- [human-id](https://npm.io/package/human-id.md) ^4.2.0
- [@changesets/types](https://npm.io/package/@changesets/types.md) ^7.0.0
- [@changesets/format](https://npm.io/package/@changesets/format.md) ^0.1.1

## Recent versions

- 1.0.1 (latest) — 2026-08-19
- 1.0.0-next.9 (next) — 2026-08-03
- 0.1.7-temp.0 (temp) — 2021-12-07
- 1.0.0 — 2026-08-11
- 1.0.0-next.8 — 2026-07-25
- 1.0.0-next.7 — 2026-07-17
- 1.0.0-next.6 — 2026-07-01
- 1.0.0-next.5 — 2026-05-28
- 1.0.0-next.4 — 2026-05-13
- 1.0.0-next.3 — 2026-05-07
- 1.0.0-next.2 — 2026-05-04
- 1.0.0-next.1 — 2025-10-30
- 1.0.0-next.0 — 2025-04-21
- 0.4.0 — 2025-02-17
- 0.3.2 — 2024-09-04
- … 16 more at https://npm.io/package/@changesets/write/versions

## README

# @changesets/write

Writes a changeset to a file.

```js
import { writeChangeset } from "@changesets/write";

const changeset = {
  summary: "A description of a minor change",
  releases: [
    { name: "@changesets/something", type: "minor" },
    { name: "@changesets/something-else", type: "patch" },
  ],
};

const uniqueId = await writeChangeset(changeset, cwd);
console.log(uniqueId); // orange-foxes-waggle
```

For example, it can convert:

```json
{
  "summary": "A description of a minor change",
  "releases": [
    { "name": "@changesets/something", "type": "minor" },
    { "name": "@changesets/something-else", "type": "patch" }
  ]
}
```

to

```markdown
---
"@changesets/something": minor
"@changesets/something-else": patch
---

A description of a minor change
```

This package will take care of generating a unique id for the changeset.

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