@changesets/parse
Parse a changeset file's contents into a usable json object
Last updated 6 years ago by noviny .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @changesets/parse 
SYNC missed versions from official npm registry.

@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.

Current Tags

  • 0.4.3                                ...           latest (a month ago)
  • 1.0.0-next.1                                ...           next (5 months ago)
  • 0.3.11-temp.0                                ...           temp (4 years ago)

28 Versions

  • 0.4.3                                ...           a month ago
  • 0.4.2                                ...           4 months ago
  • 1.0.0-next.1                                ...           5 months ago
  • 1.0.0-next.0                                ...           a year ago
  • 0.4.1                                ...           a year ago
  • 0.4.0                                ...           2 years ago
  • 0.3.16                                ...           3 years ago
  • 0.3.15                                ...           4 years ago
  • 0.3.14                                ...           4 years ago
  • 0.3.13                                ...           4 years ago
  • 0.3.12                                ...           4 years ago
  • 0.3.11                                ...           4 years ago
  • 0.3.11-temp.0                                ...           4 years ago
  • 0.3.10                                ...           4 years ago
  • 0.3.9                                ...           5 years ago
  • 0.3.8                                ...           5 years ago
  • 0.3.7                                ...           6 years ago
  • 0.3.6                                ...           6 years ago
  • 0.3.5                                ...           6 years ago
  • 0.3.4                                ...           6 years ago
  • 0.3.3                                ...           6 years ago
  • 0.3.2                                ...           6 years ago
  • 0.3.1                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.1                                ...           7 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Downloads
Today 0
This Week 4
This Month 4
Last Day 1
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |