# @changesets/pre

> Utils to make a Changesets repo enter and exit pre mode

Latest version **3.0.0** (published 2026-08-11) · MIT license · 0 weekly downloads

## Install

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

## 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 | 3.0.0 |
| Published | 2026-08-11 |
| First published | 2019-10-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^22.11 \|\| ^24 \|\| >=26 |
| Dependencies | 3 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 12417 |
| Maintainers | emmatown, andarist |

## Links

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

## Dependencies (3)

- [@changesets/types](https://npm.io/package/@changesets/types.md) ^7.0.0
- [@changesets/errors](https://npm.io/package/@changesets/errors.md) ^1.0.0
- [@manypkg/get-packages](https://npm.io/package/@manypkg/get-packages.md) ^3.1.0

## Recent versions

- 3.0.0 (latest) — 2026-08-11
- 3.0.0-next.9 (next) — 2026-08-03
- 1.0.9-temp.0 (temp) — 2021-12-07
- 3.0.0-next.8 — 2026-07-25
- 3.0.0-next.7 — 2026-07-17
- 3.0.0-next.6 — 2026-07-01
- 3.0.0-next.5 — 2026-05-28
- 3.0.0-next.4 — 2026-05-13
- 3.0.0-next.3 — 2026-05-07
- 3.0.0-next.2 — 2026-05-04
- 3.0.0-next.1 — 2025-10-30
- 3.0.0-next.0 — 2025-04-21
- 2.0.2 — 2025-02-17
- 2.0.1 — 2024-09-04
- 2.0.0 — 2023-11-28
- … 18 more at https://npm.io/package/@changesets/pre/versions

## README

# @changesets/pre

[![Open on npmx.dev](https://npmx.dev/api/registry/badge/version/@changesets/pre?name=true)](https://npmx.dev/package/@changesets/pre)
[![View changelog](https://npmx.dev/api/registry/badge/version/@changesets/cli?color=229fe4&value=View+changelog&label=+)](./CHANGELOG.md)

Enter and exit pre mode in a Changesets repo.

## Usage

```ts
import { enterPre, exitPre } from "@changesets/pre";

await enterPre(cwd, tag);

let preState = await readPreState(cwd);

// version packages with @changesets/cli or get a release plan and apply it
await exitPre(cwd);
```

This package is used by internally by Changesets to enter and exit pre mode along with reading the pre state for the `publish` and `version` commands, you should only need it if you're using `@changesets/assemble-release-plan`, implementing Changesets or want to enter or exit pre mode programmatically.

## Types

```ts
import type { PreState } from "@changesets/types";

export function enterPre(cwd: string, tag: string): Promise<void>;
export function exitPre(cwd: string): Promise<void>;
export function readPreState(cwd: string): Promise<PreState>;
```

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