Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@changesets/pre

changesets6.3mMIT2.0.2TypeScript support: included

Utils to make a Changesets repo enter and exit pre mode

readme

@changesets/pre

npm package View changelog

Enter and exit pre mode in a Changesets repo.

Usage

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

import { 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>;

changelog

@changesets/pre

2.0.2

Patch Changes

2.0.1

Patch Changes

2.0.0

Major Changes

  • #1185 a971652 Thanks @Andarist! - package.json#exports have been added to limit what (and how) code might be imported from the package.

Patch Changes

1.0.14

Patch Changes

1.0.13

Patch Changes

1.0.12

Patch Changes

1.0.11

Patch Changes

1.0.10

Patch Changes

1.0.9

Patch Changes

  • #713 82be80e Thanks @zthxxx! - Fixed an issue with not being able to reenter exited pre mode.

1.0.8

Patch Changes

1.0.7

Patch Changes

1.0.6

Patch Changes

1.0.5

Patch Changes

  • cdfbe16 #402 Thanks @Andarist! - Fixed return type of the readPreState function. It is now properly annotated as Promise<PreState | undefined> instead of just Promise<PreState>.

1.0.4

Patch Changes

1.0.3

Patch Changes

1.0.2

Patch Changes

1.0.1

Patch Changes

1.0.0

Major Changes

Patch Changes

0.2.0

Minor Changes

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes

Patch Changes