wrangler-action/node_modules/@changesets/parse
2023-08-07 15:11:15 -05:00
..
dist Temp fix for deps issue 2023-08-07 15:11:15 -05:00
src Temp fix for deps issue 2023-08-07 15:11:15 -05:00
CHANGELOG.md Temp fix for deps issue 2023-08-07 15:11:15 -05:00
package.json Temp fix for deps issue 2023-08-07 15:11:15 -05:00
README.md Temp fix for deps issue 2023-08-07 15:11:15 -05:00

@changesets/parse

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.