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

Package detail

@changesets/parse

changesets6.1mMIT0.4.2TypeScript support: included

Parse a changeset file's contents into a usable json object

readme

@changesets/parse

npm package View changelog

Parses a changeset from its written format to a data object.

import parse from "@changesets/parse";

const changeset = `---
"@changesets/something": minor
"@changesets/something-else": patch
---

A description of a minor change`;

const parsedChangeset = parse(changeset);

For example, it can convert:

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

A description of a minor change

to

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

Note that this is not quite a complete Changeset for most tools as it lacks an id.

For written changesets, the id is normally given as the file name, which parse is not aware of.

changelog

@changesets/parse

0.4.2

Patch Changes

0.4.1

Patch Changes

0.4.0

Minor 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

0.3.16

Patch Changes

0.3.15

Patch Changes

0.3.14

Patch Changes

0.3.13

Patch Changes

0.3.12

Patch Changes

0.3.11

Patch Changes

  • #740 957e39c Thanks @akphi! - Fixed an issue with failing to parse changesets containing a completely empty summary.

0.3.10

Patch Changes

0.3.9

Patch Changes

0.3.8

Patch Changes

0.3.7

Patch Changes

  • 5b6005e #462 Thanks @Andarist! - Fixed an issue with failing to parse changesets containing Windows newlines.

0.3.6

Patch Changes

0.3.5

Patch Changes

0.3.4

Patch Changes

0.3.3

Patch Changes

0.3.2

Patch Changes

0.3.1

Patch Changes

0.3.0

Minor Changes

  • 8dce96f #187 Thanks @gardnerjack! - Added --empty flag to the add command for empty changeset files. New tests for adding, writing, parsing, and reading empty changesets.

0.2.1

Patch Changes

0.2.0

Minor Changes

  • 296a6731 - Safety bump: Towards the end of preparing changesets v2, there was a lot of chaos - this bump is to ensure every package on npm matches what is found in the repository.

Patch Changes

0.1.2

Patch Changes

  • a15abbf9 - Previous release shipped unbuilt code - fixing that

0.1.0

Minor Changes