🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@changesets/parse

Package Overview
Dependencies
Maintainers
4
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@changesets/parse - npm Package Compare versions

Comparing version
1.0.0-next.2
to
1.0.0-next.3
+21
LICENSE
MIT License
Copyright (c) 2019 Ben Conolly
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+17
-0
# @changesets/parse
## 1.0.0-next.3
### Major Changes
- [#1954](https://github.com/changesets/changesets/pull/1954) [`ed6728c`](https://github.com/changesets/changesets/commit/ed6728ce3c089caaee19f71194a0cd7029480069) Thanks [@beeequeue](https://github.com/beeequeue)! - Bumped supported Node versions to `^22.11 || ^24 || >=26`
### Minor Changes
- [#1969](https://github.com/changesets/changesets/pull/1969) [`2c7c043`](https://github.com/changesets/changesets/commit/2c7c043d7071440009f8a69eff0b0c6746ac7625) Thanks [@marcalexiei](https://github.com/marcalexiei)! - Add a named export that mirrors the current `default` export
The `default` export is slated for removal in the next major release, so this ensures a smoother transition path.
### Patch Changes
- Updated dependencies [[`ed6728c`](https://github.com/changesets/changesets/commit/ed6728ce3c089caaee19f71194a0cd7029480069), [`a0b5326`](https://github.com/changesets/changesets/commit/a0b5326570e8e7bf5e35c1cefe8f70d9a51a5cd7)]:
- @changesets/types@7.0.0-next.3
## 1.0.0-next.2

@@ -4,0 +21,0 @@

+9
-4

@@ -31,4 +31,4 @@ import yaml from 'js-yaml';

}
let [, roughReleases, roughSummary] = execResult;
let summary = roughSummary.trim();
const [, roughReleases, roughSummary] = execResult;
const summary = roughSummary.trim();
let releases;

@@ -39,3 +39,5 @@ let yamlStuff;

} catch (e) {
throw new Error(`could not parse changeset - invalid YAML in frontmatter.\n` + `The frontmatter between the "---" delimiters must be valid YAML.\n` + `YAML error: ${e instanceof Error ? e.message : String(e)}\n` + `Frontmatter content:\n${roughReleases}`);
throw new Error(`could not parse changeset - invalid YAML in frontmatter.\n` + `The frontmatter between the "---" delimiters must be valid YAML.\n` + `YAML error: ${e instanceof Error ? e.message : String(e)}\n` + `Frontmatter content:\n${roughReleases}`, {
cause: e
});
}

@@ -60,2 +62,5 @@ if (yamlStuff) {

export { parseChangesetFile as default };
/** @deprecated Use named export `parseChangesetFile` instead */
const parseChangesetFileDefault = parseChangesetFile;
export { parseChangesetFileDefault as default, parseChangesetFile };
import type { Release } from "@changesets/types";
export default function parseChangesetFile(contents: string): {
export declare function parseChangesetFile(contents: string): {
summary: string;
releases: Release[];
};
/** @deprecated Use named export `parseChangesetFile` instead */
declare const parseChangesetFileDefault: typeof parseChangesetFile;
export default parseChangesetFileDefault;
{
"name": "@changesets/parse",
"version": "1.0.0-next.2",
"version": "1.0.0-next.3",
"description": "Parse a changeset file's contents into a usable json object",

@@ -13,4 +13,4 @@ "type": "module",

"dependencies": {
"@changesets/types": "^7.0.0-next.2",
"js-yaml": "^4.1.1"
"js-yaml": "^4.1.1",
"@changesets/types": "^7.0.0-next.3"
},

@@ -22,4 +22,4 @@ "devDependencies": {

"engines": {
"node": ">=20.19.0"
"node": "^22.11 || ^24 || >=26"
}
}
}
# @changesets/parse
[![npm package](https://img.shields.io/npm/v/@changesets/parse)](https://npmjs.com/package/@changesets/parse)
[![View changelog](https://img.shields.io/badge/Explore%20Changelog-brightgreen)](./CHANGELOG.md)
[![Open on npmx.dev](https://npmx.dev/api/registry/badge/version/@changesets/parse?name=true)](https://npmx.dev/package/@changesets/parse)
[![View changelog](https://npmx.dev/api/registry/badge/version/@changesets/cli?color=229fe4&value=View+changelog&label=+)](./CHANGELOG.md)

@@ -9,3 +9,3 @@ Parses a changeset from its written format to a data object.

```js
import parse from "@changesets/parse";
import { parseChangesetFile } from "@changesets/parse";

@@ -19,3 +19,3 @@ const changeset = `---

const parsedChangeset = parse(changeset);
const parsedChangeset = parseChangesetFile(changeset);
```

@@ -22,0 +22,0 @@

import { outdent } from "outdent";
// eslint-disable-next-line import/no-extraneous-dependencies
import { describe, expect, it } from "vitest";
import parse from "./index.ts";

@@ -6,0 +4,0 @@

@@ -0,3 +1,3 @@

import type { Release, VersionType } from "@changesets/types";
import yaml from "js-yaml";
import type { Release, VersionType } from "@changesets/types";

@@ -51,3 +51,3 @@ const mdRegex = /\s*---([^]*?)\n\s*---(\s*(?:\n|$)[^]*)/;

export default function parseChangesetFile(contents: string): {
export function parseChangesetFile(contents: string): {
summary: string;

@@ -75,4 +75,4 @@ releases: Release[];

}
let [, roughReleases, roughSummary] = execResult;
let summary = roughSummary.trim();
const [, roughReleases, roughSummary] = execResult;
const summary = roughSummary.trim();

@@ -89,2 +89,3 @@ let releases: Release[];

`Frontmatter content:\n${roughReleases}`,
{ cause: e },
);

@@ -114,1 +115,5 @@ }

}
/** @deprecated Use named export `parseChangesetFile` instead */
const parseChangesetFileDefault = parseChangesetFile;
export default parseChangesetFileDefault;