Socket
Socket
Sign inDemoInstall

@changesets/parse

Package Overview
Dependencies
5
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @changesets/parse

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


Version published
Maintainers
4
Install size
779 kB
Created

Readme

Source

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

FAQs

Last updated on 28 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc